From 1bb38796ad296fb15143281a018a2803c6041b0c Mon Sep 17 00:00:00 2001 From: Christos Kontas Date: Thu, 1 Feb 2018 09:53:16 +0100 Subject: [PATCH] Makefile: simplify `clean' rule There is a special rule in make(1) to denote that we don't care about the result of a command. Additionally, we can also instruct rm(1) not to complain when it didn't find a file/directory to remove. As a final touch, there is no point of having 2 shell executions to remove 2 or more files. We can compress these 2 recipes into a single one. Reference: https://www.gnu.org/software/make/manual/html_node/Errors.html --- Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e58f442..d2d7d5a 100644 --- a/Makefile +++ b/Makefile @@ -13,8 +13,7 @@ endif all: bin/pomo clean: - rm -v bin/* 2> /dev/null || true - rm -v docs/* 2> /dev/null || true + -rm -fv bin/* docs/* bindata.go: go-bindata -pkg main -o $@ tomato-icon.png