summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/build/smb_build/makefile.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index 01d2de770a..197f506e2a 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -216,10 +216,16 @@ __EOD__
sub _prepare_depend_CC_rule()
{
return << '__EOD__';
-.c.d:
+
+%.d: %.c
@echo "Generating dependencies for $<"
@$(CC) -MM -MG -MT $(<:.c=.o) -MF $@ $(CFLAGS) $<
+# Ugly fallback used for generating a dependency file when
+# make doesn't know how to build the related C file
+%.d:
+ @touch $@
+
__EOD__
}