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
This commit is contained in:
Christos Kontas 2018-02-01 09:53:16 +01:00
parent ab24f88a59
commit 1bb38796ad
1 changed files with 1 additions and 2 deletions

View File

@ -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