From df3f31d2d57d86144c36dbedec6d322857847285 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 18 Oct 2007 13:27:48 +0200 Subject: 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) --- source4/build/smb_build/env.pm | 1 + source4/build/smb_build/makefile.pm | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) (limited to 'source4/build') 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($) -- cgit