summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorBoris Nagaev <bnagaev@gmail.com>2016-06-11 18:54:26 (GMT)
committerBoris Nagaev <bnagaev@gmail.com>2016-06-11 18:54:26 (GMT)
commitfba599d2d7cacc6d46aa39091664f219ce8eb879 (patch)
tree654364469b5cad75ef6dedcfd8e2695148ac6730 /tools
parent4d43e1fe47318688d161c704895b40d26a69b3f7 (diff)
downloadmxe-fba599d2d7cacc6d46aa39091664f219ce8eb879.zip
mxe-fba599d2d7cacc6d46aa39091664f219ce8eb879.tar.gz
mxe-fba599d2d7cacc6d46aa39091664f219ce8eb879.tar.bz2
build-pkg: add env. var to change targets
MXE_BUILD_PKG_TARGETS
Diffstat (limited to 'tools')
-rwxr-xr-xtools/build-pkg.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/build-pkg.lua b/tools/build-pkg.lua
index 3a5a25f..0056249 100755
--- a/tools/build-pkg.lua
+++ b/tools/build-pkg.lua
@@ -26,6 +26,11 @@ See https://github.com/mxe/mxe/issues/1111
To limit number of packages being built to x,
set environment variable MXE_BUILD_PKG_MAX_ITEMS to x.
+To set list of MXE targets to build,
+set environment variable MXE_BUILD_PKG_TARGETS to
+the list of targets separated by space.
+By default, all 4 major targets are built.
+
The following error:
> fakeroot, while creating message channels: Invalid argument
> This may be due to a lack of SYSV IPC support.
@@ -37,6 +42,7 @@ How to remove them: http://stackoverflow.com/a/4262545
local max_items = tonumber(os.getenv('MXE_BUILD_PKG_MAX_ITEMS'))
local no_debs = os.getenv('MXE_BUILD_PKG_NO_DEBS')
local no_second_pass = os.getenv('MXE_BUILD_PKG_NO_SECOND_PASS')
+local build_targets = os.getenv('MXE_BUILD_PKG_TARGETS')
local TODAY = os.date("%Y%m%d")
@@ -64,6 +70,12 @@ local TARGETS = {
'i686-w64-mingw32.shared',
'x86_64-w64-mingw32.shared',
}
+if build_targets then
+ TARGETS = {}
+ for target in build_targets:gmatch('(%S+)') do
+ table.insert(TARGETS, target)
+ end
+end
local function echo(fmt, ...)
print(fmt:format(...))