summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-05-18 18:08:37 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-05-18 18:08:37 +0200
commit10676780486c6b7fcf5b11240bc8c2726f58fff2 (patch)
tree46e5b69f153209974cfb5b2c56ad30f6d83ff3a2 /source4
parent353afc8d943f6ecfad83af830919afdcc5a853fc (diff)
downloadsamba-10676780486c6b7fcf5b11240bc8c2726f58fff2.tar.gz
samba-10676780486c6b7fcf5b11240bc8c2726f58fff2.tar.bz2
samba-10676780486c6b7fcf5b11240bc8c2726f58fff2.zip
Allow specifying different input file to smb_build.
(This used to be commit c4bfc0b8daf2e288a278936b279bb4f7848d78e9)
Diffstat (limited to 'source4')
-rw-r--r--source4/build/m4/public.m42
-rw-r--r--source4/build/smb_build/main.pl14
2 files changed, 13 insertions, 3 deletions
diff --git a/source4/build/m4/public.m4 b/source4/build/m4/public.m4
index 300c64f854..d932f09a69 100644
--- a/source4/build/m4/public.m4
+++ b/source4/build/m4/public.m4
@@ -209,7 +209,7 @@ test "x$ac_abs_srcdir" != "x$ac_abs_builddir" && (
$PERL -I${builddir} -I${builddir}/build \
-I${srcdir} -I${srcdir}/build \
- ${srcdir}/build/smb_build/main.pl $1 || exit $?
+ ${srcdir}/build/smb_build/main.pl --output=$1 main.mk || exit $?
],
[
srcdir="$srcdir"
diff --git a/source4/build/smb_build/main.pl b/source4/build/smb_build/main.pl
index 07d0d5a90b..d6476c0cf2 100644
--- a/source4/build/smb_build/main.pl
+++ b/source4/build/smb_build/main.pl
@@ -11,12 +11,22 @@ use smb_build::config_mk;
use smb_build::output;
use smb_build::summary;
use smb_build::config;
+use Getopt::Long;
use strict;
-my $output_file = shift @ARGV;
+my $output_file = "data.mk";
+
+my $result = GetOptions (
+ 'output' => \$output_file);
+
+if (not $result) {
+ exit(1);
+}
+
+my $input_file = shift @ARGV;
my $INPUT = {};
-my $mkfile = smb_build::config_mk::run_config_mk($INPUT, $config::config{srcdir}, $config::config{builddir}, "main.mk");
+my $mkfile = smb_build::config_mk::run_config_mk($INPUT, $config::config{srcdir}, $config::config{builddir}, $input_file);
my $subsys_output_type = ["MERGED_OBJ"];