commit 2fbb0b5149234cf9b651e79c9417c6d56f4ff4c9 parent 791f613e781c70042acbf05b397e6580853ef30e Author: Cem Keylan <cem@ckyln.com> Date: Sat, 4 Jul 2020 00:35:03 +0300 Makefile: update Diffstat:
M | Makefile | | | 34 | ++++++++++++++++++++++++++-------- |
1 file changed, 26 insertions(+), 8 deletions(-)
diff --git a/Makefile b/Makefile @@ -3,18 +3,36 @@ PREFIX = /usr/local BINDIR = ${PREFIX}/bin SHAREDIR = ${PREFIX}/share MANPREFIX = ${SHAREDIR}/man +MAN1 = ${MANPREFIX}/man1 +MAN8 = ${MANPREFIX}/man8 LINK = runsyssv svctl -install: - install -Dm755 -t ${DESTDIR}${BINDIR} sysmgr utils/sysmgr-needs +all: utils + +utils: + ${MAKE} -C utils + +install: all + mkdir -p ${DESTDIR}${BINDIR} ${DESTDIR}${MAN1} ${DESTDIR}${MAN8} + cp sysmgr utils/sysmgr-need ${DESTDIR}${BINDIR} + chmod 755 ${DESTDIR}${BINDIR}/sysmgr + chmod 755 ${DESTDIR}${BINDIR}/sysmgr-needs for link in ${LINK} ; do ln -sf sysmgr ${DESTDIR}${BINDIR}/$$link ; done - install -Dm644 -t ${DESTDIR}${MANPREFIX}/man1 man/svctl.1 - install -Dm644 -t ${DESTDIR}${MANPREFIX}/man8 man/sysmgr.8 + cp man/svctl.1 ${DESTDIR}${MAN1} + cp man/sysmgr.8 ${DESTDIR}${MAN8} + chmod 644 ${DESTDIR}${MAN1}/svctl.1 + chmod 644 ${DESTDIR}${MAN8}/sysmgr.8 uninstall: - rm -f ${DESTDIR}${BINDIR}/sysmgr ${DESTDIR}${BINDIR}/sysmgr-needs - for link in ${LINK} ; do unlink ${DESTDIR}${BINDIR}/$$link ; done - rm -f \ - ${DESTDIR}${MANPREFIX}/man1/svctl.1 \ + rm -f ${DESTDIR}${BINDIR}/sysmgr \ + ${DESTDIR}${BINDIR}/sysmgr-needs \ + ${DESTDIR}${BINDIR}/svctl \ + ${DESTDIR}${BINDIR}/runsyssv + rm -f ${DESTDIR}${MANPREFIX}/man1/svctl.1 \ ${DESTDIR}${MANPREFIX}/man8/sysmgr.8 + +clean: + ${MAKE} -C utils clean + +.PHONY: all utils install uninstall clean