diff options
author | Felix Fietkau <nbd@openwrt.org> | 2009-11-10 22:00:54 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2009-11-10 22:00:54 +0000 |
commit | 579d54038bab2423a65701255db6919f4df51183 (patch) | |
tree | 422232790754478411291b203b087bcb02f3a6e7 /scripts/metadata.pl | |
parent | 1dbcfdaf2f52ee208a7ee88f09f0642dbdb6c882 (diff) | |
download | mtk-20170518-579d54038bab2423a65701255db6919f4df51183.zip mtk-20170518-579d54038bab2423a65701255db6919f4df51183.tar.gz mtk-20170518-579d54038bab2423a65701255db6919f4df51183.tar.bz2 |
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
SVN-Revision: 18357
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 ca00fca..26d878c 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"; } |