Patch 3035550: Make/Distcc outputs dependencies to wrong location

This commit is contained in:
Jason Perkins 2011-09-19 16:45:49 -04:00
parent dfda94d862
commit 15af117ef9
4 changed files with 19 additions and 13 deletions

View File

@ -30,6 +30,8 @@
* Added os.stat * Added os.stat
* Bug 3381149: Path of PCH source file in VS10 not being translated (intyuh) * Bug 3381149: Path of PCH source file in VS10 not being translated (intyuh)
* Patch 3021550: Add Wii homebrew platform (Pathogen David) * Patch 3021550: Add Wii homebrew platform (Pathogen David)
* Patch 3035550: Make/Distcc outputs dependencies to wrong location
------- -------
4.3 4.3

View File

@ -114,11 +114,7 @@
if path.iscppfile(file) then if path.iscppfile(file) then
_p('$(OBJDIR)/%s.o: %s', _MAKE.esc(path.getbasename(file)), _MAKE.esc(file)) _p('$(OBJDIR)/%s.o: %s', _MAKE.esc(path.getbasename(file)), _MAKE.esc(file))
_p('\t@echo $(notdir $<)') _p('\t@echo $(notdir $<)')
if (path.iscfile(file)) then cpp.buildcommand(path.iscfile(file))
_p('\t$(SILENT) $(CC) $(CFLAGS) -o "$@" -c "$<"')
else
_p('\t$(SILENT) $(CXX) $(CXXFLAGS) -o "$@" -c "$<"')
end
elseif (path.getextension(file) == ".rc") then elseif (path.getextension(file) == ".rc") then
_p('$(OBJDIR)/%s.res: %s', _MAKE.esc(path.getbasename(file)), _MAKE.esc(file)) _p('$(OBJDIR)/%s.res: %s', _MAKE.esc(path.getbasename(file)), _MAKE.esc(file))
_p('\t@echo $(notdir $<)') _p('\t@echo $(notdir $<)')
@ -285,11 +281,19 @@
_p('$(GCH): $(PCH)') _p('$(GCH): $(PCH)')
_p('\t@echo $(notdir $<)') _p('\t@echo $(notdir $<)')
_p('\t-$(SILENT) cp $< $(OBJDIR)') _p('\t-$(SILENT) cp $< $(OBJDIR)')
if prj.language == "C" then cpp.buildcommand(prj.language == "C")
_p('\t$(SILENT) $(CC) $(CFLAGS) -o "$@" -c "$<"')
else
_p('\t$(SILENT) $(CXX) $(CXXFLAGS) -o "$@" -c "$<"')
end
_p('endif') _p('endif')
_p('') _p('')
end end
--
-- Build command for a single file.
--
function cpp.buildcommand(iscfile)
local flags = iif(iscfile, '$(CC) $(CFLAGS)', '$(CXX) $(CXXFLAGS)')
_p('\t$(SILENT) %s -o "$@" -MF $(@:%%.o=%%.d) -c "$<"', flags)
end

View File

@ -69,7 +69,7 @@ ifneq (,$(PCH))
$(GCH): $(PCH) $(GCH): $(PCH)
@echo $(notdir $<) @echo $(notdir $<)
-$(SILENT) cp $< $(OBJDIR) -$(SILENT) cp $< $(OBJDIR)
$(SILENT) $(CXX) $(CXXFLAGS) -o "$@" -c "$<" $(SILENT) $(CXX) $(CXXFLAGS) -o "$@" -MF $(@:%.o=%.d) -c "$<"
endif endif
]] ]]
end end
@ -84,7 +84,7 @@ ifneq (,$(PCH))
$(GCH): $(PCH) $(GCH): $(PCH)
@echo $(notdir $<) @echo $(notdir $<)
-$(SILENT) cp $< $(OBJDIR) -$(SILENT) cp $< $(OBJDIR)
$(SILENT) $(CC) $(CFLAGS) -o "$@" -c "$<" $(SILENT) $(CC) $(CFLAGS) -o "$@" -MF $(@:%.o=%.d) -c "$<"
endif endif
]] ]]
end end

View File

@ -35,7 +35,7 @@
CPPFLAGS += -MMD -MP -I$(LIBOGC_INC) $(MACHDEP) -MP $(DEFINES) $(INCLUDES) CPPFLAGS += -MMD -MP -I$(LIBOGC_INC) $(MACHDEP) -MP $(DEFINES) $(INCLUDES)
CFLAGS += $(CPPFLAGS) $(ARCH) CFLAGS += $(CPPFLAGS) $(ARCH)
CXXFLAGS += $(CFLAGS) CXXFLAGS += $(CFLAGS)
LDFLAGS += -s lwiiuse -lbte -logc -lm -L$(LIBOGC_LIB) $(MACHDEP) LDFLAGS += -s -L$(LIBOGC_LIB) $(MACHDEP)
RESFLAGS += $(DEFINES) $(INCLUDES) RESFLAGS += $(DEFINES) $(INCLUDES)
]] ]]
end end