Makefile.in
changeset 36 8fe32b9da326
parent 16 2b2d175c2403
child 37 8a7d356223a3
equal deleted inserted replaced
35:888e1c15c9fd 36:8fe32b9da326
     7 MAN8PAGE = ftbackup.8
     7 MAN8PAGE = ftbackup.8
     8 
     8 
     9 all:	
     9 all:	
    10 
    10 
    11 
    11 
    12 install:	man all
    12 install:	man .version all
    13 	install -d -m 0755 ${DESTDIR}${sbindir}
    13 	install -d -m 0755 ${DESTDIR}${sbindir}
    14 	install    -m 0755 ${SCRIPT} ${DESTDIR}${sbindir}
    14 	install    -m 0755 ${SCRIPT} ${DESTDIR}${sbindir}
       
    15 	perl -i -pe 's/\<VERSION\>/'`cat .version`'/' ${DESTDIR}${sbindir}/${SCRIPT}
    15 
    16 
    16 	install -d -m 0755 ${DESTDIR}${man8dir}
    17 	install -d -m 0755 ${DESTDIR}${man8dir}
    17 	install    -m 0644 ${MAN8PAGE} ${DESTDIR}${man8dir}/
    18 	install    -m 0644 ${MAN8PAGE} ${DESTDIR}${man8dir}/
    18 
    19 
    19 
    20 
    20 	
    21 	
    21 man:	${MAN8PAGE}
    22 man:	${MAN8PAGE}
    22 
    23 
    23 clean:
    24 clean:
    24 	rm -f ${MAN8PAGE}
    25 	rm -f ${MAN8PAGE} .version
    25 
    26 
    26 distclean:	clean
    27 distclean:	clean
    27 	rm -f Makefile
    28 	rm -f Makefile
    28 
    29 
       
    30 .version:
       
    31 	test -f .hg_archival.txt \
       
    32 		&& { grep ^node: | cut -f2 -d' ' >$@; } \
       
    33 		|| { hg id | cut -f1 -d' ' >$@; }
       
    34 
    29 %.8:	%
    35 %.8:	%
    30 	pod2man --section 8 $< >$@
    36 	pod2man --section 8 $< >$@