summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Config.in115
-rw-r--r--Makefile2
-rwxr-xr-xscripts/metadata.pl12
3 files changed, 65 insertions, 64 deletions
diff --git a/Config.in b/Config.in
index fde72b518e..0bced5c021 100644
--- a/Config.in
+++ b/Config.in
@@ -12,63 +12,6 @@ config HAVE_DOT_CONFIG
source "target/Config.in"
-config ALL
- bool "Select all packages by default"
- default n
-
-menuconfig DEVEL
- bool "Advanced configuration options (for developers)"
- default n
- select BUILDOPTS
- select TOOLCHAINOPTS if !NATIVE_TOOLCHAIN
-
-config BROKEN
- bool "Show broken platforms / packages" if DEVEL
- default n
-
-config LOCALMIRROR
- string "Local mirror for source packages" if DEVEL
-
-menuconfig BUILDOPTS
- bool "Build Options" if DEVEL
-
-config AUTOREBUILD
- bool
- prompt "Automatic rebuild of packages" if BUILDOPTS
- default y
- help
- Automatically rebuild packages when their files change
-
-config TAR_VERBOSITY
- bool
- prompt "Tar verbose" if BUILDOPTS
- default n
-
-config JLEVEL
- int
- prompt "Number of jobs to run simultaneously" if BUILDOPTS
- default "1"
- help
- Number of jobs to run simultanesouly
-
-config CCACHE
- bool
- prompt "Use ccache" if BUILDOPTS
- default n
- help
- Compiler cache; see http://ccache.samba.org/
-
-config SOURCE_FEEDS
- string
- prompt "Enter here external source feeds you want to include" if BUILDOPTS
- default "https://svn.openwrt.org/openwrt/packages/"
- help
- Separate sources with spaces : " "
-
-source "toolchain/Config.in"
-source "target/imagebuilder/Config.in"
-source "target/sdk/Config.in"
-
menu "Target Images"
config TARGET_ROOTFS_INITRAMFS
bool "ramdisk"
@@ -126,5 +69,63 @@ source "target/linux/*/image/Config.in"
endmenu
+
+config ALL
+ bool "Select all packages by default"
+ default n
+
+menuconfig DEVEL
+ bool "Advanced configuration options (for developers)"
+ default n
+ select BUILDOPTS
+ select TOOLCHAINOPTS if !NATIVE_TOOLCHAIN
+
+config BROKEN
+ bool "Show broken platforms / packages" if DEVEL
+ default n
+
+config LOCALMIRROR
+ string "Local mirror for source packages" if DEVEL
+
+menuconfig BUILDOPTS
+ bool "Build Options" if DEVEL
+
+config AUTOREBUILD
+ bool
+ prompt "Automatic rebuild of packages" if BUILDOPTS
+ default y
+ help
+ Automatically rebuild packages when their files change
+
+config TAR_VERBOSITY
+ bool
+ prompt "Tar verbose" if BUILDOPTS
+ default n
+
+config JLEVEL
+ int
+ prompt "Number of jobs to run simultaneously" if BUILDOPTS
+ default "1"
+ help
+ Number of jobs to run simultanesouly
+
+config CCACHE
+ bool
+ prompt "Use ccache" if BUILDOPTS
+ default n
+ help
+ Compiler cache; see http://ccache.samba.org/
+
+config SOURCE_FEEDS
+ string
+ prompt "Enter here external source feeds you want to include" if BUILDOPTS
+ default "https://svn.openwrt.org/openwrt/packages/"
+ help
+ Separate sources with spaces : " "
+
+source "toolchain/Config.in"
+source "target/imagebuilder/Config.in"
+source "target/sdk/Config.in"
+
source "tmp/.config-package.in"
diff --git a/Makefile b/Makefile
index d2be7bb61f..f06b151eb2 100644
--- a/Makefile
+++ b/Makefile
@@ -53,7 +53,7 @@ tmp/.%info:
tmpinfo-clean: FORCE
-rm -rf tmp/.*info
-tmp/.config-%.in: tmp/.%info
+tmp/.config-%.in: tmp/.%info scripts/metadata.pl
./scripts/metadata.pl $*_config < $< > $@ || rm -f $@
.config: ./scripts/config/conf tmp/.config-target.in tmp/.config-package.in
diff --git a/scripts/metadata.pl b/scripts/metadata.pl
index 2527915bca..e196003326 100755
--- a/scripts/metadata.pl
+++ b/scripts/metadata.pl
@@ -451,22 +451,20 @@ sub print_package_config_category($) {
sub gen_package_config() {
parse_package_metadata();
- print "menu \"Image configuration\"\n";
+ print "menuconfig UCI_PRECONFIG\n\tbool \"Image configuration\"\n";
foreach my $preconfig (keys %preconfig) {
- print "\tcomment \"$preconfig\"\n";
foreach my $cfg (@{$preconfig{$preconfig}}) {
my $conf = $cfg->{id};
$conf =~ tr/\.-/__/;
print <<EOF
config UCI_PRECONFIG_$conf
- string "$cfg->{label}"
+ string "$cfg->{label}" if UCI_PRECONFIG
depends PACKAGE_$preconfig
default "$cfg->{default}"
EOF
}
}
- print "endmenu\n\n";
print_package_config_category 'Base system';
foreach my $cat (keys %category) {
print_package_config_category $cat;
@@ -542,8 +540,10 @@ sub gen_package_mk() {
( \\
$cmds \\
) > \$@
-
-preconfig: \$(TARGET_DIR)/etc/uci-defaults/$preconfig
+
+ifneq (\$(UCI_PRECONFIG)\$(CONFIG_UCI_PRECONFIG),)
+ preconfig: \$(TARGET_DIR)/etc/uci-defaults/$preconfig
+endif
EOF
}
}