BIN=/usr/sbin MAN=/usr/share/man/man8 ETC=/etc CNFD=${ETC}/arlogd CONF=${ETC}/arlogd/conf RENF=${ETC}/arlogd/renames ETCS=${CNFD} ${CONF} ${RENF} INITD=/etc/init.d RWX=u=rwx,go-w RW=u=rw,go-w all: test-dist ${ETCS} ${BIN}/arlogd-server ${MAN}/arlogd.8.gz tests INIT ${CNFD}: test -d ${CNFD} || mkdir ${CNFD} chmod ${RWX} $@ ${CONF}: touch $@ chmod ${RW} $@ ${RENF}: touch $@ chmod ${RW} $@ ${BIN}/arlogd-server : arlogd-server @echo "***" installing $< ... cp $< $@ chmod ${RWX} $@ ${MAN}/arlogd.8.gz : arlogd.8 @echo "***" installing $< ... gzip -c $< > $@ chmod ${RW} $@ test-dist : @echo "***" running $@ ... @echo "***" testing arlogd-server with -c /dev/null perl arlogd-server -t -c /dev/null tests : @echo "***" running $@ ... @echo "***" testing ${BIN}/arlogd-server -t ${BIN}/arlogd-server -t /etc/init.d/arlogd-server : init.d/arlogd-server @echo "***" installing $< ... cp $< $@ chmod ${RWX} $@ @echo "***" installing service ... @if chkconfig --list arlogd-server >/dev/null 2>&1 ; \ then echo "service already added" ; \ else chkconfig --add arlogd-server ; \ fi @echo "*** always run arlogd-server : chkconfig arlogd-server on" @echo "*** startup : service arlogd-server start" /etc/init/arlogd-server.conf : init/arlogd-server.conf @echo "***" installing $< ... cp $< $@ chmod ${RWX} $@ @echo "*** startup : /sbin/start arlogd-server" @echo "*** stop : /sbin/stop arlogd-server" INIT : ${MAKE} -f install-server.mk /etc/init.d/arlogd-server ; # @if test -d /etc/init/ ; \ # then ${MAKE} -f install-server.mk /etc/init/arlogd-server.conf ; \ # else ${MAKE} -f install-server.mk /etc/init.d/arlogd-server ; \ # fi