]> git.notmuchmail.org Git - notmuch/commitdiff
build system: use $(filter ...) to test MAKECMDGOALS
authorDavid Bremner <bremner@debian.org>
Fri, 18 Nov 2011 02:26:24 +0000 (22:26 -0400)
committerDavid Bremner <bremner@debian.org>
Sat, 19 Nov 2011 14:09:04 +0000 (10:09 -0400)
This makes the test easier to extend to more targets. It also corrects
a bug where "special" targets were only detected when given alone.

Makefile.local

index 8b42136a640b1c80cef40a8829c8e148e7e6650e..10e6668f8786b053e3603b38e8a1f428c19b1bf0 100644 (file)
@@ -13,15 +13,11 @@ PACKAGE=notmuch
 IS_GIT=$(shell if [ -d .git ] ; then echo yes ; else echo no; fi)
 
 VERSION:=$(shell cat ${srcdir}/version)
-ifneq ($(MAKECMDGOALS),release)
-ifneq ($(MAKECMDGOALS),release-message)
-ifneq ($(MAKECMDGOALS),pre-release)
+ifeq ($filter release release-message pre-release,$(MAKECMDGOALS),)
 ifeq ($(IS_GIT),yes)
 VERSION:=$(shell git describe --match '[0-9.]*'|sed -e s/_/~/ -e s/-/+/ -e s/-/~/)
 endif
 endif
-endif
-endif
 
 UPSTREAM_TAG=$(subst ~,_,$(VERSION))
 DEB_TAG=debian/$(UPSTREAM_TAG)-1