Merge branch 'master' into luasocket

This commit is contained in:
redorav 2018-03-23 08:36:48 +00:00 committed by GitHub
commit a013b6aa62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 33 additions and 30 deletions

View File

@ -267,7 +267,7 @@
---------------------------------------------------------------------------
function gmake2.phonyRules(prj)
_p('.PHONY: clean prebuild prelink')
_p('.PHONY: clean prebuild')
_p('')
end
@ -349,19 +349,12 @@
function gmake2.preBuildRules(cfg, toolset)
_p('prebuild:')
_p('prebuild: | $(OBJDIR)')
_p('\t$(PREBUILDCMDS)')
_p('')
end
function gmake2.preLinkRules(cfg, toolset)
_p('prelink:')
_p('\t$(PRELINKCMDS)')
_p('')
end
include("gmake2_cpp.lua")
include("gmake2_csharp.lua")

View File

@ -642,7 +642,7 @@
gmake2.objDirRules,
cpp.cleanRules,
gmake2.preBuildRules,
gmake2.preLinkRules,
cpp.customDeps,
cpp.pchRules,
}
end
@ -658,13 +658,13 @@
function cpp.allRules(cfg, toolset)
if cfg.system == p.MACOSX and cfg.kind == p.WINDOWEDAPP then
_p('all: prebuild prelink $(TARGET) $(dir $(TARGETDIR))PkgInfo $(dir $(TARGETDIR))Info.plist | $(TARGETDIR) $(OBJDIR)')
_p('all: $(TARGET) $(dir $(TARGETDIR))PkgInfo $(dir $(TARGETDIR))Info.plist')
_p('\t@:')
_p('')
_p('$(dir $(TARGETDIR))PkgInfo:')
_p('$(dir $(TARGETDIR))Info.plist:')
else
_p('all: prebuild prelink $(TARGET) | $(TARGETDIR) $(OBJDIR)')
_p('all: $(TARGET)')
_p('\t@:')
end
_p('')
@ -672,7 +672,7 @@
function cpp.targetRules(cfg, toolset)
local targets = '$(GCH) '
local targets = ''
for _, kind in ipairs(cfg._gmake.kinds) do
if kind ~= 'OBJECTS' and kind ~= 'RESOURCES' then
@ -686,6 +686,7 @@
end
_p('$(TARGET): %s | $(TARGETDIR)', targets)
_p('\t$(PRELINKCMDS)')
_p('\t@echo Linking %s', cfg.project.name)
_p('\t$(SILENT) $(LINKCMD)')
_p('\t$(POSTBUILDCMDS)')
@ -693,6 +694,15 @@
end
function cpp.customDeps(cfg, toolset)
for _, kind in ipairs(cfg._gmake.kinds) do
if kind == 'CUSTOM' or kind == 'SOURCES' then
_p('$(%s): | prebuild', kind)
end
end
end
function cpp.cleanRules(cfg, toolset)
_p('clean:')
_p('\t@echo Cleaning %s', cfg.project.name)
@ -709,8 +719,8 @@
function cpp.pchRules(cfg, toolset)
_p('ifneq (,$(PCH))')
_p('$(OBJECTS): $(GCH) $(PCH) | $(OBJDIR) $(PCH_PLACEHOLDER)')
_p('$(GCH): $(PCH) | $(OBJDIR)')
_p('$(OBJECTS): $(GCH) | $(PCH_PLACEHOLDER)')
_p('$(GCH): $(PCH) | prebuild')
_p('\t@echo $(notdir $<)')
local cmd = iif(p.languages.isc(cfg.language), "$(CC) -x c-header $(ALL_CFLAGS)", "$(CXX) -x c++-header $(ALL_CXXFLAGS)")
_p('\t$(SILENT) %s -o "$@" -MF "$(@:%%.gch=%%.d)" -c "$<"', cmd)
@ -721,7 +731,7 @@
_p('\t$(SILENT) echo $null >> "$@"')
_p('endif')
_p('else')
_p('$(OBJECTS): | $(OBJDIR)')
_p('$(OBJECTS): | prebuild')
_p('endif')
_p('')
end

View File

