aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-07 20:24:25 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-07 20:24:25 -0800
commitc4184f117af7441fb83bc413d2214d92920e0289 (patch)
treed6f77ef7a5fab96f38567c58d88ccdfe0db3fcbc /scripts
parent905adce4094d64a6691df994e424fbf486301adc (diff)
kbuild: make $(checker-shell ) strip spaces around the result
It looks like GNU make version 3.80 (but apparently not 3.81) adds leading whitespace to the result of the checker-shell execution. This strips them off explicitly. Also, don't bother symlinking the output file to /dev/null. It's likely as expensive as just writing the temp-file, and we need to remove it anyway afterwards. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Kbuild.include5
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index d65c40331e6..8d7eabf238c 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -60,17 +60,16 @@ endef
# Usage: option = $(call checker-shell,$(CC)...-o $$OUT,option-ok,otherwise)
# Exit code chooses option. $$OUT is safe location for needless output.
define checker-shell
+ $(strip
$(shell set -e; \
DIR=$(KBUILD_EXTMOD); \
cd $${DIR:-$(objtree)}; \
OUT=$$PWD/.$$$$.null; \
- \
- ln -s /dev/null $$OUT; \
if $(1) >/dev/null 2>&1; \
then echo "$(2)"; \
else echo "$(3)"; \
fi; \
- rm -f $$OUT)
+ rm -f $$OUT))
endef
# as-option