Hello,

this patch automatically detects the available SUBTARGETS,
trigger is a subdirectory with the file target.mk .

All existing subtarget are still detected, one additional is found 
(olpc/generic) 

Please comment and/or commit!

Signed-off-by: Thomas Langer <[email protected]>

---

Index: target/linux/ixp4xx/Makefile
===================================================================
--- target/linux/ixp4xx/Makefile        (revision 14580)
+++ target/linux/ixp4xx/Makefile        (working copy)
@@ -10,7 +10,6 @@
 BOARD:=ixp4xx
 BOARDNAME:=Intel IXP4xx
 FEATURES:=squashfs
-SUBTARGETS=generic harddisk
 
 LINUX_VERSION:=2.6.28.6
 
Index: target/linux/au1000/Makefile
===================================================================
--- target/linux/au1000/Makefile        (revision 14580)
+++ target/linux/au1000/Makefile        (working copy)
@@ -10,7 +10,6 @@
 BOARD:=au1000
 BOARDNAME:=RMI/AMD AU1x00
 FEATURES:=jffs2 usb pci
-SUBTARGETS=au1500 au1550
 
 LINUX_VERSION:=2.6.27.17
 
Index: target/linux/adm5120/Makefile
===================================================================
--- target/linux/adm5120/Makefile       (revision 14580)
+++ target/linux/adm5120/Makefile       (working copy)
@@ -10,7 +10,6 @@
 BOARD:=adm5120
 BOARDNAME:=Infineon/ADMtek ADM5120
 LINUX_VERSION:=2.6.27.17
-SUBTARGETS:=router_le router_be
 INITRAMFS_EXTRA_FILES:=
 
 include $(INCLUDE_DIR)/target.mk
Index: target/linux/ifxmips/nfs/target.mk
===================================================================
--- target/linux/ifxmips/nfs/target.mk  (revision 14580)
+++ target/linux/ifxmips/nfs/target.mk  (working copy)
@@ -2,6 +2,8 @@
 FEATURES:=tgz
 DEVICE_TYPE:=modem
 
+LINUX_VERSION:=2.6.27.17
+
 define Target/Description
        Build images for Infineon CPE devices for NFS boot
 endef
Index: target/linux/ifxmips/Makefile
===================================================================
--- target/linux/ifxmips/Makefile       (revision 14580)
+++ target/linux/ifxmips/Makefile       (working copy)
@@ -10,7 +10,6 @@
 BOARD:=ifxmips
 BOARDNAME:=Infineon Mips
 FEATURES:=squashfs jffs2
-SUBTARGETS:=generic nfs
 LINUX_VERSION:=2.6.26.8
 #LINUX_VERSION:=2.6.27.17
 
Index: target/linux/x86/Makefile
===================================================================
--- target/linux/x86/Makefile   (revision 14580)
+++ target/linux/x86/Makefile   (working copy)
@@ -10,7 +10,6 @@
 BOARD:=x86
 BOARDNAME:=x86
 FEATURES:=squashfs jffs2 ext2 vdi vmdk
-SUBTARGETS=generic
 
 LINUX_VERSION:=2.6.28.6
 LINUX_KARCH:=x86
Index: target/linux/ps3/Makefile
===================================================================
--- target/linux/ps3/Makefile   (revision 14580)
+++ target/linux/ps3/Makefile   (working copy)
@@ -9,7 +9,6 @@
 ARCH:=powerpc
 BOARD:=ps3
 BOARDNAME:=Sony PS3 Game Console
-SUBTARGETS=petitboot
 
 LINUX_VERSION:=2.6.27.8
 
Index: include/target.mk
===================================================================
--- include/target.mk   (revision 14580)
+++ include/target.mk   (working copy)
@@ -34,6 +34,9 @@
   SUBTARGET:=$(strip $(foreach subdir,$(patsubst 
$(PLATFORM_DIR)/%/target.mk,%,$(wildcard $(PLATFORM_DIR)/*/target.mk)),$(if 
$(CONFIG_TARGET_$(call target_conf,$(BOARD)_$(subdir))),$(subdir))))
 else
   PLATFORM_DIR:=${CURDIR}
+  ifeq ($(SUBTARGETS),)
+    SUBTARGETS:=$(strip $(patsubst $(PLATFORM_DIR)/%/target.mk,%,$(wildcard 
$(PLATFORM_DIR)/*/target.mk)))
+  endif
 endif
 
 TARGETID:=$(BOARD)$(if $(SUBTARGET),/$(SUBTARGET))

Attachment: dynamic-subtargets.patch
Description: dynamic-subtargets.patch

_______________________________________________
openwrt-devel mailing list
[email protected]
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to