aboutsummaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-03-20 17:52:07 +0000
committerRoy Marples <roy@marples.name>2008-03-20 17:52:07 +0000
commite598b7d2cdca96468a6511ccb0a0e895d3750d86 (patch)
treeaa2afa7b9699adaee858f3b9c816d30a2e04fc11 /mk
parentec2d39d024b6efcf4c20ad27f664af9289230292 (diff)
Tweak install.
Diffstat (limited to 'mk')
-rw-r--r--mk/os.mk2
-rw-r--r--mk/scripts.mk9
2 files changed, 7 insertions, 4 deletions
diff --git a/mk/os.mk b/mk/os.mk
index 7993820b..73faf43c 100644
--- a/mk/os.mk
+++ b/mk/os.mk
@@ -17,6 +17,6 @@ _PKG_PREFIX_SH= if test -n "${PKG_PREFIX}" && test "${PKG_PREFIX}" != "/" && tes
_PKG_PREFIX!= ${_PKG_PREFIX_SH}
CFLAGS+= ${_PKG_PREFIX}$(shell ${_PKG_PREFIX_SH})
-_LCL_PREFIX_SH= if test -n "${LOCAL_PREFIX}" && test "${LOCAL_PREFIX}" != "/"; then echo "-DLOCAL_PREFIX=\\\"${LOCAL_PREFIX}\\\""; else echo ""; fi
+_LCL_PREFIX_SH= if test -n "${LOCAL_PREFIX}" && test "${LOCAL_PREFIX}" != "/" && test "${LOCAL_PREFIX}" != "${PREFIX}"; then echo "-DLOCAL_PREFIX=\\\"${LOCAL_PREFIX}\\\""; else echo ""; fi
_LCL_PREFIX!= ${_LCL_PREFIX_SH}
CFLAGS+= ${_LCL_PREFIX}$(shell ${_LCL_PREFIX_SH})
diff --git a/mk/scripts.mk b/mk/scripts.mk
index ce3b25aa..5404e952 100644
--- a/mk/scripts.mk
+++ b/mk/scripts.mk
@@ -6,9 +6,12 @@ include ${MK}/os.mk
OBJS+= ${SRCS:.in=}
-_SED_PREFIX_SH= if test "${PREFIX}" = "${PKG_PREFIX}"; then echo "-e 's:@PKG_PREFIX@::g'"; else echo "-e 's:@PKG_PREFIX@:${PKG_PREFIX}:g'"; fi
-_SED_PREFIX!= ${_SED_PREFIX_SH}
-SED_REPLACE= -e 's:@SHELL@:${SH}:g' -e 's:@LIB@:${LIBNAME}:g' -e 's:@SYSCONFDIR@:${SYSCONFDIR}:g' -e 's:@PREFIX@:${PREFIX}:g' ${_SED_PREFIX}$(shell ${_SED_PREFIX_SH}) -e 's:@LOCAL_PREFIX@:${LOCAL_PREFIX}:g'
+_PKG_SED_SH= if test "${PREFIX}" = "${PKG_PREFIX}"; then echo "-e 's:@PKG_PREFIX@::g'"; else echo "-e 's:@PKG_PREFIX@:${PKG_PREFIX}:g'"; fi
+_PKG_SED!= ${_PKG_SED_SH}
+_LCL_SED_SH= if test "${PREFIX}" = "${LOCAL_PREFIX}"; then echo "-e 's:@LOCAL_PREFIX@::g'"; else echo "-e 's:@LOCAL_PREFIX@:${LOCAL_PREFIX}:g'"; fi
+_LCL_SED!= ${_LCL_SED_SH}
+
+SED_REPLACE= -e 's:@SHELL@:${SH}:g' -e 's:@LIB@:${LIBNAME}:g' -e 's:@SYSCONFDIR@:${SYSCONFDIR}:g' -e 's:@PREFIX@:${PREFIX}:g' ${_PKG_SED}$(shell ${_PKG_SED_SH}) ${_LCL_SED}$(shell ${_LCL_SED_SH})
# Tweak our shell scripts
.SUFFIXES: .sh.in .in