Makefile
changeset 26 9e1b9eb8813f
parent 14 9da9fe83c77c
child 24 7af7f159f987
child 25 2991839e05e9
child 27 7cd07b3153b3
--- a/Makefile	Fri Mar 13 10:44:57 2009 +0100
+++ b/Makefile	Fri Mar 13 11:33:39 2009 +0100
@@ -2,8 +2,10 @@
 prefix = /usr/local
 sbindir = ${prefix}/sbin
 man8dir = ${prefix}/share/man/man8
+initdir = /etc/init.d
+defaultdir = /etc/default
 
-all:	tele-watch tele-watch.8.gz
+all:	tele-watch tele-watch.8.gz init.d
 install: all
 	install -m 0755 -d ${DESTDIR}${sbindir}
 	install -m 0755 tele-watch ${DESTDIR}${sbindir}/
@@ -11,9 +13,17 @@
 	install -m 0755 -d ${DESTDIR}${man8dir}
 	install -m 0644 tele-watch.8.gz ${DESTDIR}${man8dir}
 
+	#test -f ${DESTDIR}${initdir}/tele-watcher \
+	#|| install -m 0755 init.d ${DESTDIR}${initdir}/tele-watcher
+	#test -f ${DESTDIR}${defaultdir}/tele-watcher \
+	#|| install -m 0644 default ${DESTDIR}${defaultdir}/tele-watcher
+
 clean:
 	-rm -f tele-watch.8.gz tele-watch
 
+%:	%.in
+	perl -pe 's{__sbindir__}{${sbindir}}g' <$< >$@
+
 %:	%.pl
 	perl -c $<
 	cp -f $< $@