From 8075ad2ef505eff4e3297ad2e08ad5f446a8bbd2 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 10 Nov 2009 22:00:54 +0000 Subject: 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 --- scripts/metadata.pl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scripts/metadata.pl') diff --git a/scripts/metadata.pl b/scripts/metadata.pl index ca00fcae6d..26d878cc9e 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"; } -- cgit v1.2.3