`# $Id: Makefile.host,v 1.4 2012/07/16 18:51:58 ksb Exp $ # platform recipe for pingstats, msrc 2008 'changequote([,])dnl [Q=' ]changequote(`,') `PROG= pingstats BIN= ${DESTDIR}/usr/local/libexec CVULIB= ${DESTDIR}/var/peg/lib/cvu SRCl= SRCs= pingstats.pl MAN= pingstats.man OTHER= README ping.cvu SOURCE= Makefile ITO.spec ${OTHER} ${MAN} ${SRCl} ${SRCs} all: pingstats # pingstats.rc pingstats.chkconfig site_pingstats.xml pingstats: pingstats.pl perl -p -e ${Q}if (! $$^V) { s#^(use\slib)(\s.*\$$\^V.*?\,)(\n)#$$1$$3#; }${Q} <$@.pl >$@ perl -w -c $@ && chmod +x $@ clean: FRC rm -f Makefile.bak ${PROG} a.out core errs lint.out tags deinstall: FRC install -R ${BIN}/${PROG} depend: FRC dirs: ${BIN} distrib: FRC distrib -c ${BIN}/${PROG} HOST install.rc: all dirs FRC 'ifelse(HOSTTYPE,`FREEBSD', ` install -dr ${DESTDIR}/usr/local/etc/rc.d/ install -c ${PROG}.rc ${DESTDIR}/usr/local/etc/rc.d/', HOSTTYPE,`LINUX', ` install -dr ${DESTDIR}/etc/init.d/ install -c -m 755 pingstats.chkconfig ${DESTDIR}/etc/init.d/pingstats', HOSTTYPE,`SUN5', ` install -dr ${DESTDIR}/usr/local/svc/ install -dr ${DESTDIR}/var/svc/manifest/site/ install -c -m 755 pingstats.chkconfig ${DESTDIR}/usr/local/svc/pingstats install -c -m 644 site_pingstats.xml ${DESTDIR}/var/svc/manifest/site/site_pingstats.xml echo svccfg import ${DESTDIR}/var/svc/manifest/site/site_pingstats.xml', ` false not supported on HOSTTYPE') `install: all dirs FRC install -c ${PROG} ${BIN}/ install.cvu: ping.cvu ${CVULIB} FRC install -cv -m 644 -o sample:sample ping.cvu ${CVULIB}/ping.cvu lint: FRC print: source FRC lpr -J"${PROG} source" ${SOURCE} source: ${SOURCE} spotless: clean rcsclean ${SOURCE} tags: FRC ${DESTDIR}/var/peg/lib/cvu: ${DESTDIR}/var/peg/lib install -d -o sample:sample -m 0755 $@ ${DESTDIR}/var/peg/lib: ${DESTDIR}/var/peg install -d -o sample:sample -m 0755 $@ ${DESTDIR}/var/peg: ${DESTDIR}/var install -d -o root:sample -m 0555 $@ ${BIN}: install -dr $@ ${SOURCE}: co -q $@ FRC: 'dnl