summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-10-18 13:27:48 +0200
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:43:19 +0100
commitdf3f31d2d57d86144c36dbedec6d322857847285 (patch)
treed23f86a8010a2cc50d5040475161dc9056e3a912 /source4
parente77a8313195d3ec1917de6c1020355cecc31d10f (diff)
downloadsamba-df3f31d2d57d86144c36dbedec6d322857847285.tar.gz
samba-df3f31d2d57d86144c36dbedec6d322857847285.tar.bz2
samba-df3f31d2d57d86144c36dbedec6d322857847285.zip
r25697: make *clean doesn't work after a svn up when some *.mk files were removed
the error is: SAMBA_4_0/source> make clean make: *** No rule to make target `lib/ldb/samba/config.mk', needed by `Makefile'. Stop. the problem is: Makefile: config.status $(MK_FILES) ./config.status so now we let the MK_FILES variable empty for the *clean targets if gnu make is detected, we should later test if this construct is portable to other make implementations and remove the check for gnu make. metze (This used to be commit 4c8e539af1e8f14bb449c92db3376dec12344e5b)
Diffstat (limited to 'source4')
-rw-r--r--source4/build/smb_build/env.pm1
-rw-r--r--source4/build/smb_build/makefile.pm16
2 files changed, 17 insertions, 0 deletions
diff --git a/source4/build/smb_build/env.pm b/source4/build/smb_build/env.pm
index f468f51de1..8fbbe9cfd5 100644
--- a/source4/build/smb_build/env.pm
+++ b/source4/build/smb_build/env.pm
@@ -50,6 +50,7 @@ sub _set_config($$)
}
$self->{developer} = ($self->{config}->{developer} eq "yes");
+ $self->{gnu_make} = ($self->{config}->{GNU_MAKE} eq "yes");
$self->{automatic_deps} = ($self->{config}->{automatic_dependencies} eq "yes");
}
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index b1bd215af1..2dd1a9d7b3 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -231,7 +231,23 @@ sub _prepare_mk_files($)
push (@tmp, $_);
}
+ if ($self->{gnu_make}) {
+ $self->output("
+ifneq (\$(MAKECMDGOALS),clean)
+ifneq (\$(MAKECMDGOALS),distclean)
+ifneq (\$(MAKECMDGOALS),realdistclean)
+");
+ }
+
$self->output("MK_FILES = " . array2oneperline(\@tmp) . "\n");
+
+ if ($self->{gnu_make}) {
+ $self->output("
+endif
+endif
+endif
+");
+ }
}
sub array2oneperline($)