summaryrefslogtreecommitdiff
path: root/common.mk
diff options
context:
space:
mode:
Diffstat (limited to 'common.mk')
-rw-r--r--common.mk6
1 files changed, 4 insertions, 2 deletions
diff --git a/common.mk b/common.mk
index 8f5e266cef..5efe44e46e 100644
--- a/common.mk
+++ b/common.mk
@@ -392,10 +392,12 @@ PHONY:
{$(VPATH)}parse.c: {$(VPATH)}parse.y $(srcdir)/tool/ytab.sed
{$(srcdir)}.y.c:
- $(YACC) $(YFLAGS) -o y.tab.c $<
+ $(YACC) -d $(YFLAGS) -o y.tab.c $<
sed -f $(srcdir)/tool/ytab.sed -e "/^#/s!y\.tab\.c!$@!" y.tab.c > $@.new
- @$(RM) $@ y.tab.c
@$(MV) $@.new $@
+ sed -e "/^#/s!y\.tab\.h!$(@:.c=.h)!" y.tab.h > $(@:.c=.h).new
+ @$(MV) $(@:.c=.h).new $(@:.c=.h)
+ @$(RM) y.tab.c y.tab.h
acosh.$(OBJEXT): {$(VPATH)}acosh.c
alloca.$(OBJEXT): {$(VPATH)}alloca.c {$(VPATH)}config.h