diff options
author | William Hubbs <williamh@gentoo.org> | 2011-02-02 12:10:58 -0600 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2011-02-04 17:46:57 -0600 |
commit | 19037cbd83ee46f2c3510925c83cc89d27d16ac6 (patch) | |
tree | b7bbd7d4063fed3cc892da2e994b3b35ea8ae19f /src | |
parent | 21c5a022af22f9baddc14953ca5ac39715a9a649 (diff) |
remove unnecessary shell calls
The main makefile, init.d/Makefile and src/librc/Makefile all contain
several shell calls which can be handled as make conditionals. This
switches them to conditionals.
Diffstat (limited to 'src')
-rw-r--r-- | src/librc/Makefile | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/src/librc/Makefile b/src/librc/Makefile index eb6f6fdc..574aa2af 100644 --- a/src/librc/Makefile +++ b/src/librc/Makefile @@ -19,20 +19,25 @@ SED_CMD= -e 's:@PREFIX@:${PREFIX}:g' SED_CMD+= -e 's:@LIB@:${LIBNAME}:g' SED_CMD+= -e 's:@SYSCONFDIR@:${SYSCONFDIR}:g' SED_CMD+= -e 's:@LIBEXECDIR@:${LIBEXECDIR}:g' -_PKG_PREFIX_SH= if test -n "${PKG_PREFIX}" && test "${PKG_PREFIX}" != "/" && test "${PKG_PREFIX}" != "${PREFIX}"; then \ - echo "-e 's:@PKG_PREFIX@:${PKG_PREFIX}:g'"; \ - else \ - echo "-e 's:.*@PKG_PREFIX@.*:\#undef RC_PKG_PREFIX:g'"; \ - fi -_PKG_PREFIX:= $(shell ${_PKG_PREFIX_SH}) + +_PKG_PREFIX= -e 's:.*@PKG_PREFIX@.*:\#undef RC_PKG_PREFIX:g' +ifneq (${PKG_PREFIX},) +ifneq (${PKG_PREFIX},/) +ifneq (${PKG_PREFIX},${PREFIX}) +_PKG_PREFIX= -e 's:@PKG_PREFIX@:${PKG_PREFIX}:g' +endif +endif +endif SED_CMD+= ${_PKG_PREFIX} -_LCL_PREFIX_SH= if test -n "${LOCAL_PREFIX}" && test "${LOCAL_PREFIX}" != "/" && test "${LOCAL_PREFIX}" != "${PREFIX}"; then \ - echo "-e 's:@LOCAL_PREFIX@:${LOCAL_PREFIX}:g'"; \ - else \ - echo "-e 's:@LOCAL_PREFIX@::g'"; \ - fi -_LCL_PREFIX:= $(shell ${_LCL_PREFIX_SH}) +_LCL_PREFIX= -e 's:@LOCAL_PREFIX@::g' +ifneq (${LOCAL_PREFIX},) +ifneq (${LOCAL_PREFIX},/) +ifneq (${LOCAL_PREFIX},${PREFIX}) +_LCL_PREFIX= -e 's:@LOCAL_PREFIX@:${LOCAL_PREFIX}:g' +endif +endif +endif SED_CMD+= ${_LCL_PREFIX} .SUFFIXES: .h.in .h |