@ -44,7 +44,6 @@
gmake2.objDirRules,
gmake2.csCleanRules,
gmake2.preBuildRules,
gmake2.preLinkRules,
gmake2.csFileRules,
}
end
@ -135,7 +134,7 @@
---------------------------------------------------------------------------
function gmake2.csAllRules(prj, toolset)
_p('all: $(TARGETDIR) $(OBJDIR) prebuild $(EMBEDFILES) $(COPYFILES) prelink $(TARGET)')
_p('all: prebuild $(EMBEDFILES) $(COPYFILES) $(TARGET)')
_p('')
end
@ -304,7 +303,8 @@
function gmake2.csTargetRules(prj, toolset)
_p('$(TARGET): $(SOURCES) $(EMBEDFILES) $(DEPENDS) $(RESPONSE)')
_p('$(TARGET): $(SOURCES) $(EMBEDFILES) $(DEPENDS) $(RESPONSE) | $(TARGETDIR)')
_p('\t$(PRELINKCMDS)')
_p('\t$(SILENT) $(CSC) /nologo /out:$@ $(FLAGS) $(REFERENCES) @$(RESPONSE) $(patsubst %%,/resource:%%,$(EMBEDFILES))')
_p('\t$(POSTBUILDCMDS)')
_p('')

View File

@ -294,8 +294,6 @@
utility.targetRules,
gmake2.targetDirRules,
utility.cleanRules,
gmake2.preBuildRules,
gmake2.preLinkRules,
}
end
@ -309,7 +307,7 @@
function utility.allRules(cfg, toolset)
local allTargets = 'all: $(TARGETDIR) prebuild prelink $(TARGET)'
local allTargets = 'all: $(TARGETDIR) $(TARGET)'
for _, kind in ipairs(cfg._gmake.kinds) do
allTargets = allTargets .. ' $(' .. kind .. ')'
end
@ -327,6 +325,8 @@
end
_p('$(TARGET): %s', targets)
_p('\t$(PREBUILDCMDS)')
_p('\t$(PRELINKCMDS)')
_p('\t$(POSTBUILDCMDS)')
_p('')
end

View File

@ -97,8 +97,8 @@ PCH = ../../../src/host/premake.h
prepareRules()
test.capture [[
ifneq (,$(PCH))
$(OBJECTS): $(GCH) $(PCH) | $(OBJDIR) $(PCH_PLACEHOLDER)
$(GCH): $(PCH) | $(OBJDIR)
$(OBJECTS): $(GCH) | $(PCH_PLACEHOLDER)
$(GCH): $(PCH) | prebuild
@echo $(notdir $<)
$(SILENT) $(CXX) -x c++-header $(ALL_CXXFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<"
$(PCH_PLACEHOLDER): $(GCH) | $(OBJDIR)
@ -108,7 +108,7 @@ else
$(SILENT) echo $null >> "$@"
endif
else
$(OBJECTS): | $(OBJDIR)
$(OBJECTS): | prebuild
endif
]]
end
@ -124,8 +124,8 @@ endif
prepareRules()
test.capture [[
ifneq (,$(PCH))
$(OBJECTS): $(GCH) $(PCH) | $(OBJDIR) $(PCH_PLACEHOLDER)
$(GCH): $(PCH) | $(OBJDIR)
$(OBJECTS): $(GCH) | $(PCH_PLACEHOLDER)
$(GCH): $(PCH) | prebuild
@echo $(notdir $<)
$(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<"
$(PCH_PLACEHOLDER): $(GCH) | $(OBJDIR)
@ -135,7 +135,7 @@ else
$(SILENT) echo $null >> "$@"
endif
else
$(OBJECTS): | $(OBJDIR)
$(OBJECTS): | prebuild
endif
]]
end

View File

@ -36,7 +36,7 @@
function suite.defaultRules()
prepare()
test.capture [[
all: prebuild prelink $(TARGET) | $(TARGETDIR) $(OBJDIR)
all: $(TARGET)
@:
]]
end
@ -51,7 +51,7 @@ all: prebuild prelink $(TARGET) | $(TARGETDIR) $(OBJDIR)
kind "WindowedApp"
prepare()
test.capture [[
all: prebuild prelink $(TARGET) $(dir $(TARGETDIR))PkgInfo $(dir $(TARGETDIR))Info.plist | $(TARGETDIR) $(OBJDIR)
all: $(TARGET) $(dir $(TARGETDIR))PkgInfo $(dir $(TARGETDIR))Info.plist
@:
$(dir $(TARGETDIR))PkgInfo: