Makefile
changeset 54 db527181a90f
parent 53 d08f47fd8542
equal deleted inserted replaced
53:d08f47fd8542 54:db527181a90f
     1 # Makefile
       
     2 DESTDIR = 
       
     3 prefix = /usr/local
       
     4 sbindir = ${prefix}/sbin
       
     5 man8dir = ${prefix}/share/man/man8
       
     6 initdir = /etc/init.d
       
     7 defaultdir = /etc/default
       
     8 
       
     9 all:	tele-watch tele-watch.8.gz init.d default
       
    10 install: all
       
    11 	install -m 0755 -d ${DESTDIR}${sbindir}
       
    12 	install -m 0755 tele-watch ${DESTDIR}${sbindir}/
       
    13 
       
    14 	install -m 0755 -d ${DESTDIR}${man8dir}
       
    15 	install -m 0644 tele-watch.8.gz ${DESTDIR}${man8dir}
       
    16 
       
    17 	-tools/unchanged ${DESTDIR}${initdir}/tele-watch \
       
    18 	&& install -m 0755 init.d ${DESTDIR}${initdir}/tele-watch
       
    19 
       
    20 	-tools/unchanged ${DESTDIR}${defaultdir}/tele-watch \
       
    21 	&& install -m 0644 default ${DESTDIR}${defaultdir}/tele-watch
       
    22 
       
    23 clean:
       
    24 	-rm -f tele-watch.8.gz tele-watch default init.d
       
    25 
       
    26 %:	%.in
       
    27 	perl -pe 's{__sbindir__}{${sbindir}}g' <$< >$@
       
    28 	echo "# `sha1sum $@`" >>$@
       
    29 
       
    30 %:	%.pl
       
    31 	perl -c $<
       
    32 	cp -f $< $@
       
    33 	perl -i -pe 's/<VERSION>/`hg id -it`/e' $@
       
    34 	chmod a+x-w $@
       
    35 
       
    36 %.gz:	%
       
    37 	gzip -f $<
       
    38 
       
    39 %.8:	%
       
    40 	pod2man --section 8 $< >$@
       
    41