summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/build/smb_build/config_mk.pm8
-rw-r--r--source4/build/smb_build/main.pl2
-rw-r--r--source4/build/smb_build/makefile.pm19
3 files changed, 27 insertions, 2 deletions
diff --git a/source4/build/smb_build/config_mk.pm b/source4/build/smb_build/config_mk.pm
index c5a035f375..49b93a5d98 100644
--- a/source4/build/smb_build/config_mk.pm
+++ b/source4/build/smb_build/config_mk.pm
@@ -6,7 +6,7 @@
### Released under the GNU GPL ###
###########################################################
-package config_mk;
+package smb_build::config_mk;
use smb_build::input;
use strict;
@@ -33,6 +33,10 @@ my %attribute_types = (
"MANPAGE" => "string"
);
+use vars qw(@parsed_files);
+
+@parsed_files = ();
+
###########################################################
# The parsing function which parses the file
#
@@ -48,6 +52,8 @@ sub run_config_mk($$)
my $infragment = 0;
my $section = "GLOBAL";
my $makefile = "";
+
+ push (@parsed_files, $filename);
open(CONFIG_MK, $filename) or die("Can't open `$filename'\n");
my @lines = <CONFIG_MK>;
diff --git a/source4/build/smb_build/main.pl b/source4/build/smb_build/main.pl
index 7f83754408..e6a330e99d 100644
--- a/source4/build/smb_build/main.pl
+++ b/source4/build/smb_build/main.pl
@@ -18,7 +18,7 @@ use strict;
my $INPUT = {};
-my $mkfile = config_mk::run_config_mk($INPUT, "main.mk");
+my $mkfile = smb_build::config_mk::run_config_mk($INPUT, "main.mk");
my $DEPEND = smb_build::input::check($INPUT, \%config::enabled);
my $OUTPUT = output::create_output($DEPEND);
makefile::create_makefile_in($OUTPUT, $mkfile, "Makefile.in");
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index 19c8486bf8..b43a738613 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -123,6 +123,24 @@ sub _prepare_man_rule($)
__EOD__
}
+sub _prepare_config_status()
+{
+ my @parsed_files = @smb_build::config_mk::parsed_files;
+ my $deps = "";
+
+ foreach (@parsed_files) {
+ /^([^ |]+)/;
+ $deps.= " $1";
+ }
+
+ return "
+
+Makefile: config.status $deps
+ ./config.status
+
+";
+}
+
sub _prepare_binaries($)
{
my $ctx = shift;
@@ -596,6 +614,7 @@ sub _prepare_makefile_in($)
$output .= _prepare_binaries($CTX);
$output .= _prepare_target_settings($CTX);
$output .= _prepare_rule_lists($CTX);
+ $output .= _prepare_config_status();
if ($config{developer} eq "yes") {
$output .= <<__EOD__