trunk preprocessor: small simplification of the Makefile
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2641 ac1d8469-bf42-47a9-8791-bf33cf982152issue#70
parent
3f7d1bd6a3
commit
b527623967
10
Makefile.in
10
Makefile.in
|
@ -68,18 +68,12 @@ macro/MacroBison.cc macro/MacroBison.hh macro/location.hh macro/stack.hh macro/p
|
|||
|
||||
# Dependencies
|
||||
|
||||
# General rule for creating per-source dependencies Makefile
|
||||
# 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
|
||||
%.d: %.cc DynareBison.hh macro/MacroBison.hh
|
||||
@set -e; rm -f $@; \
|
||||
$(CXX) -MM -MG $(CPPFLAGS) $< > $@.$$$$; \
|
||||
$(CXX) -MM $(CPPFLAGS) $< > $@.$$$$; \
|
||||
sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
|
||||
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 $(MACRO_OBJS:.o=.d)
|
||||
|
||||
|
|
Loading…
Reference in New Issue