summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/build/smb_build/makefile.pm21
-rw-r--r--source4/main.mk2
2 files changed, 18 insertions, 5 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};
diff --git a/source4/main.mk b/source4/main.mk
index a472bf5a25..458421f80d 100644
--- a/source4/main.mk
+++ b/source4/main.mk
@@ -1,4 +1,4 @@
-all: bin/asn1_compile bin/compile_et binaries libraries modules
+all: $(ALL_PREDEP) bin/asn1_compile bin/compile_et binaries libraries modules
include dynconfig.mk
include heimdal_build/config.mk