Makefile
changeset 19 df3ab24a3069
parent 15 d7e673f7e596
child 20 47d98dab743e
--- a/Makefile	Fri Nov 05 07:10:18 2010 +0100
+++ b/Makefile	Fri Nov 05 08:40:53 2010 +0100
@@ -23,5 +23,9 @@
 	done ;\
 	test $$rc = 0
 	@perl -c $<
-	@cp -f $< $@
+	@test -f .hg_archival.txt \
+	    && version=`grep ^node: | cut -f2 -d ' ' .hg_archival.txt` ;\
+	    version=`hg id | cut -f1 -d' '` ;\
+	perl -pe 's/__VERSION__/'$$version'/' $< >$<.tmp
+	@mv -f $<.tmp $@
 	@chmod +x-w $@