Avoid running bison and flex multiple times when doing parallel builds
parent
30aaf93ca7
commit
ecad2dfb10
|
@ -68,14 +68,20 @@ dynare_m_CPPFLAGS = $(BOOST_CPPFLAGS) -I.
|
|||
dynare_m_LDFLAGS = $(AM_LDFLAGS) $(BOOST_LDFLAGS)
|
||||
dynare_m_LDADD = macro/libmacro.a $(BOOST_FILESYSTEM_LIB) $(BOOST_SYSTEM_LIB)
|
||||
|
||||
DynareFlex.cc FlexLexer.h: DynareFlex.ll
|
||||
DynareFlex.cc: DynareFlex.ll
|
||||
$(LEX) -o DynareFlex.cc DynareFlex.ll
|
||||
|
||||
FlexLexer.h:
|
||||
cp $(LEXINC)/FlexLexer.h . || test -f ./FlexLexer.h
|
||||
|
||||
dynare_m-DynareFlex.$(OBJEXT): CXXFLAGS += -Wno-old-style-cast
|
||||
|
||||
DynareBison.cc DynareBison.hh location.hh stack.hh position.hh: DynareBison.yy
|
||||
$(YACC) -W -o DynareBison.cc DynareBison.yy
|
||||
# We do not use a multiple target rule for Bison, because otherwise it will be
|
||||
# run several times in parallel builds
|
||||
DynareBison.cc: DynareBison.yy
|
||||
$(YACC) -W -o $@ $<
|
||||
|
||||
DynareBison.hh location.hh stack.hh position.hh: DynareBison.cc
|
||||
|
||||
all-local: $(PROGRAMS)
|
||||
|
||||
|
|
|
@ -26,5 +26,9 @@ Tokenizer.cc: Tokenizer.ll
|
|||
|
||||
libmacro_a-Tokenizer.$(OBJEXT): CXXFLAGS += -Wno-old-style-cast
|
||||
|
||||
Parser.cc Parser.hh location.hh stack.hh position.hh: Parser.yy
|
||||
$(YACC) -W -o Parser.cc Parser.yy
|
||||
# We do not use a multiple target rule for Bison, because otherwise it will be
|
||||
# run several times in parallel builds
|
||||
Parser.cc: Parser.yy
|
||||
$(YACC) -W -o $@ $<
|
||||
|
||||
Parser.hh location.hh stack.hh position.hh: Parser.cc
|
||||
|
|
Loading…
Reference in New Issue