diff options
author | Boris Nagaev <bnagaev@gmail.com> | 2015-11-04 16:28:00 (GMT) |
---|---|---|
committer | Boris Nagaev <bnagaev@gmail.com> | 2015-11-09 22:33:55 (GMT) |
commit | 718b89a06e8d76960ceb6f5cb6b44eac5bb2132f (patch) | |
tree | 31c7b5f4c40d620cb5bb4195cc4a05d695099a36 /tools/build-pkg.lua | |
parent | bf6aa9b5502b37defe8ed7809d2c0370f77e97fa (diff) | |
download | mxe-718b89a06e8d76960ceb6f5cb6b44eac5bb2132f.zip mxe-718b89a06e8d76960ceb6f5cb6b44eac5bb2132f.tar.gz mxe-718b89a06e8d76960ceb6f5cb6b44eac5bb2132f.tar.bz2 |
build-pkg: report shared items installing no .dll
Report only if the item installs .a
See https://github.com/mxe/mxe/pull/966#issuecomment-153712570
Diffstat (limited to 'tools/build-pkg.lua')
-rwxr-xr-x | tools/build-pkg.lua | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tools/build-pkg.lua b/tools/build-pkg.lua index dd08180..9ddeeb0 100755 --- a/tools/build-pkg.lua +++ b/tools/build-pkg.lua @@ -112,6 +112,16 @@ local function sliceArray(list, nelements) return new_list end +local function concatArrays(...) + local result = {} + for _, array in ipairs({...}) do + for _, elem in ipairs(array) do + table.insert(result, elem) + end + end + return result +end + local function isInString(substring, string) return string:find(substring, 1, true) end @@ -352,6 +362,26 @@ local function checkFile(file, item) end end +local function checkFileList(files, item) + local target, _ = parseItem(item) + if target:match('shared') then + local has_a, has_dll + for _, file in ipairs(files) do + file = file:lower() + if file:match('%.a') then + has_a = true + end + if file:match('%.dll') then + has_dll = true + end + end + if has_a and not has_dll then + log('Shared item %s installs .a file ' .. + 'but no .dll', item) + end + end +end + -- builds package, returns list of new files local function buildItem(item, item2deps, file2item) local target, pkg = parseItem(item) @@ -374,6 +404,7 @@ local function buildItem(item, item2deps, file2item) log('Item %s changes %s, created by %s', item, file, creator_item) end + checkFileList(concatArrays(new_files, changed_files), item) return new_files end |