diff options
author | Jason Perkins <starkos@industriousone.com> | 2012-09-06 02:30:02 +0400 |
---|---|---|
committer | Jason Perkins <starkos@industriousone.com> | 2012-09-06 02:30:02 +0400 |
commit | 00fdae710783c2b54393e783be6c2d2a8c348860 (patch) | |
tree | 17c7bb0583fe8eaf5380b114efd9e0c9986e5a93 | |
parent | 71e0fee0bf3b8d8ec4f0497e19b7b494558b5e91 (diff) |
Patch 3476176: Fix dependencies of precompiled header in makefile
-rw-r--r-- | CHANGES.txt | 1 | ||||
-rw-r--r-- | src/actions/make/make_cpp.lua | 10 | ||||
-rw-r--r-- | tests/actions/make/test_make_pch.lua | 4 |
3 files changed, 7 insertions, 8 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index 7c9f004..aabf72b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -56,6 +56,7 @@ * Patch 3353975: Support usage of premake as a library (Konstantin Tokarev) * Patch 3505903: Fix VC2010 project reference paths (Pavel Czerný) * Patch 3305599: Add -Wextra to ExtraWarnings (ergosys) +* Patch 3476176: Fix dependencies of precompiled header in makefile (Konstantin Tokarev) ------- diff --git a/src/actions/make/make_cpp.lua b/src/actions/make/make_cpp.lua index 4d09d1d..7069f7f 100644 --- a/src/actions/make/make_cpp.lua +++ b/src/actions/make/make_cpp.lua @@ -114,7 +114,7 @@ if path.iscppfile(file) then _p('$(OBJDIR)/%s.o: %s', _MAKE.esc(path.getbasename(file)), _MAKE.esc(file)) _p('\t@echo $(notdir $<)') - cpp.buildcommand(path.iscfile(file)) + cpp.buildcommand(path.iscfile(file), "o") elseif (path.getextension(file) == ".rc") then _p('$(OBJDIR)/%s.res: %s', _MAKE.esc(path.getbasename(file)), _MAKE.esc(file)) _p('\t@echo $(notdir $<)') @@ -310,7 +310,7 @@ _p('else') _p('\t$(SILENT) xcopy /D /Y /Q "$(subst /,\\,$<)" "$(subst /,\\,$(OBJDIR))" 1>nul') _p('endif') - cpp.buildcommand(prj.language == "C") + cpp.buildcommand(prj.language == "C", "gch") _p('endif') _p('') end @@ -320,9 +320,7 @@ -- Build command for a single file. -- - function cpp.buildcommand(iscfile) + function cpp.buildcommand(iscfile, objext) local flags = iif(iscfile, '$(CC) $(CFLAGS)', '$(CXX) $(CXXFLAGS)') - _p('\t$(SILENT) %s -o "$@" -MF $(@:%%.o=%%.d) -c "$<"', flags) + _p('\t$(SILENT) %s -o "$@" -MF $(@:%%.%s=%%.d) -c "$<"', flags, objext) end - - diff --git a/tests/actions/make/test_make_pch.lua b/tests/actions/make/test_make_pch.lua index f52bf3e..ee48a1b 100644 --- a/tests/actions/make/test_make_pch.lua +++ b/tests/actions/make/test_make_pch.lua @@ -73,7 +73,7 @@ ifeq (posix,$(SHELLTYPE)) else $(SILENT) xcopy /D /Y /Q "$(subst /,\,$<)" "$(subst /,\,$(OBJDIR))" 1>nul endif - $(SILENT) $(CXX) $(CXXFLAGS) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CXX) $(CXXFLAGS) -o "$@" -MF $(@:%.gch=%.d) -c "$<" endif ]] end @@ -92,7 +92,7 @@ ifeq (posix,$(SHELLTYPE)) else $(SILENT) xcopy /D /Y /Q "$(subst /,\,$<)" "$(subst /,\,$(OBJDIR))" 1>nul endif - $(SILENT) $(CC) $(CFLAGS) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(SILENT) $(CC) $(CFLAGS) -o "$@" -MF $(@:%.gch=%.d) -c "$<" endif ]] end |