From 55eb3794fb4ad563102d5ab30c1d5337a599b2e5 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Tue, 25 Mar 2008 14:06:05 +0000 Subject: Rework our folder structure so that we don't have OS specific dirs, making it easier to share init and conf files per OS. --- mk/scripts.mk | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'mk') diff --git a/mk/scripts.mk b/mk/scripts.mk index 146b56a5..1bb5662b 100644 --- a/mk/scripts.mk +++ b/mk/scripts.mk @@ -16,29 +16,32 @@ SED_REPLACE= -e 's:@SHELL@:${SH}:g' -e 's:@LIB@:${LIBNAME}:g' -e 's:@SYSCONFDIR # Tweak our shell scripts .SUFFIXES: .sh.in .in .sh.in.sh: - sed ${SED_REPLACE} $< > $@ + sed ${SED_REPLACE} ${SED_EXTRA} $< > $@ .in: - sed ${SED_REPLACE} $< > $@ + sed ${SED_REPLACE} ${SED_EXTRA} $< > $@ all: ${OBJS} realinstall: ${BIN} ${CONF} ${CONF_APPEND} - if test -n "${DIR}"; then ${INSTALL} -d ${DESTDIR}/${PREFIX}${DIR} || exit $$?; fi - if test -n "${BIN}"; then ${INSTALL} -m ${BINMODE} ${BIN} ${DESTDIR}/${PREFIX}${DIR} || exit $$?; fi - if test -n "${INC}"; then ${INSTALL} -m ${INCMODE} ${INC} ${DESTDIR}/${PREFIX}${DIR} || exit $$?; fi - for x in ${CONF}; do \ - if ! test -e ${DESTDIR}/${PREFIX}${DIR}/$$x; then \ + @if test -n "${DIR}"; then \ + ${ECHO} ${INSTALL} -d ${DESTDIR}/${PREFIX}${DIR}; \ + ${INSTALL} -d ${DESTDIR}/${PREFIX}${DIR} || exit $$?; \ + fi + @if test -n "${BIN}"; then \ + ${ECHO} ${INSTALL} -m ${BINMODE} ${BIN} ${DESTDIR}/${PREFIX}${DIR}; \ + ${INSTALL} -m ${BINMODE} ${BIN} ${DESTDIR}/${PREFIX}${DIR} || exit $$?; \ + fi + @if test -n "${INC}"; then \ + ${ECHO} ${INSTALL} -m ${INCMODE} ${INC} ${DESTDIR}/${PREFIX}${DIR}; \ + ${INSTALL} -m ${INCMODE} ${INC} ${DESTDIR}/${PREFIX}${DIR} || exit $$?; \ + fi + @for x in ${CONF}; do \ + if ! test -e ${DESTDIR}/${PREFIX}${DIR}/$$x; then \ + ${ECHO} ${INSTALL} -m ${CONFMODE} $$x ${DESTDIR}/${PREFIX}${DIR}; \ ${INSTALL} -m ${CONFMODE} $$x ${DESTDIR}/${PREFIX}${DIR} || exit $$?; \ fi; \ done - for x in ${CONF_APPEND}; do \ - if test -e ${DESTDIR}/${PREFIX}${DIR}/$$x; then \ - cat $$x >> ${DESTDIR}/${PREFIX}${DIR}/$$x || exit $$?; \ - else \ - ${INSTALL} -m ${CONFMODE} $$x ${DESTDIR}/${PREFIX}${DIR} || exit $$?; \ - fi; \ - done install: all realinstall ${INSTALLAFTER} -- cgit v1.2.3