aboutsummaryrefslogtreecommitdiff
path: root/mk/scripts.mk
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-03-25 14:06:05 +0000
committerRoy Marples <roy@marples.name>2008-03-25 14:06:05 +0000
commit55eb3794fb4ad563102d5ab30c1d5337a599b2e5 (patch)
tree0d052faeb050c1e18ba56f6f6189bff3ffca28c9 /mk/scripts.mk
parent08aff6ef44ac5dc438d916b53aa61385f6d299f3 (diff)
Rework our folder structure so that we don't have OS specific dirs, making it easier to share init and conf files per OS.
Diffstat (limited to 'mk/scripts.mk')
-rw-r--r--mk/scripts.mk31
1 files changed, 17 insertions, 14 deletions
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}