clean up menu configuration
authorMike Baker <mbm@openwrt.org>
Fri, 19 May 2006 22:46:24 +0000 (22:46 +0000)
committerMike Baker <mbm@openwrt.org>
Fri, 19 May 2006 22:46:24 +0000 (22:46 +0000)
SVN-Revision: 3801

openwrt/Config.in
openwrt/Makefile
openwrt/package/busybox/Makefile
openwrt/package/rules.mk
openwrt/scripts/gen_menuconfig.pl

index ae959f683ed12000c30cf2a47274ae69107e0ac9..4a887cc135637a7c63fc98f4f9b5ba963f482aa4 100644 (file)
@@ -8,23 +8,24 @@ config HAVE_DOT_CONFIG
 
 source "target/Config.in"
 
-config DEVEL
+config ALL
+       bool "Select all packages by default"
+       default n
+
+menuconfig DEVEL
        bool "Advanced configuration options (for developers)"
        default n
        select BUILDOPTS
        select TOOLCHAINOPTS
 
-config ALL
-       bool "Select all packages by default"
-       default n
+menuconfig BUILDOPTS
+       bool "Build Options" if DEVEL
 
 config WGET
         string
+       prompt "WGET command" if BUILDOPTS
         default "wget --passive-ftp -nd"
 
-menuconfig BUILDOPTS
-       bool "Build Options" if DEVEL
-
 config TAR_VERBOSITY
        bool 
        prompt "Tar verbose" if BUILDOPTS
@@ -41,6 +42,3 @@ source "toolchain/Config.in"
 source "target/linux/Config.in"
 source ".config.in"
 
-menu "busybox"
-source "package/busybox/config/Config.in"
-endmenu
index 06288de6b86b1d1ab061080b8f4d5e6177d8e3e6..9b9d1c955e13db4dcdd30951fb87b042a38b2df0 100644 (file)
@@ -45,7 +45,7 @@ ifeq ($(shell ./scripts/timestamp.pl -p .pkginfo package),package)
        @echo Collecting package info...
        @-for makefile in package/*/Makefile; do \
                echo Source-Makefile: $$makefile; \
-               $(MAKE) DUMP=1 -f $$makefile 2>&- || true; \
+               $(MAKE) --no-print-dir DUMP=1 -f $$makefile 2>&- || true; \
        done > $@
 endif
 
index 23dcc1cf8dc7071192abb18711e862ed84eb6aba..ff23ee7dd81864cb7d62fc0493673a94528320cc 100644 (file)
@@ -15,14 +15,18 @@ PKG_CAT:=bzcat
 include $(TOPDIR)/package/rules.mk
 
 define Package/busybox
-CONFIGFILE:=config/Config.in
 SECTION:=base
 CATEGORY:=Base system
+MENU:=1
 DEFAULT:=y
 TITLE:=Core utilities for embedded Linux
 DESCRIPTION:=The Swiss Army Knife of embedded Linux. \\\
 It slices, it dices, it makes Julian Fries.
 URL:=http://busybox.net/
+CONFIG:=menu "Configuration" \\\
+       depends on PACKAGE_busybox \\\
+source "package/busybox/config/Config.in" \\\
+endmenu
 endef
 
 define Build/Configure
index e8417c3a5f4af9a3d74f2cb466c9b0cb8d63fbed..99e4a846a5403c19600cd5c21830865cbc6ada8b 100644 (file)
@@ -116,6 +116,12 @@ define BuildPackage
   DUMPINFO += \
        echo "@@";
 
+  ifneq ($(CONFIG),)
+    DUMPINFO += \
+       echo "Config: $(CONFIG)" | sed -e 's,\\,\n,g'; \
+       echo "@@";
+  endif
+
   $$(IDIR_$(1))/CONTROL/control: $(PKG_BUILD_DIR)/.prepared
        mkdir -p $$(IDIR_$(1))/CONTROL
        echo "Package: $(1)" > $$(IDIR_$(1))/CONTROL/control
@@ -222,7 +228,7 @@ endef
 
 ifneq ($(DUMP),)
   dumpinfo: FORCE
-       $(DUMPINFO)
+       @$(DUMPINFO)
 else
                
   $(PACKAGE_DIR):
index 3f4476a2c6a5a80eac9a11e5ffebd59812d41949..e282ee3ed2d95a8b96f210af5af392eade2af32d 100755 (executable)
@@ -30,7 +30,9 @@ sub print_category($) {
                        }
                        print "\t\thelp\n";
                        print $pkg->{description};
-                       print "\n"
+                       print "\n";
+
+                       $pkg->{config} and print $pkg->{config}."\n";
                }
        }
        print "endmenu\n\n";
@@ -75,6 +77,15 @@ while ($line = <>) {
                        $desc .= "\t\t$line";
                }
                $pkg->{description} = $desc;
+       };
+       $line =~ /^Config: \s*(.*)\s*$/ and do {
+               my $conf = "$1\n";
+               my $line;
+               while ($line = <>) {
+                       last if $line =~ /^@@/;
+                       $conf .= "$line";
+               }
+               $pkg->{config} = $conf;
        }
 }