svn commit: samba r25697 - in branches/SAMBA_4_0/source/build/smb_build: .

metze at samba.org metze at samba.org
Thu Oct 18 13:27:49 GMT 2007


Author: metze
Date: 2007-10-18 13:27:48 +0000 (Thu, 18 Oct 2007)
New Revision: 25697

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25697

Log:
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
Modified:
   branches/SAMBA_4_0/source/build/smb_build/env.pm
   branches/SAMBA_4_0/source/build/smb_build/makefile.pm


Changeset:
Modified: branches/SAMBA_4_0/source/build/smb_build/env.pm
===================================================================
--- branches/SAMBA_4_0/source/build/smb_build/env.pm	2007-10-18 09:44:25 UTC (rev 25696)
+++ branches/SAMBA_4_0/source/build/smb_build/env.pm	2007-10-18 13:27:48 UTC (rev 25697)
@@ -50,6 +50,7 @@
 	}
 	
 	$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");
 }
 

Modified: branches/SAMBA_4_0/source/build/smb_build/makefile.pm
===================================================================
--- branches/SAMBA_4_0/source/build/smb_build/makefile.pm	2007-10-18 09:44:25 UTC (rev 25696)
+++ branches/SAMBA_4_0/source/build/smb_build/makefile.pm	2007-10-18 13:27:48 UTC (rev 25697)
@@ -231,7 +231,23 @@
 		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($)



More information about the samba-cvs mailing list