From 3716bc6f6637e4aaee85ca4a7b8fcc07e9fc8bd8 Mon Sep 17 00:00:00 2001 From: hogliux Date: Tue, 9 May 2017 12:56:31 +0100 Subject: [PATCH] Linux: Fixed an issue where the Makefile generated by the Projucer would not trigger recompilation when files were changed (Fixes #202) --- .../Project Saving/jucer_ProjectExport_Make.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/extras/Projucer/Source/Project Saving/jucer_ProjectExport_Make.h b/extras/Projucer/Source/Project Saving/jucer_ProjectExport_Make.h index 81f75c2d88..ccab6da8a0 100644 --- a/extras/Projucer/Source/Project Saving/jucer_ProjectExport_Make.h +++ b/extras/Projucer/Source/Project Saving/jucer_ProjectExport_Make.h @@ -590,6 +590,23 @@ private: << newLine; } + void writeIncludeLines (OutputStream& out) const + { + const int n = targets.size(); + + for (int i = 0; i < n; ++i) + { + if (MakefileTarget* target = targets.getUnchecked (i)) + { + if (target->type == ProjectType::Target::AggregateTarget) + continue; + + out << "-include $(OBJECTS_" << target->getTargetVarName() + << ":%.o=%.d)" << newLine; + } + } + } + void writeMakefile (OutputStream& out) const { out << "# Automatically generated makefile, created by the Projucer" << newLine @@ -670,7 +687,7 @@ private: << "\t-$(V_AT)$(STRIP) --strip-unneeded $(JUCE_OUTDIR)/$(TARGET)" << newLine << newLine; - out << "-include $(OBJECTS:%.o=%.d)" << newLine; + writeIncludeLines (out); } String getArchFlags (const BuildConfiguration& config) const