Commit bc86ddc1 authored by sebastien's avatar sebastien
Browse files

trunk preprocessor: small simplification of the Makefile


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2641 ac1d8469-bf42-47a9-8791-bf33cf982152
parent a7e32f50
...@@ -68,18 +68,12 @@ macro/MacroBison.cc macro/MacroBison.hh macro/location.hh macro/stack.hh macro/p ...@@ -68,18 +68,12 @@ macro/MacroBison.cc macro/MacroBison.hh macro/location.hh macro/stack.hh macro/p
# Dependencies # Dependencies
# General rule for creating per-source dependencies Makefile %.d: %.cc DynareBison.hh macro/MacroBison.hh
# We use -MG to avoid failing on generated headers (MacroBison.hh, DynareBison.hh)
# As a consequence, these headers are included without path-prefix
%.d: %.cc
@set -e; rm -f $@; \ @set -e; rm -f $@; \
$(CXX) -MM -MG $(CPPFLAGS) $< > $@.$$$$; \ $(CXX) -MM $(CPPFLAGS) $< > $@.$$$$; \
sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \ sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
rm -f $@.$$$$ rm -f $@.$$$$
# As DynareBison.hh, this file is included in the .d files without its path (since it is generated), so we force the path
vpath MacroBison.hh macro
-include $(MAIN_OBJS:.o=.d) -include $(MAIN_OBJS:.o=.d)
-include $(MACRO_OBJS:.o=.d) -include $(MACRO_OBJS:.o=.d)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment