diff options
author | Felix Fietkau <nbd@openwrt.org> | 2007-05-05 10:06:10 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2007-05-05 10:06:10 +0000 |
commit | 0545721438582e2c99fa838937c06ec436d76282 (patch) | |
tree | 80a111e5dd00e4e527d7fe82f1e16d16294491d8 /scripts/metadata.pl | |
parent | 5a5f01fcacfa441a53689da2af3faa1cf452f0ff (diff) | |
download | upstream-0545721438582e2c99fa838937c06ec436d76282.tar.gz upstream-0545721438582e2c99fa838937c06ec436d76282.tar.bz2 upstream-0545721438582e2c99fa838937c06ec436d76282.zip |
Make UCI preconfiguration optional and disabled by default
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7095 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'scripts/metadata.pl')
-rwxr-xr-x | scripts/metadata.pl | 12 |
1 files changed, 6 insertions, 6 deletions
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 } } |