diff -r 888e1c15c9fd -r 8fe32b9da326 Makefile.in --- a/Makefile.in Mon Apr 11 13:09:31 2011 +0200 +++ b/Makefile.in Mon Apr 11 15:37:28 2011 +0200 @@ -9,9 +9,10 @@ all: -install: man all +install: man .version all install -d -m 0755 ${DESTDIR}${sbindir} install -m 0755 ${SCRIPT} ${DESTDIR}${sbindir} + perl -i -pe 's/\/'`cat .version`'/' ${DESTDIR}${sbindir}/${SCRIPT} install -d -m 0755 ${DESTDIR}${man8dir} install -m 0644 ${MAN8PAGE} ${DESTDIR}${man8dir}/ @@ -21,10 +22,15 @@ man: ${MAN8PAGE} clean: - rm -f ${MAN8PAGE} + rm -f ${MAN8PAGE} .version distclean: clean rm -f Makefile +.version: + test -f .hg_archival.txt \ + && { grep ^node: | cut -f2 -d' ' >$@; } \ + || { hg id | cut -f1 -d' ' >$@; } + %.8: % pod2man --section 8 $< >$@