add a command for printing a cleaned up make target database - will be used to analyz...
[openwrt/svn-archive/archive.git] / scripts / metadata.pl
index 9260a1b24bdcf7709b74ed1a386b1a503daf7e85..a9242d0a7fb9353eaa8e74b566d5efcbcfdd1c84 100755 (executable)
@@ -152,16 +152,18 @@ sub target_config_features(@) {
 
        while ($_ = shift @_) {
                /broken/ and $ret .= "\tdepends BROKEN\n";
+               /audio/ and $ret .= "\tselect AUDIO_SUPPORT\n";
                /display/ and $ret .= "\tselect DISPLAY_SUPPORT\n";
                /gpio/ and $ret .= "\tselect GPIO_SUPPORT\n";
                /pci/ and $ret .= "\tselect PCI_SUPPORT\n";
                /pcie/ and $ret .= "\tselect PCIE_SUPPORT\n";
                /usb/ and $ret .= "\tselect USB_SUPPORT\n";
+               /usbgadget/ and $ret .= "\tselect USB_GADGET_SUPPORT\n";
                /pcmcia/ and $ret .= "\tselect PCMCIA_SUPPORT\n";
                /squashfs/ and $ret .= "\tselect USES_SQUASHFS\n";
                /jffs2/ and $ret .= "\tselect USES_JFFS2\n";
                /ext2/ and $ret .= "\tselect USES_EXT2\n";
-               /tgz/ and $ret .= "\tselect USES_TGZ\n";
+               /targz/ and $ret .= "\tselect USES_TARGZ\n";
                /cpiogz/ and $ret .= "\tselect USES_CPIOGZ\n";
                /ubifs/ and $ret .= "\tselect USES_UBIFS\n";
                /fpu/ and $ret .= "\tselect HAS_FPU\n";
@@ -262,7 +264,7 @@ sub gen_target_config() {
        print <<EOF;
 choice
        prompt "Target System"
-       default TARGET_brcm_2_4
+       default TARGET_brcm47xx
        reset if !DEVEL
        
 EOF
@@ -422,6 +424,9 @@ sub mconf_depends {
                my $vdep;
                my $condition = $parent_condition;
 
+               next if $condition eq $depend;
+               next if $seen->{"$parent_condition:$depend"};
+               $seen->{"$parent_condition:$depend"} = 1;
                if ($depend =~ /^(.+):(.+)$/) {
                        if ($1 ne "PACKAGE_$pkgname") {
                                if ($condition) {
@@ -432,9 +437,7 @@ sub mconf_depends {
                        }
                        $depend = $2;
                }
-               next if $seen->{$depend};
                next if $package{$depend} and $package{$depend}->{buildonly};
-               $seen->{$depend} = 1;
                if ($vdep = $package{$depend}->{vdepends}) {
                        $depend = join("||", map { "PACKAGE_".$_ } @$vdep);
                } else {
@@ -760,6 +763,7 @@ sub gen_package_mk() {
                next unless $cmds;
                print <<EOF
 
+ifndef DUMP_TARGET_DB
 \$(TARGET_DIR)/etc/uci-defaults/$preconfig: FORCE
        ( \\
 $cmds \\
@@ -768,6 +772,8 @@ $cmds \\
 ifneq (\$(IMAGEOPT)\$(CONFIG_IMAGEOPT),)
   package/preconfig: \$(TARGET_DIR)/etc/uci-defaults/$preconfig
 endif
+endif
+
 EOF
        }
 }