Add isdn4linux and gigaset kernel modules.
[openwrt/openwrt.git] / include / target.mk
index 7351794dce9d6601ed72561a20a82a5aab1955cf..ace3db0ffde3e9bde5ce7504320ee1f78ac4aa05 100644 (file)
@@ -40,9 +40,11 @@ TARGETID:=$(BOARD)$(if $(SUBTARGET),/$(SUBTARGET))
 PLATFORM_SUBDIR:=$(PLATFORM_DIR)$(if $(SUBTARGET),/$(SUBTARGET))
 
 ifneq ($(TARGET_BUILD),1)
-  include $(PLATFORM_DIR)/Makefile
-  ifneq ($(PLATFORM_DIR),$(PLATFORM_SUBDIR))
-    include $(PLATFORM_SUBDIR)/target.mk
+  ifndef DUMP
+    include $(PLATFORM_DIR)/Makefile
+    ifneq ($(PLATFORM_DIR),$(PLATFORM_SUBDIR))
+      include $(PLATFORM_SUBDIR)/target.mk
+    endif
   endif
 else
   ifneq ($(SUBTARGET),)
@@ -102,10 +104,12 @@ endif
 
 $(eval $(call shexport,Target/Description))
 
-include $(INCLUDE_DIR)/kernel-version.mk
+ifneq ($(TARGET_BUILD)$(if $(DUMP),,1),)
+  include $(INCLUDE_DIR)/kernel-version.mk
+endif
 
 GENERIC_PLATFORM_DIR := $(TOPDIR)/target/linux/generic-$(KERNEL)
-GENERIC_PATCH_DIR := $(GENERIC_PLATFORM_DIR)/patches$(shell [ -d "$(GENERIC_PLATFORM_DIR)/patches-$(KERNEL_PATCHVER)" ] && printf -- "-$(KERNEL_PATCHVER)" || true )
+GENERIC_PATCH_DIR := $(GENERIC_PLATFORM_DIR)/patches$(if $(wildcard $(GENERIC_PLATFORM_DIR)/patches-$(KERNEL_PATCHVER)),-$(KERNEL_PATCHVER))
 GENERIC_FILES_DIR := $(foreach dir,$(wildcard $(GENERIC_PLATFORM_DIR)/files $(GENERIC_PLATFORM_DIR)/files-$(KERNEL_PATCHVER)),"$(dir)")
 
 GENERIC_LINUX_CONFIG?=$(firstword $(wildcard $(GENERIC_PLATFORM_DIR)/config-$(KERNEL_PATCHVER) $(GENERIC_PLATFORM_DIR)/config-default))
@@ -154,7 +158,7 @@ define BuildTargets/DumpCurrent
        @echo 'Target: $(TARGETID)'; \
         echo 'Target-Board: $(BOARD)'; \
         echo 'Target-Kernel: $(KERNEL)'; \
-        echo 'Target-Name: $(BOARDNAME)$(if $(SUBTARGET),, [$(KERNEL)])'; \
+        echo 'Target-Name: $(BOARDNAME)$(if $(SUBTARGETS),, [$(KERNEL)])$(if $(SUBTARGETS),$(if $(SUBTARGET), [$(KERNEL)]))'; \
         echo 'Target-Path: $(subst $(TOPDIR)/,,$(PWD))'; \
         echo 'Target-Arch: $(ARCH)'; \
         echo 'Target-Features: $(FEATURES)'; \