Merge branch 'master' into ssurtees/codeliteStartProjectFix
This commit is contained in:
commit
5a85b73f9f
@ -45,6 +45,9 @@ none:
|
||||
@echo " osx linux"
|
||||
|
||||
mingw: $(SRC)
|
||||
$(SILENT) rm -rf ./bin
|
||||
$(SILENT) rm -rf ./build
|
||||
$(SILENT) rm -rf ./obj
|
||||
mkdir -p build/bootstrap
|
||||
$(CC) -o build/bootstrap/premake_bootstrap -DPREMAKE_NO_BUILTIN_SCRIPTS -I"$(LUA_DIR)" $? -lole32
|
||||
./build/bootstrap/premake_bootstrap embed
|
||||
@ -52,6 +55,9 @@ mingw: $(SRC)
|
||||
$(MAKE) -C build/bootstrap
|
||||
|
||||
osx: $(SRC)
|
||||
$(SILENT) rm -rf ./bin
|
||||
$(SILENT) rm -rf ./build
|
||||
$(SILENT) rm -rf ./obj
|
||||
mkdir -p build/bootstrap
|
||||
$(CC) -o build/bootstrap/premake_bootstrap -DPREMAKE_NO_BUILTIN_SCRIPTS -DLUA_USE_MACOSX -I"$(LUA_DIR)" -framework CoreServices -framework Foundation -framework Security $?
|
||||
./build/bootstrap/premake_bootstrap embed
|
||||
@ -59,6 +65,9 @@ osx: $(SRC)
|
||||
$(MAKE) -C build/bootstrap -j`getconf _NPROCESSORS_ONLN`
|
||||
|
||||
linux: $(SRC)
|
||||
$(SILENT) rm -rf ./bin
|
||||
$(SILENT) rm -rf ./build
|
||||
$(SILENT) rm -rf ./obj
|
||||
mkdir -p build/bootstrap
|
||||
$(CC) -o build/bootstrap/premake_bootstrap -DPREMAKE_NO_BUILTIN_SCRIPTS -DLUA_USE_POSIX -DLUA_USE_DLOPEN -I"$(LUA_DIR)" $? -lm -ldl -lrt
|
||||
./build/bootstrap/premake_bootstrap embed
|
||||
@ -66,6 +75,9 @@ linux: $(SRC)
|
||||
$(MAKE) -C build/bootstrap -j`getconf _NPROCESSORS_ONLN`
|
||||
|
||||
bsd: $(SRC)
|
||||
$(SILENT) rm -rf ./bin
|
||||
$(SILENT) rm -rf ./build
|
||||
$(SILENT) rm -rf ./obj
|
||||
mkdir -p build/bootstrap
|
||||
$(CC) -o build/bootstrap/premake_bootstrap -DPREMAKE_NO_BUILTIN_SCRIPTS -DLUA_USE_POSIX -DLUA_USE_DLOPEN -I"$(LUA_DIR)" $? -lm
|
||||
./build/bootstrap/premake_bootstrap embed
|
||||
@ -73,6 +85,9 @@ bsd: $(SRC)
|
||||
$(MAKE) -C build/bootstrap -j`getconf _NPROCESSORS_ONLN`
|
||||
|
||||
windows-base: $(SRC)
|
||||
$(SILENT) if exist .\bin rmdir /s /q .\bin
|
||||
$(SILENT) if exist .\build rmdir /s /q .\build
|
||||
$(SILENT) if exist .\obj rmdir /s /q .\obj
|
||||
if not exist build\bootstrap (mkdir build\bootstrap)
|
||||
cl /Fo.\build\bootstrap\ /Fe.\build\bootstrap\premake_bootstrap.exe /DPREMAKE_NO_BUILTIN_SCRIPTS /I"$(LUA_DIR)" user32.lib ole32.lib advapi32.lib $**
|
||||
.\build\bootstrap\premake_bootstrap.exe embed
|
||||
|
@ -127,18 +127,16 @@
|
||||
|
||||
print("Cleaning up the source tree...")
|
||||
os.rmdir("packages")
|
||||
os.rmdir(".git")
|
||||
|
||||
local modules = table.join(".", os.matchdirs("modules/*"))
|
||||
for _, module in ipairs(modules) do
|
||||
for _, name in ipairs { ".git" } do
|
||||
os.rmdir(path.join(module, name))
|
||||
end
|
||||
for _, name in ipairs { ".DS_Store", ".git", ".gitignore", ".gitmodules", ".travis.yml", ".editorconfig", "Bootstrap.mak" } do
|
||||
os.remove(path.join(module, name))
|
||||
local removelist = { ".DS_Store", ".git", ".gitignore", ".gitmodules", ".travis.yml", ".editorconfig", "appveyor.yml", "Bootstrap.mak" }
|
||||
for _, removeitem in ipairs(removelist) do
|
||||
local founditems = os.matchfiles("**" .. removeitem)
|
||||
for _, item in ipairs(founditems) do
|
||||
os.remove(item)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- Generate a source package.
|
||||
--
|
||||
@ -152,9 +150,11 @@ if kind == "source" then
|
||||
execQuiet("premake5 /to=build/vs2012 vs2012")
|
||||
execQuiet("premake5 /to=build/vs2013 vs2013")
|
||||
execQuiet("premake5 /to=build/vs2015 vs2015")
|
||||
execQuiet("premake5 /to=build/vs2017 vs2017")
|
||||
execQuiet("premake5 /to=build/gmake.windows /os=windows gmake")
|
||||
execQuiet("premake5 /to=build/gmake.unix /os=linux gmake")
|
||||
execQuiet("premake5 /to=build/gmake.macosx /os=macosx gmake")
|
||||
execQuiet("premake5 /to=build/gmake.bsd /os=bsd gmake")
|
||||
|
||||
print("Creating source code package...")
|
||||
os.chdir("..")
|
||||
|
@ -535,15 +535,24 @@
|
||||
end
|
||||
|
||||
local processOne = function(cmd)
|
||||
local token = cmd:match("^{.+}")
|
||||
if token then
|
||||
token = token:sub(2, #token - 1):lower()
|
||||
local args = cmd:sub(#token + 4)
|
||||
local func = map[token] or os.commandTokens["_"][token]
|
||||
if func then
|
||||
cmd = func(args)
|
||||
local i, j, prev
|
||||
repeat
|
||||
i, j = cmd:find("{.-}")
|
||||
if i then
|
||||
if i == prev then
|
||||
break
|
||||
end
|
||||
|
||||
local token = cmd:sub(i + 1, j - 1):lower()
|
||||
local args = cmd:sub(j + 2)
|
||||
local func = map[token] or os.commandTokens["_"][token]
|
||||
if func then
|
||||
cmd = cmd:sub(1, i -1) .. func(args)
|
||||
end
|
||||
|
||||
prev = i
|
||||
end
|
||||
end
|
||||
until i == nil
|
||||
return cmd
|
||||
end
|
||||
|
||||
|
@ -177,6 +177,13 @@
|
||||
test.isequal("test a b", os.translateCommands("{COPY} a b", "test"))
|
||||
end
|
||||
|
||||
function suite.translateCommand_callsProcessor_multipleTokens()
|
||||
os.commandTokens.test = {
|
||||
copy = function(value) return "test " .. value end
|
||||
}
|
||||
test.isequal("test a b; test c d; test e f;", os.translateCommands("{COPY} a b; {COPY} c d; {COPY} e f;", "test"))
|
||||
end
|
||||
|
||||
--
|
||||
-- os.translateCommand() windows COPY tests
|
||||
--
|
||||
|
Loading…
Reference in New Issue
Block a user