From: Martin Schwenke Date: Mon, 29 Mar 2010 00:40:33 +0000 (+1100) Subject: Makefile: Make dist target and associated generated targets more robust. X-Git-Tag: autocluster-0.5~151 X-Git-Url: http://git.samba.org/samba.git/?p=autocluster.git;a=commitdiff_plain;h=d7c3cdef9b6f3d586fb370241544580adb19f4da Makefile: Make dist target and associated generated targets more robust. In the version, use the date from the last git commit rather than the current date. This means that debian/changelog and autocluster.spec can be more reliably generated. Signed-off-by: Martin Schwenke --- diff --git a/Makefile b/Makefile index ffca35c..09afb0d 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -version = 0.1.$$(date '+%Y%m%d').$$(git log --pretty='format:%h' -1) +version = 0.1.$$(git log --pretty='format:%ad.%h' --date=short -1) prefix = /usr/local datadir = ${prefix}/share/autocluster @@ -22,10 +22,10 @@ install: all install -m 755 vircmd waitfor $(DESTDIR)$(bindir) install -m 755 autocluster.hack $(DESTDIR)$(bindir)/autocluster -debian/changelog: debian/changelog.in Makefile +debian/changelog: debian/changelog.in Makefile .git/refs/heads/master sed -e "s/@@DATE@@/$$(date '+%a, %e %b %Y %T %z')/" -e "s/@@VERSION@@/$(version)/" $< > $@ || rm -f $@ -autocluster.spec: autocluster.spec.in Makefile +autocluster.spec: autocluster.spec.in Makefile .git/refs/heads/master sed -e "s/@@VERSION@@/$(version)/" $< > $@ || rm -f $@ dist: $(genpkg)