Fix YACC parallel build

antelope now support an argument to modify the output
file name.  Use this it is possible to safely build several
parsers in the same directory.
This commit is contained in:
Michael Davidsaver authored and Andrew Johnson committed 2010-12-17 17:32:51 -05:00
1 parent b18cacc216
commit 39a2858f84
1 file changed
+8 -8
+8 -8
View File
@@ -226,16 +226,16 @@ $(OBJLIBNAME):%$(OBJ):
#
ifeq ($(findstring -d, $(YACCOPT)),-d)
%.h %.c: %.y
$(RM) $*.c y.tab.c
$(RM) $*.h y.tab.h
$(YACC) $(YACCOPT) $<
$(MV) y.tab.c $*.c
$(MV) y.tab.h $*.h
$(RM) $*.c $*.tab.c
$(RM) $*.h $*.tab.h
$(YACC) -b$* $(YACCOPT) $<
$(MV) $*.tab.c $*.c
$(MV) $*.tab.h $*.h
else
%.c: %.y
$(RM) $*.c y.tab.c
$(YACC) $(YACCOPT) $<
$(MV) y.tab.c $*.c
$(RM) $*.c $*.tab.c
$(YACC) -b$* $(YACCOPT) $<
$(MV) $*.tab.c $*.c
endif
%.c: %.l