Commit fde26057 authored by Thomas Petazzoni's avatar Thomas Petazzoni
Browse files

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: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: default avatarLuca Ceresoli <luca@lucaceresoli.net>
parent 467b8d1f
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -476,8 +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 && \
		find $(TARGET_DIR)/lib/modules -type f -name '*.ko' | \
		xargs -r $(KSTRIPCMD) || true
		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