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 INITD=/usr/lib/systemd/system 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 /usr/lib/systemd/system/arlogd-server.service : init.d/arlogd-server @echo "***" installing $< ... cp $< $@ chmod ${RWX} $@ systemctl daemon-reload @echo "***" installing service ... @echo "*** always run arlogd-server : systemctl enable arlogd-server" @echo "*** startup : systemctl start arlogd-server" /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 /usr/lib/systemd/system/arlogd-server.service ; # @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