Skip to content
Snippets Groups Projects
Verified Commit ecad2dfb authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Avoid running bison and flex multiple times when doing parallel builds

parent 30aaf93c
Branches
Tags
No related merge requests found
Pipeline #1609 passed
...@@ -68,14 +68,20 @@ dynare_m_CPPFLAGS = $(BOOST_CPPFLAGS) -I. ...@@ -68,14 +68,20 @@ dynare_m_CPPFLAGS = $(BOOST_CPPFLAGS) -I.
dynare_m_LDFLAGS = $(AM_LDFLAGS) $(BOOST_LDFLAGS) dynare_m_LDFLAGS = $(AM_LDFLAGS) $(BOOST_LDFLAGS)
dynare_m_LDADD = macro/libmacro.a $(BOOST_FILESYSTEM_LIB) $(BOOST_SYSTEM_LIB) 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 $(LEX) -o DynareFlex.cc DynareFlex.ll
FlexLexer.h:
cp $(LEXINC)/FlexLexer.h . || test -f ./FlexLexer.h cp $(LEXINC)/FlexLexer.h . || test -f ./FlexLexer.h
dynare_m-DynareFlex.$(OBJEXT): CXXFLAGS += -Wno-old-style-cast dynare_m-DynareFlex.$(OBJEXT): CXXFLAGS += -Wno-old-style-cast
DynareBison.cc DynareBison.hh location.hh stack.hh position.hh: DynareBison.yy # We do not use a multiple target rule for Bison, because otherwise it will be
$(YACC) -W -o DynareBison.cc DynareBison.yy # 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) all-local: $(PROGRAMS)
......
...@@ -26,5 +26,9 @@ Tokenizer.cc: Tokenizer.ll ...@@ -26,5 +26,9 @@ Tokenizer.cc: Tokenizer.ll
libmacro_a-Tokenizer.$(OBJEXT): CXXFLAGS += -Wno-old-style-cast libmacro_a-Tokenizer.$(OBJEXT): CXXFLAGS += -Wno-old-style-cast
Parser.cc Parser.hh location.hh stack.hh position.hh: Parser.yy # We do not use a multiple target rule for Bison, because otherwise it will be
$(YACC) -W -o Parser.cc Parser.yy # run several times in parallel builds
Parser.cc: Parser.yy
$(YACC) -W -o $@ $<
Parser.hh location.hh stack.hh position.hh: Parser.cc
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment