aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.build2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile.build b/Makefile.build
index e9489b0bca..bac86b6cdd 100644
--- a/Makefile.build
+++ b/Makefile.build
@@ -859,7 +859,7 @@ endif
# to actually depend on the header files.
%.c.d: %.c
$(SHOW)'CCDEP $<'
- $(HIDE)$(CC) -MM -MG $(CFLAGS) $(CINCLUDES) $< | sed 's/\(.*\)\.o[[:space:]]*:/\1.o \1.c.d:/' > $@
+ $(HIDE)$(CC) -MM -MG -MQ "$@" -MQ "$(<:.c=.o)" $(CFLAGS) $(CINCLUDES) $< > $@
.PRECIOUS: %.ml %.mli %.d %.ml4.d kernel/copcodes.ml