Automatically generate dependencies with SWIG

Like gcc, swig supports all those -M options. Use them to automatically
manage *_py.cpp dependencies.
Add dependency generation to trickify.mk as well.
This commit is contained in:
Derek Bankieris
2017-03-14 13:38:09 -05:00
parent 22d0fe9f23
commit 2e4c3286a3
3 changed files with 17 additions and 5 deletions

View File

@ -458,7 +458,7 @@ void PrintAttributes::printIOMakefile() {
<< "\t$(PRINT_COMPILE)" << std::endl
<< "\t$(ECHO_CMD)$(TRICK_CPPC) $(TRICK_CXXFLAGS) $(TRICK_SYSTEM_CXXFLAGS) -MMD -MP -c -o $@ $<" << std::endl
<< std::endl
<< "$(IO_OBJECTS:.o=.d): \%.d: ;" << std::endl
<< "$(IO_OBJECTS:.o=.d): ;" << std::endl
<< std::endl
<< "-include $(IO_OBJECTS:.o=.d)" << std::endl
<< std::endl