summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2016-03-05 21:31:14 +0100
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2016-03-05 21:31:14 +0100
commit8a17f05d00a3a09e0dac6eaf9e8b2cbc0c2dff25 (patch)
tree53b1579c6ff7a34c0be848f566dfb329951b0abc
parentdc421436ee57a94b3ca250d68e37dca28eccbf6f (diff)
fix build when no modules selected
-rw-r--r--target/Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/target/Makefile b/target/Makefile
index 2ca5db6ad..68254867b 100644
--- a/target/Makefile
+++ b/target/Makefile
@@ -4,6 +4,8 @@
include $(ADK_TOPDIR)/rules.mk
include $(ADK_TOPDIR)/mk/rootfs.mk
+KERNEL_MODULES_USED:=$(shell grep ^ADK_KERNEL $(ADK_TOPDIR)/.config|grep =m)
+
all: install
### Kernel .config Creation
@@ -145,11 +147,13 @@ clean: $(ADK_TARGET_ARCH)-clean $(ADK_TARGET_ARCH)-imageclean
%-imageprepare:
$(START_TRACE) "target/$(patsubst %-imageprepare,%,$@)-imageprepare.. "
ifeq ($(ADK_RUNTIME_DEV_UDEV),y)
+ifneq ($(KERNEL_MODULES_USED),)
# This should be made a package instead
- $(CP) -a $(BUILD_DIR)/linux-$(ADK_TARGET_ARCH)/modules/lib $(TARGET_DIR)
+ $(CP) $(BUILD_DIR)/linux-$(ADK_TARGET_ARCH)/modules/lib $(TARGET_DIR)
rm -f "$(TARGET_DIR)"/lib/modules/*/build \
"$(TARGET_DIR)"/lib/modules/*/source
endif
+endif
@for x in $$(ls $(ADK_TOPDIR)/scripts/preimage/*.sh 2>/dev/null); do \
[[ -x "$$x" ]] && $$x; \
break; \