summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2013-08-25 22:34:45 (GMT)
committer Peter Korsgaard <jacmet@sunsite.dk>2013-08-25 22:34:45 (GMT)
commitf627ebeb79930e00b25eb376554ff2b68cd077c5 (patch)
tree47e61983650c87eca21ebecaaa3e873f220af861
parentfde2605765fd99565ebcde48c5411a69646c2cce (diff)
downloadbuildroot-f627ebeb79930e00b25eb376554ff2b68cd077c5.tar.gz
buildroot-f627ebeb79930e00b25eb376554ff2b68cd077c5.tar.bz2
Makefile: fix kernel modules test
Commit fde2605765f (Makefile: test before search for kernel modules) changed the way we strip kernel modules, but it fails when modules aren't available (as test -d returns with a non zero exit code). Fix it by including the test -d call in a proper shell conditional. Reported-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 9f0164e..ca7b039 100644
--- a/Makefile
+++ b/Makefile
@@ -476,9 +476,9 @@ ifeq ($(BR2_PACKAGE_PYTHON_PYC_ONLY),y)
find $(TARGET_DIR)/usr/lib/ -name '*.py' -print0 | xargs -0 rm -f
endif
$(STRIP_FIND_CMD) | xargs $(STRIPCMD) 2>/dev/null || true
- test -d $(TARGET_DIR)/lib/modules && \
+ if test -d $(TARGET_DIR)/lib/modules; then \
find $(TARGET_DIR)/lib/modules -type f -name '*.ko' | \
- xargs -r $(KSTRIPCMD)
+ xargs -r $(KSTRIPCMD); fi
# See http://sourceware.org/gdb/wiki/FAQ, "GDB does not see any threads
# besides the one in which crash occurred; or SIGTRAP kills my program when