path: root/Makefile
diff options
authorGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2013-08-20 13:03:02 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2013-08-23 20:42:40 +0200
commitfde2605765fd99565ebcde48c5411a69646c2cce (patch)
tree986a7334c1324108b44b3ccbcbc055c71ed3abdc /Makefile
parent467b8d1f694531d77f1c3ce808a424cb8bd0cffe (diff)
Makefile: test before search for kernel modules
The 'find $(TARGET_DIR)/lib/modules' used to find and strip kernel modules fails when no kernel modules have been installed. While the '|| true' prevents the entire build from failing, there are still some error messages displayed, which is not nice. Instead, test if the directory exists before doing the find. We also remove the '|| true' in order to really abort the build if a problematic error occurs. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
Diffstat (limited to 'Makefile')
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 6018d63f69..9f0164ed6c 100644
--- a/Makefile
+++ b/Makefile
@@ -476,8 +476,9 @@ ifeq ($(BR2_PACKAGE_PYTHON_PYC_ONLY),y)
find $(TARGET_DIR)/usr/lib/ -name '*.py' -print0 | xargs -0 rm -f
$(STRIP_FIND_CMD) | xargs $(STRIPCMD) 2>/dev/null || true
- find $(TARGET_DIR)/lib/modules -type f -name '*.ko' | \
- xargs -r $(KSTRIPCMD) || true
+ test -d $(TARGET_DIR)/lib/modules && \
+ find $(TARGET_DIR)/lib/modules -type f -name '*.ko' | \
+ xargs -r $(KSTRIPCMD)
# 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