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-client ${MAN}/arlogd.8.gz tests INIT ${CNFD}: test -d ${CNFD} || mkdir ${CNFD} chmod ${RWX} $@ ${CONF}: touch $@ chmod ${RW} $@ ${RENF}: touch $@ chmod ${RW} $@ ${BIN}/arlogd-client : arlogd-client @echo "***" installing $< ... cp $< $@ chmod ${RWX} $@ ${MAN}/arlogd.8.gz : arlogd.8 @echo "***" installing $< ... gzip -c $< > $@ chmod ${RW} $@ test-dist : @echo "***" running $@ ... @echo "***" testing arlogd-client with -c /dev/null perl arlogd-client -t -c /dev/null tests : @echo "***" running $@ ... @echo "***" testing ${BIN}/arlogd-client -t ${BIN}/arlogd-client -t /usr/lib/systemd/system/arlogd-client.service : init.d/arlogd-client @echo "***" installing $< ... cp $< $@ chmod ${RWX} $@ systemctl daemon-reload @echo "***" installing service ... @echo "*** always run arlogd-client : systemctl enable arlogd-client" @echo "*** startup : systemctl enable arlogd-client" /etc/init/arlogd-client.conf : init/arlogd-client.conf @echo "***" installing $< ... cp $< $@ chmod ${RWX} $@ @echo "*** startup : /sbin/start arlogd-client" @echo "*** stop : /sbin/stop arlogd-client" INIT : ${MAKE} -f install-client.mk /usr/lib/systemd/system/arlogd-client.service ; # @if test -d /etc/init/ ; \ # then ${MAKE} -f install-client.mk /etc/init/arlogd-client.conf ; \ # else ${MAKE} -f install-client.mk /etc/init.d/arlogd-client ; \ # fi