summaryrefslogtreecommitdiff
path: root/common.mk
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-13 05:00:26 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-13 05:00:26 +0000
commitab0ee1d5e98183e0994765352998b5543cd7f02f (patch)
tree58308c38a799308d52410ec93ffe9d2d411468ee /common.mk
parentcc77f676f4a386479b6457e11993b9933412022c (diff)
* common.mk (parse.c): generates parse.h together.
* id.c, id.h: use constants for parser tokens. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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