diff options
author | Jason Perkins <starkos@industriousone.com> | 2011-09-20 00:45:49 +0400 |
---|---|---|
committer | Jason Perkins <starkos@industriousone.com> | 2011-09-20 00:45:49 +0400 |
commit | 7c9dea1f22e2b7dc82ea7ef88be0a9350ec00b55 (patch) | |
tree | 92c2e3f409fc92def0468338c9d58ac9813b96e4 | |
parent | 611014c522a72ea942f5e7fc2097f48ed8e7476d (diff) |
Patch 3035550: Make/Distcc outputs dependencies to wrong location
-rw-r--r-- | CHANGES.txt | 2 | ||||
-rw-r--r-- | src/actions/make/make_cpp.lua | 24 | ||||
-rw-r--r-- | tests/actions/make/test_make_pch.lua | 4 | ||||
-rw-r--r-- | tests/actions/make/test_wiidev.lua | 2 |
4 files changed, 19 insertions, 13 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index 95d539b..601185f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -30,6 +30,8 @@ * Added os.stat * Bug 3381149: Path of PCH source file in VS10 not being translated (intyuh) * Patch 3021550: Add Wii homebrew platform (Pathogen David) +* Patch 3035550: Make/Distcc outputs dependencies to wrong location + ------- 4.3 diff --git a/src/actions/make/make_cpp.lua b/src/actions/make/make_cpp.lua index f2deaef..0e5570a 100644 --- a/src/actions/make/make_cpp.lua +++ b/src/actions/make/make_cpp.lua @@ -114,11 +114,7 @@ if path.iscppfile(file) then _p('$(OBJDIR)/%s.o: %s', _MAKE.esc(path.getbasename(file)), _MAKE.esc(file)) _p('\t@echo $(notdir $<)') - if (path.iscfile(file)) then - _p('\t$(SILENT) $(CC) $(CFLAGS) -o "$@" -c "$<"') - else - _p('\t$(SILENT) $(CXX) $(CXXFLAGS) -o "$@" -c "$<"') - end + cpp.buildcommand(path.iscfile(file)) elseif (path.getextension(file) == ".rc") then _p('$(OBJDIR)/%s.res: %s', _MAKE.esc(path.getbasename(file)), _MAKE.esc(file)) _p('\t@echo $(notdir $<)') @@ -285,11 +281,19 @@ _p('$(GCH): $(PCH)') _p('\t@echo $(notdir $<)') _p('\t-$(SILENT) cp $< $(OBJDIR)') - if prj.language == "C" then - _p('\t$(SILENT) $(CC) $(CFLAGS) -o "$@" -c "$<"') - else - _p('\t$(SILENT) $(CXX) $(CXXFLAGS) -o "$@" -c "$<"') - end + cpp.buildcommand(prj.language == "C") _p('endif') _p('') 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 + + diff --git a/tests/actions/make/test_make_pch.lua b/tests/actions/make/test_make_pch.lua index 8d772d4..2315f31 100644 --- a/tests/actions/make/test_make_pch.lua +++ b/tests/actions/make/test_make_pch.lua @@ -69,7 +69,7 @@ ifneq (,$(PCH)) $(GCH): $(PCH) @echo $(notdir $<) -$(SILENT) cp $< $(OBJDIR) - $(SILENT) $(CXX) $(CXXFLAGS) -o "$@" -c "$<" + $(SILENT) $(CXX) $(CXXFLAGS) -o "$@" -MF $(@:%.o=%.d) -c "$<" endif ]] end @@ -84,7 +84,7 @@ ifneq (,$(PCH)) $(GCH): $(PCH) @echo $(notdir $<) -$(SILENT) cp $< $(OBJDIR) - $(SILENT) $(CC) $(CFLAGS) -o "$@" -c "$<" + $(SILENT) $(CC) $(CFLAGS) -o "$@" -MF $(@:%.o=%.d) -c "$<" endif ]] end diff --git a/tests/actions/make/test_wiidev.lua b/tests/actions/make/test_wiidev.lua index 9ed707f..fd0bfdd 100644 --- a/tests/actions/make/test_wiidev.lua +++ b/tests/actions/make/test_wiidev.lua @@ -35,7 +35,7 @@ CPPFLAGS += -MMD -MP -I$(LIBOGC_INC) $(MACHDEP) -MP $(DEFINES) $(INCLUDES) CFLAGS += $(CPPFLAGS) $(ARCH) CXXFLAGS += $(CFLAGS) - LDFLAGS += -s lwiiuse -lbte -logc -lm -L$(LIBOGC_LIB) $(MACHDEP) + LDFLAGS += -s -L$(LIBOGC_LIB) $(MACHDEP) RESFLAGS += $(DEFINES) $(INCLUDES) ]] end |