summaryrefslogtreecommitdiff
path: root/source4/build/smb_build
diff options
context:
space:
mode:
Diffstat (limited to 'source4/build/smb_build')
-rw-r--r--source4/build/smb_build/makefile.pm21
1 files changed, 17 insertions, 4 deletions
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index 2429c99369..a7dc4ff3e5 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -18,6 +18,7 @@ sub new($$$)
bless($self, $myname);
+ $self->{automatic_deps} = 0;
$self->{manpages} = [];
$self->{sbin_progs} = [];
$self->{bin_progs} = [];
@@ -41,6 +42,10 @@ sub new($$$)
$self->output("################################################\n");
$self->output("\n");
+ if (!$self->{automatic_deps}) {
+ $self->output("ALL_PREDEP = proto\n");
+ }
+
$self->output("default: all\n\n");
$self->_prepare_path_vars();
@@ -509,11 +514,19 @@ sub write($$)
$self->output($self->{mkfile});
-# if ($self->{developer}) {
-# $self->output("-include \$(DEP_FILES)\n");
-# } else {
+ if ($self->{automatic_deps}) {
+ $self->output("
+ifneq (\$(MAKECMDGOALS),clean)
+ifneq (\$(MAKECMDGOALS),distclean)
+ifneq (\$(MAKECMDGOALS),realdistclean)
+-include \$(DEP_FILES)
+endif
+endif
+endif
+");
+ } else {
$self->output("include static_deps.mk\n");
-# }
+ }
open(MAKEFILE,">$file") || die ("Can't open $file\n");
print MAKEFILE $self->{output};