diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2009-11-10 22:00:54 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2009-11-10 22:00:54 +0000 |
commit | bc624321e8fb058c5ebce476d33d6d0e4dcfa9e3 (patch) | |
tree | 2320af26b138a3ffb9add5ad143a555920b00967 /scripts/metadata.pl | |
parent | 3b3a36db385168971075d15fbf76a27920a7b888 (diff) |
build system: introduce a new feature called build variants.
it allows building a package multiple times in one pass with different build dirs,
based on the same build settings.
replaces templating hacks like the one used in the hostapd package
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18357 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'scripts/metadata.pl')
-rwxr-xr-x | scripts/metadata.pl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/metadata.pl b/scripts/metadata.pl index ca00fcae6..26d878cc9 100755 --- a/scripts/metadata.pl +++ b/scripts/metadata.pl @@ -620,6 +620,9 @@ sub gen_package_mk() { if ($config) { $pkg->{buildonly} and $config = ""; print "package-$config += $pkg->{subdir}$pkg->{src}\n"; + if ($pkg->{variant}) { + print "\$(curdir)/$pkg->{subdir}$pkg->{src}/variants += \$(if $config,$pkg->{variant})\n" + } $pkg->{prereq} and print "prereq-$config += $pkg->{subdir}$pkg->{src}\n"; } |