Patch 3476176: Fix dependencies of precompiled header in makefile (Konstantin Tokarev)

This commit is contained in:
Jason Perkins 2012-09-05 18:37:53 -04:00
parent 7a65362e40
commit 99aee5ac1f
4 changed files with 8 additions and 7 deletions

View File

@ -80,6 +80,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)
-------

View File

@ -165,9 +165,9 @@
-- Build command for a single file.
--
function cpp.buildcommand(prj)
function cpp.buildcommand(prj, objext)
local flags = iif(prj.language == "C", '$(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
@ -207,7 +207,7 @@
local objectname = project.getfileobject(prj, node.abspath)
_p('$(OBJDIR)/%s.o: %s', make.esc(objectname), make.esc(node.relpath))
_p('\t@echo $(notdir $<)')
cpp.buildcommand(prj)
cpp.buildcommand(prj, "o")
-- resource file
elseif path.isresourcefile(node.abspath) then
@ -423,7 +423,7 @@
_p('else')
_p('\t$(SILENT) xcopy /D /Y /Q "$(subst /,\\,$<)" "$(subst /,\\,$(OBJDIR))" 1>nul')
_p('endif')
cpp.buildcommand(prj)
cpp.buildcommand(prj, "gch")
_p('endif')
_p('')
end

View File

@ -101,7 +101,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
@ -125,7 +125,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

View File

@ -115,7 +115,7 @@
--
-- The import library extension should change if the a
-- The import library extension should not change if the a
-- custom target extension is set.
--