On Thu, Feb 06, 2014 at 12:58:33AM +0200, Tomi Ollila wrote: > -VERSION:=$(shell git describe --match '[0-9.]*'|sed -e s/_/~/ -e s/-/+/ -e s/-/~/) > +# Also write VERSION file in case its contents differ from $(VERSION) > +VERSION:=$(shell\ > + gv=`git describe --match '[0-9.]*'|sed -e s/_/~/ -e s/-/+/ -e s/-/~/`;\ Ew, backticks ;). What about handling more of the logic in Make: VERSION := $(shell git describe …) FILE_VERSION := $(shell test -f VERSION || touch VERSION; cat VERSION) ifneq ($(FILE_VERSION), $(VERSION)) $(shell echo "$(VERSION)" > VERSION) endif > +# Depend (also) on 'version' file. In case of ifeq ($(IS_GIT),yes) > +# this file may already have been updated. > +VERSION: version > + echo $(VERSION) > $@ Do we care about case-insensitive filesystems where VERSION will collide with version? > -CLEAN := $(CLEAN) notmuch notmuch-shared $(notmuch_client_modules) notmuch.elc > +CLEAN := $(CLEAN) VERSION notmuch notmuch-shared $(notmuch_client_modules) Where did notmuch.elc go? Cheers, Trevor -- This email may be signed or encrypted with GnuPG (http://www.gnupg.org). For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy