aboutsummaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorWilliam Hubbs <williamh@gentoo.org>2011-01-29 17:32:38 -0600
committerWilliam Hubbs <williamh@gentoo.org>2011-01-31 14:05:57 -0600
commitcca7e9f7e1143f3405bc90ff8e2176d82ab491ef (patch)
tree63fee486bd9b9729b7defc66577daae1fddc1c1b /mk
parentc2529c1ed61816799dd56bb46699b2b8cf5acb39 (diff)
use immediate evaluation for shell calls
This reworks the shell calls in the makefiles to use immediate evaluation and should improve parallel building. X-Gentoo-Bug: 289264 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=289264
Diffstat (limited to 'mk')
-rw-r--r--mk/cc.mk8
-rw-r--r--mk/debug.mk12
-rw-r--r--mk/dist.mk4
-rw-r--r--mk/git.mk4
-rw-r--r--mk/os.mk4
-rw-r--r--mk/prog.mk4
-rw-r--r--mk/scripts.mk6
-rw-r--r--mk/sys.mk8
8 files changed, 25 insertions, 25 deletions
diff --git a/mk/cc.mk b/mk/cc.mk
index 2c912d5c..74a816e9 100644
--- a/mk/cc.mk
+++ b/mk/cc.mk
@@ -6,8 +6,8 @@ CFLAGS?= -O2
# Default to using the C99 standard
CSTD?= c99
_CSTD_SH= if test -n "${CSTD}"; then echo "-std=${CSTD}"; else echo ""; fi
-_CSTD!= ${_CSTD_SH}
-CFLAGS+= ${_CSTD}$(shell ${_CSTD_SH})
+_CSTD:= $(shell ${_CSTD_SH})
+CFLAGS+= ${_CSTD}
# Try and use some good cc flags if we're building from git
# We don't use -pedantic as it will warn about our perfectly valid
@@ -29,5 +29,5 @@ _CC_FLAGS_SH= for f in ${_CCFLAGS}; do \
${CC} $$f -S -xc -o /dev/null - ; \
then printf "%s" "$$f "; fi \
done;
-_CC_FLAGS!= ${_CC_FLAGS_SH}
-CFLAGS+= ${_CC_FLAGS}$(shell ${_CC_FLAGS_SH})
+_CC_FLAGS:= $(shell ${_CC_FLAGS_SH})
+CFLAGS+= ${_CC_FLAGS}
diff --git a/mk/debug.mk b/mk/debug.mk
index 67e9ad1a..bc98b585 100644
--- a/mk/debug.mk
+++ b/mk/debug.mk
@@ -3,14 +3,14 @@
# All rights reserved. Released under the 2-clause BSD license.
_RC_DEBUG_SH= case "${DEBUG}" in "") echo "";; *) echo "-DRC_DEBUG";; esac
-_RC_DEBUG!= ${_RC_DEBUG_SH}
-CPPFLAGS+= ${_RC_DEBUG}$(shell ${_RC_DEBUG_SH})
+_RC_DEBUG:= $(shell ${_RC_DEBUG_SH})
+CPPFLAGS+= ${_RC_DEBUG}
# Should we enable this with a different flag?
_LD_DEBUG_SH= case "${DEBUG}" in "") echo "";; *) echo "-Wl,--rpath=../librc -Wl,--rpath=../libeinfo";; esac
-_LD_DEBUG!= ${_LD_DEBUG_SH}
-LDFLAGS+= ${_LD_DEBUG}$(shell ${_LD_DEBUG_SH})
+_LD_DEBUG:= $(shell ${_LD_DEBUG_SH})
+LDFLAGS+= ${_LD_DEBUG}
_GGDB_SH= case "${DEBUG}" in "") echo "";; *) echo "-ggdb";; esac
-_GGDB!= ${_GGDB_SH}
-CFLAGS+= ${_GGDB}$(shell ${_GGDB_SH})
+_GGDB:= $(shell ${_GGDB_SH})
+CFLAGS+= ${_GGDB}
diff --git a/mk/dist.mk b/mk/dist.mk
index 7c8d9c10..fb58edce 100644
--- a/mk/dist.mk
+++ b/mk/dist.mk
@@ -9,8 +9,8 @@ DISTFILE?= ${DISTPREFIX}.tar.bz2
CLEANFILES+= ${NAME}-*.tar.bz2
_SNAP_SH= date -u +%Y%m%d%H%M
-_SNAP!= ${_SNAP_SH}
-SNAP= ${_SNAP}$(shell ${_SNAP_SH})
+_SNAP:= $(shell ${_SNAP_SH})
+SNAP= ${_SNAP}
SNAPDIR= ${DISTPREFIX}-${SNAP}
SNAPFILE= ${SNAPDIR}.tar.bz2
diff --git a/mk/git.mk b/mk/git.mk
index 54a98ef4..62cae5a4 100644
--- a/mk/git.mk
+++ b/mk/git.mk
@@ -4,5 +4,5 @@ _GITVER_SH= if git rev-parse --short HEAD >/dev/null 2>&1; then \
else \
echo ""; \
fi
-_GITVER!= ${_GITVER_SH}
-GITVER= ${_GITVER}$(shell ${_GITVER_SH})
+_GITVER:= $(shell ${_GITVER_SH})
+GITVER= ${_GITVER}
diff --git a/mk/os.mk b/mk/os.mk
index 09f2aef9..0cde8ae8 100644
--- a/mk/os.mk
+++ b/mk/os.mk
@@ -4,8 +4,8 @@
# Generic definitions
_OS_SH= uname -s
-_OS!= ${_OS_SH}
-OS?= ${_OS}$(shell ${_OS_SH})
+_OS:= $(shell ${_OS_SH})
+OS?= ${_OS}
include ${MK}/os-${OS}.mk
RC_LIB= /$(LIBNAME)/rc
diff --git a/mk/prog.mk b/mk/prog.mk
index 76227e78..5bddf186 100644
--- a/mk/prog.mk
+++ b/mk/prog.mk
@@ -15,8 +15,8 @@ _DYNLINK_SH= if test "${PREFIX}" = "" && test -e /libexec/ld.elf_so; then \
else \
echo ""; \
fi
-_DYNLINK!= ${_DYNLINK_SH}
-LDFLAGS+= ${_DYNLINK}$(shell ${_DYNLINK_SH})
+_DYNLINK:= $(shell ${_DYNLINK_SH})
+LDFLAGS+= ${_DYNLINK}
LDFLAGS+= -Wl,-rpath=${PREFIX}/${LIBNAME}
LDFLAGS+= ${PROGLDFLAGS}
diff --git a/mk/scripts.mk b/mk/scripts.mk
index bd7ec6bb..3517aabf 100644
--- a/mk/scripts.mk
+++ b/mk/scripts.mk
@@ -8,11 +8,11 @@ include ${MK}/os.mk
OBJS+= ${SRCS:.in=}
_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}
+_PKG_SED:= $(shell ${_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}
+_LCL_SED:= $(shell ${_LCL_SED_SH})
-SED_REPLACE= -e 's:@SHELL@:${SH}:g' -e 's:@LIB@:${LIBNAME}:g' -e 's:@SYSCONFDIR@:${SYSCONFDIR}:g' -e 's:@LIBEXECDIR@:${LIBEXECDIR}:g' -e 's:@PREFIX@:${PREFIX}:g' ${_PKG_SED}$(shell ${_PKG_SED_SH}) ${_LCL_SED}$(shell ${_LCL_SED_SH})
+SED_REPLACE= -e 's:@SHELL@:${SH}:g' -e 's:@LIB@:${LIBNAME}:g' -e 's:@SYSCONFDIR@:${SYSCONFDIR}:g' -e 's:@LIBEXECDIR@:${LIBEXECDIR}:g' -e 's:@PREFIX@:${PREFIX}:g' ${_PKG_SED} ${_LCL_SED}
# Tweak our shell scripts
.SUFFIXES: .sh.in .in
diff --git a/mk/sys.mk b/mk/sys.mk
index e9bbf602..b68afdbf 100644
--- a/mk/sys.mk
+++ b/mk/sys.mk
@@ -12,8 +12,8 @@ SH= /bin/sh
PREFIX?=
_UPREFIX_SH= case "${PREFIX}" in "") echo /usr;; *) echo "${PREFIX}";; esac
-_UPREFIX!= ${_UPREFIX_SH}
-UPREFIX= ${_UPREFIX}$(shell ${_UPREFIX_SH})
+_UPREFIX:= $(shell ${_UPREFIX_SH})
+UPREFIX= ${_UPREFIX}
LOCAL_PREFIX= /usr/local
PICFLAG?= -fPIC
@@ -30,8 +30,8 @@ INCDIR?= ${UPREFIX}/include
INCMODE?= 0444
_LIBNAME_SH= case `readlink /lib` in /lib64|lib64) echo "lib64";; *) echo "lib";; esac
-_LIBNAME!= ${_LIBNAME_SH}
-LIBNAME?= ${_LIBNAME}$(shell ${_LIBNAME_SH})
+_LIBNAME:= $(shell ${_LIBNAME_SH})
+LIBNAME?= ${_LIBNAME}
LIBDIR?= ${UPREFIX}/${LIBNAME}
LIBMODE?= 0444
SHLIBDIR?= ${PREFIX}/${LIBNAME}