@port-labs/jq-node-bindings 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/binding.gyp +3 -3
- package/configure +8 -6
- package/deps/jq/.travis.yml +184 -35
- package/deps/jq/AUTHORS +31 -30
- package/deps/jq/COPYING +2 -2
- package/deps/jq/KEYS +8 -0
- package/deps/jq/Makefile.am +85 -70
- package/deps/jq/NEWS +5 -4
- package/deps/jq/README.md +18 -9
- package/deps/jq/appveyor.yml +53 -0
- package/deps/jq/compile-ios.sh +5 -5
- package/deps/jq/config/m4/check-math-func.m4 +7 -2
- package/deps/jq/configure.ac +130 -68
- package/deps/jq/docs/Rakefile +14 -135
- package/deps/jq/docs/Rakefile.manual +49 -0
- package/deps/jq/docs/Rakefile.website +76 -0
- package/deps/jq/docs/content/2.download/default.yml +115 -39
- package/deps/jq/docs/content/3.manual/manual.yml +641 -231
- package/deps/jq/docs/content/3.manual/v1.3/manual.yml +130 -130
- package/deps/jq/docs/content/3.manual/v1.4/manual.yml +160 -160
- package/deps/jq/docs/content/3.manual/v1.5/manual.yml +2878 -0
- package/deps/jq/docs/content/3.manual/v1.6/manual.yml +3287 -0
- package/deps/jq/docs/content/index/index.yml +28 -6
- package/deps/jq/docs/public/.htaccess +2 -2
- package/deps/jq/docs/public/css/base.scss +141 -59
- package/deps/jq/docs/public/js/manual-search.js +52 -0
- package/deps/jq/docs/site.yml +1 -10
- package/deps/jq/docs/templates/default.liquid +10 -10
- package/deps/jq/docs/templates/index.liquid +45 -32
- package/deps/jq/docs/templates/manual.liquid +67 -90
- package/deps/jq/docs/templates/shared/_footer.liquid +10 -5
- package/deps/jq/docs/templates/shared/_head.liquid +17 -12
- package/deps/jq/docs/templates/shared/_navbar.liquid +27 -0
- package/deps/jq/jq.1.prebuilt +523 -139
- package/deps/jq/modules/oniguruma/AUTHORS +1 -0
- package/deps/jq/modules/oniguruma/CMakeLists.txt +86 -0
- package/deps/jq/modules/oniguruma/COPYING +28 -0
- package/deps/jq/modules/oniguruma/ChangeLog +0 -0
- package/deps/jq/modules/oniguruma/HISTORY +2138 -0
- package/deps/jq/modules/oniguruma/Makefile.am +33 -0
- package/deps/jq/modules/oniguruma/NEWS +0 -0
- package/deps/jq/modules/oniguruma/README +189 -0
- package/deps/jq/modules/oniguruma/README.ja +195 -0
- package/deps/jq/modules/oniguruma/README.md +203 -0
- package/deps/jq/modules/oniguruma/cmake/dist.cmake +321 -0
- package/deps/jq/modules/oniguruma/compile +348 -0
- package/deps/jq/modules/oniguruma/config.guess +1754 -0
- package/deps/jq/modules/oniguruma/config.sub +1890 -0
- package/deps/jq/modules/oniguruma/configure.ac +87 -0
- package/deps/jq/modules/oniguruma/contributed/libfuzzer-onig.cpp +31 -0
- package/deps/jq/modules/oniguruma/depcomp +791 -0
- package/deps/jq/modules/oniguruma/dist.info +10 -0
- package/deps/jq/modules/oniguruma/doc/API +660 -0
- package/deps/jq/modules/oniguruma/doc/API.ja +667 -0
- package/deps/jq/modules/oniguruma/doc/FAQ +12 -0
- package/deps/jq/modules/oniguruma/doc/FAQ.ja +22 -0
- package/deps/jq/modules/oniguruma/doc/RE +436 -0
- package/deps/jq/modules/oniguruma/doc/RE.ja +448 -0
- package/deps/jq/modules/oniguruma/doc/UNICODE_PROPERTIES +698 -0
- package/deps/jq/modules/oniguruma/index.html +181 -0
- package/deps/jq/modules/oniguruma/index_ja.html +184 -0
- package/deps/jq/modules/oniguruma/install-sh +541 -0
- package/deps/jq/modules/oniguruma/m4/.whatever +0 -0
- package/deps/jq/modules/oniguruma/make_win32.bat +3 -0
- package/deps/jq/modules/oniguruma/make_win64.bat +3 -0
- package/deps/jq/modules/oniguruma/missing +215 -0
- package/deps/jq/modules/oniguruma/onig-config.in +78 -0
- package/deps/jq/modules/oniguruma/oniguruma.pc.cmake.in +13 -0
- package/deps/jq/modules/oniguruma/oniguruma.pc.in +14 -0
- package/deps/jq/modules/oniguruma/sample/CMakeLists.txt +28 -0
- package/deps/jq/modules/oniguruma/sample/Makefile.am +34 -0
- package/deps/jq/modules/oniguruma/sample/bug_fix.c +131 -0
- package/deps/jq/modules/oniguruma/sample/crnl.c +127 -0
- package/deps/jq/modules/oniguruma/sample/encode.c +308 -0
- package/deps/jq/modules/oniguruma/sample/listcap.c +110 -0
- package/deps/jq/modules/oniguruma/sample/names.c +75 -0
- package/deps/jq/modules/oniguruma/sample/posix.c +96 -0
- package/deps/jq/modules/oniguruma/sample/scan.c +88 -0
- package/deps/jq/modules/oniguruma/sample/simple.c +59 -0
- package/deps/jq/modules/oniguruma/sample/sql.c +76 -0
- package/deps/jq/modules/oniguruma/sample/syntax.c +76 -0
- package/deps/jq/modules/oniguruma/sample/user_property.c +87 -0
- package/deps/jq/modules/oniguruma/src/Makefile.am +58 -0
- package/deps/jq/modules/oniguruma/src/Makefile.windows +183 -0
- package/deps/jq/modules/oniguruma/src/ascii.c +61 -0
- package/deps/jq/modules/oniguruma/src/big5.c +190 -0
- package/deps/jq/modules/oniguruma/src/config.h.cmake.in +71 -0
- package/deps/jq/modules/oniguruma/src/config.h.win32 +84 -0
- package/deps/jq/modules/oniguruma/src/config.h.win64 +84 -0
- package/deps/jq/modules/oniguruma/src/cp1251.c +203 -0
- package/deps/jq/modules/oniguruma/src/euc_jp.c +310 -0
- package/deps/jq/modules/oniguruma/src/euc_jp_prop.c +158 -0
- package/deps/jq/modules/oniguruma/src/euc_jp_prop.gperf +27 -0
- package/deps/jq/modules/oniguruma/src/euc_kr.c +188 -0
- package/deps/jq/modules/oniguruma/src/euc_tw.c +171 -0
- package/deps/jq/modules/oniguruma/src/gb18030.c +538 -0
- package/deps/jq/modules/oniguruma/src/gperf_fold_key_conv.py +67 -0
- package/deps/jq/modules/oniguruma/src/gperf_unfold_key_conv.py +55 -0
- package/deps/jq/modules/oniguruma/src/iso8859_1.c +275 -0
- package/deps/jq/modules/oniguruma/src/iso8859_10.c +242 -0
- package/deps/jq/modules/oniguruma/src/iso8859_11.c +99 -0
- package/deps/jq/modules/oniguruma/src/iso8859_13.c +231 -0
- package/deps/jq/modules/oniguruma/src/iso8859_14.c +244 -0
- package/deps/jq/modules/oniguruma/src/iso8859_15.c +238 -0
- package/deps/jq/modules/oniguruma/src/iso8859_16.c +240 -0
- package/deps/jq/modules/oniguruma/src/iso8859_2.c +238 -0
- package/deps/jq/modules/oniguruma/src/iso8859_3.c +238 -0
- package/deps/jq/modules/oniguruma/src/iso8859_4.c +240 -0
- package/deps/jq/modules/oniguruma/src/iso8859_5.c +229 -0
- package/deps/jq/modules/oniguruma/src/iso8859_6.c +99 -0
- package/deps/jq/modules/oniguruma/src/iso8859_7.c +225 -0
- package/deps/jq/modules/oniguruma/src/iso8859_8.c +99 -0
- package/deps/jq/modules/oniguruma/src/iso8859_9.c +231 -0
- package/deps/jq/modules/oniguruma/src/koi8.c +253 -0
- package/deps/jq/modules/oniguruma/src/koi8_r.c +215 -0
- package/deps/jq/modules/oniguruma/src/make_unicode_fold.sh +22 -0
- package/deps/jq/modules/oniguruma/src/make_unicode_fold_data.py +306 -0
- package/deps/jq/modules/oniguruma/src/make_unicode_property.sh +18 -0
- package/deps/jq/modules/oniguruma/src/make_unicode_property_data.py +545 -0
- package/deps/jq/modules/oniguruma/src/mktable.c +1184 -0
- package/deps/jq/modules/oniguruma/src/onig_init.c +45 -0
- package/deps/jq/modules/oniguruma/src/oniggnu.h +85 -0
- package/deps/jq/modules/oniguruma/src/onigposix.h +169 -0
- package/deps/jq/modules/oniguruma/src/oniguruma.h +841 -0
- package/deps/jq/modules/oniguruma/src/regcomp.c +6300 -0
- package/deps/jq/modules/oniguruma/src/regenc.c +917 -0
- package/deps/jq/modules/oniguruma/src/regenc.h +243 -0
- package/deps/jq/modules/oniguruma/src/regerror.c +393 -0
- package/deps/jq/modules/oniguruma/src/regexec.c +3856 -0
- package/deps/jq/modules/oniguruma/src/regext.c +202 -0
- package/deps/jq/modules/oniguruma/src/reggnu.c +147 -0
- package/deps/jq/modules/oniguruma/src/regint.h +779 -0
- package/deps/jq/modules/oniguruma/src/regparse.c +5403 -0
- package/deps/jq/modules/oniguruma/src/regparse.h +351 -0
- package/deps/jq/modules/oniguruma/src/regposerr.c +105 -0
- package/deps/jq/modules/oniguruma/src/regposix.c +306 -0
- package/deps/jq/modules/oniguruma/src/regsyntax.c +315 -0
- package/deps/jq/modules/oniguruma/src/regtrav.c +76 -0
- package/deps/jq/modules/oniguruma/src/regversion.c +57 -0
- package/deps/jq/modules/oniguruma/src/sjis.c +341 -0
- package/deps/jq/modules/oniguruma/src/sjis_prop.c +158 -0
- package/deps/jq/modules/oniguruma/src/sjis_prop.gperf +27 -0
- package/deps/jq/modules/oniguruma/src/st.c +589 -0
- package/deps/jq/modules/oniguruma/src/st.h +68 -0
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold1_key.c +2250 -0
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold2_key.c +203 -0
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold3_key.c +113 -0
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold_data.c +1225 -0
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_property_data.c +24742 -0
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_property_data_posix.c +4846 -0
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_unfold_key.c +2571 -0
- package/deps/jq/modules/oniguruma/src/unicode.c +664 -0
- package/deps/jq/modules/oniguruma/src/unicode_fold1_key.c +2548 -0
- package/deps/jq/modules/oniguruma/src/unicode_fold2_key.c +203 -0
- package/deps/jq/modules/oniguruma/src/unicode_fold3_key.c +113 -0
- package/deps/jq/modules/oniguruma/src/unicode_fold_data.c +1366 -0
- package/deps/jq/modules/oniguruma/src/unicode_property_data.c +25306 -0
- package/deps/jq/modules/oniguruma/src/unicode_property_data_posix.c +4940 -0
- package/deps/jq/modules/oniguruma/src/unicode_unfold_key.c +2854 -0
- package/deps/jq/modules/oniguruma/src/utf16_be.c +235 -0
- package/deps/jq/modules/oniguruma/src/utf16_le.c +245 -0
- package/deps/jq/modules/oniguruma/src/utf32_be.c +194 -0
- package/deps/jq/modules/oniguruma/src/utf32_le.c +194 -0
- package/deps/jq/modules/oniguruma/src/utf8.c +335 -0
- package/deps/jq/modules/oniguruma/test/Makefile.am +28 -0
- package/deps/jq/modules/oniguruma/test/testc.c +874 -0
- package/deps/jq/modules/oniguruma/test/testu.c +916 -0
- package/deps/jq/modules/oniguruma/test-driver +153 -0
- package/deps/jq/modules/oniguruma/windows/testc.c +869 -0
- package/deps/jq/scripts/crosscompile +2 -1
- package/deps/jq/scripts/gen_utf8_tables.py +2 -3
- package/deps/jq/scripts/update-website +29 -0
- package/deps/jq/scripts/version +7 -2
- package/deps/jq/sig/jq-release.key +41 -0
- package/deps/jq/sig/v1.3/jq-linux-x86.asc +17 -0
- package/deps/jq/sig/v1.3/jq-linux-x86_64.asc +17 -0
- package/deps/jq/sig/v1.3/jq-osx-x86.asc +17 -0
- package/deps/jq/sig/v1.3/jq-osx-x86_64.asc +17 -0
- package/deps/jq/sig/v1.3/jq-win32.exe.asc +17 -0
- package/deps/jq/sig/v1.3/jq-win64.exe.asc +17 -0
- package/deps/jq/sig/v1.3/sha256sum.txt +6 -0
- package/deps/jq/sig/v1.4/jq-linux-x86.asc +17 -0
- package/deps/jq/sig/v1.4/jq-linux-x86_64.asc +17 -0
- package/deps/jq/sig/v1.4/jq-osx-x86.asc +17 -0
- package/deps/jq/sig/v1.4/jq-osx-x86_64.asc +17 -0
- package/deps/jq/sig/v1.4/jq-solaris11-32.asc +17 -0
- package/deps/jq/sig/v1.4/jq-solaris11-64.asc +17 -0
- package/deps/jq/sig/v1.4/jq-win32.exe.asc +17 -0
- package/deps/jq/sig/v1.4/jq-win64.exe.asc +17 -0
- package/deps/jq/sig/v1.4/sha256sum.txt +8 -0
- package/deps/jq/sig/v1.5/jq-linux32-no-oniguruma.asc +17 -0
- package/deps/jq/sig/v1.5/jq-linux32.asc +17 -0
- package/deps/jq/sig/v1.5/jq-linux64.asc +17 -0
- package/deps/jq/sig/v1.5/jq-osx-amd64.asc +17 -0
- package/deps/jq/sig/v1.5/jq-win32.exe.asc +17 -0
- package/deps/jq/sig/v1.5/jq-win64.exe.asc +17 -0
- package/deps/jq/sig/v1.5/sha256sum.txt +5 -0
- package/deps/jq/sig/v1.5rc1/jq-linux-x86_64-static.asc +17 -0
- package/deps/jq/sig/v1.5rc1/jq-win32.exe.asc +17 -0
- package/deps/jq/sig/v1.5rc1/jq-win64.exe.asc +17 -0
- package/deps/jq/sig/v1.5rc1/sha256sum.txt +3 -0
- package/deps/jq/sig/v1.5rc2/jq-linux-x86.asc +17 -0
- package/deps/jq/sig/v1.5rc2/jq-linux-x86_64.asc +17 -0
- package/deps/jq/sig/v1.5rc2/jq-osx-x86_64.asc +17 -0
- package/deps/jq/sig/v1.5rc2/jq-win32.exe.asc +17 -0
- package/deps/jq/sig/v1.5rc2/jq-win64.exe.asc +17 -0
- package/deps/jq/sig/v1.5rc2/sha256sum.txt +5 -0
- package/deps/jq/sig/v1.6/jq-linux32.asc +16 -0
- package/deps/jq/sig/v1.6/jq-linux64.asc +16 -0
- package/deps/jq/sig/v1.6/jq-osx-amd64.asc +16 -0
- package/deps/jq/sig/v1.6/jq-win32.exe.asc +16 -0
- package/deps/jq/sig/v1.6/jq-win64.exe.asc +16 -0
- package/deps/jq/sig/v1.6/sha256sum.txt +5 -0
- package/deps/jq/{builtin.c → src/builtin.c} +449 -344
- package/deps/jq/{builtin.h → src/builtin.h} +0 -0
- package/deps/jq/src/builtin.jq +311 -0
- package/deps/jq/{bytecode.c → src/bytecode.c} +0 -0
- package/deps/jq/{bytecode.h → src/bytecode.h} +0 -0
- package/deps/jq/{compile.c → src/compile.c} +213 -37
- package/deps/jq/{compile.h → src/compile.h} +7 -2
- package/deps/jq/{exec_stack.h → src/exec_stack.h} +0 -0
- package/deps/jq/{execute.c → src/execute.c} +127 -24
- package/deps/jq/{inject_errors.c → src/inject_errors.c} +0 -0
- package/deps/jq/{jq.h → src/jq.h} +13 -2
- package/deps/jq/{jq_parser.h → src/jq_parser.h} +0 -0
- package/deps/jq/{jq_test.c → src/jq_test.c} +1 -1
- package/deps/jq/{jv.c → src/jv.c} +24 -5
- package/deps/jq/{jv.h → src/jv.h} +46 -11
- package/deps/jq/{jv_alloc.c → src/jv_alloc.c} +0 -0
- package/deps/jq/{jv_alloc.h → src/jv_alloc.h} +0 -0
- package/deps/jq/{jv_aux.c → src/jv_aux.c} +38 -14
- package/deps/jq/{jv_dtoa.c → src/jv_dtoa.c} +4 -5
- package/deps/jq/{jv_dtoa.h → src/jv_dtoa.h} +0 -0
- package/deps/jq/src/jv_file.c +81 -0
- package/deps/jq/{jv_parse.c → src/jv_parse.c} +8 -2
- package/deps/jq/{jv_print.c → src/jv_print.c} +80 -27
- package/deps/jq/{jv_unicode.c → src/jv_unicode.c} +28 -4
- package/deps/jq/{jv_unicode.h → src/jv_unicode.h} +1 -0
- package/deps/jq/{jv_utf8_tables.h → src/jv_utf8_tables.h} +0 -0
- package/deps/jq/{lexer.c → src/lexer.c} +317 -292
- package/deps/jq/{lexer.h → src/lexer.h} +16 -12
- package/deps/jq/{lexer.l → src/lexer.l} +5 -4
- package/deps/jq/src/libm.h +291 -0
- package/deps/jq/{linker.c → src/linker.c} +5 -3
- package/deps/jq/{linker.h → src/linker.h} +0 -0
- package/deps/jq/{locfile.c → src/locfile.c} +1 -1
- package/deps/jq/{locfile.h → src/locfile.h} +0 -0
- package/deps/jq/{main.c → src/main.c} +202 -100
- package/deps/jq/{opcode_list.h → src/opcode_list.h} +4 -0
- package/deps/jq/{parser.c → src/parser.c} +1149 -1069
- package/deps/jq/{parser.h → src/parser.h} +28 -24
- package/deps/jq/{parser.y → src/parser.y} +108 -52
- package/deps/jq/{util.c → src/util.c} +12 -9
- package/deps/jq/{util.h → src/util.h} +0 -0
- package/deps/jq/tests/base64.test +35 -0
- package/deps/jq/tests/base64test +5 -0
- package/deps/jq/tests/jq-f-test.sh +4 -0
- package/deps/jq/tests/jq.test +305 -21
- package/deps/jq/tests/jqtest +1 -1
- package/deps/jq/tests/mantest +1 -1
- package/deps/jq/tests/onig.test +13 -0
- package/deps/jq/tests/onigtest +1 -1
- package/deps/jq/tests/optional.test +20 -0
- package/deps/jq/tests/optionaltest +5 -0
- package/deps/jq/tests/setup +7 -1
- package/deps/jq/tests/shtest +133 -29
- package/deps/jq/tests/utf8-truncate.jq +3 -0
- package/deps/jq/tests/utf8test +10 -0
- package/lib/index.js +7 -1
- package/package.json +3 -3
- package/test/santiy.test.js +24 -0
- package/deps/jq/docs/default_manpage.md +0 -22
- package/deps/jq/docs/public/bootstrap/css/bootstrap-responsive.css +0 -1058
- package/deps/jq/docs/public/bootstrap/css/bootstrap-responsive.min.css +0 -9
- package/deps/jq/docs/public/bootstrap/css/bootstrap.css +0 -5224
- package/deps/jq/docs/public/bootstrap/css/bootstrap.min.css +0 -9
- package/deps/jq/docs/public/bootstrap/img/glyphicons-halflings-white.png +0 -0
- package/deps/jq/docs/public/bootstrap/img/glyphicons-halflings.png +0 -0
- package/deps/jq/docs/public/bootstrap/js/bootstrap.js +0 -2027
- package/deps/jq/docs/public/bootstrap/js/bootstrap.min.js +0 -6
- package/deps/jq/docs/templates/shared/_header.liquid +0 -26
- package/deps/jq/jq.1.default +0 -39
- package/deps/jq/jv_file.c +0 -49
- package/deps/jq/libm.h +0 -160
- package/deps/jq/setup.sh +0 -33
- package/reports/jest-port-api.xml +0 -35
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
# LuaDist CMake utility library.
|
|
2
|
+
# Provides sane project defaults and macros common to LuaDist CMake builds.
|
|
3
|
+
#
|
|
4
|
+
# Copyright (C) 2007-2012 LuaDist.
|
|
5
|
+
# by David Manura, Peter Drahoš
|
|
6
|
+
# Redistribution and use of this file is allowed according to the terms of the MIT license.
|
|
7
|
+
# For details see the COPYRIGHT file distributed with LuaDist.
|
|
8
|
+
# Please note that the package source code is licensed under its own license.
|
|
9
|
+
|
|
10
|
+
## Extract information from dist.info
|
|
11
|
+
if ( NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/dist.info )
|
|
12
|
+
message ( FATAL_ERROR
|
|
13
|
+
"Missing dist.info file (${CMAKE_CURRENT_SOURCE_DIR}/dist.info)." )
|
|
14
|
+
endif ()
|
|
15
|
+
file ( READ ${CMAKE_CURRENT_SOURCE_DIR}/dist.info DIST_INFO )
|
|
16
|
+
if ( "${DIST_INFO}" STREQUAL "" )
|
|
17
|
+
message ( FATAL_ERROR "Failed to load dist.info." )
|
|
18
|
+
endif ()
|
|
19
|
+
# Reads field `name` from dist.info string `DIST_INFO` into variable `var`.
|
|
20
|
+
macro ( _parse_dist_field name var )
|
|
21
|
+
string ( REGEX REPLACE ".*${name}[ \t]?=[ \t]?[\"']([^\"']+)[\"'].*" "\\1"
|
|
22
|
+
${var} "${DIST_INFO}" )
|
|
23
|
+
if ( ${var} STREQUAL DIST_INFO )
|
|
24
|
+
message ( FATAL_ERROR "Failed to extract \"${var}\" from dist.info" )
|
|
25
|
+
endif ()
|
|
26
|
+
endmacro ()
|
|
27
|
+
#
|
|
28
|
+
_parse_dist_field ( name DIST_NAME )
|
|
29
|
+
_parse_dist_field ( version DIST_VERSION )
|
|
30
|
+
_parse_dist_field ( license DIST_LICENSE )
|
|
31
|
+
_parse_dist_field ( author DIST_AUTHOR )
|
|
32
|
+
_parse_dist_field ( maintainer DIST_MAINTAINER )
|
|
33
|
+
_parse_dist_field ( url DIST_URL )
|
|
34
|
+
_parse_dist_field ( desc DIST_DESC )
|
|
35
|
+
message ( "DIST_NAME: ${DIST_NAME}")
|
|
36
|
+
message ( "DIST_VERSION: ${DIST_VERSION}")
|
|
37
|
+
message ( "DIST_LICENSE: ${DIST_LICENSE}")
|
|
38
|
+
message ( "DIST_AUTHOR: ${DIST_AUTHOR}")
|
|
39
|
+
message ( "DIST_MAINTAINER: ${DIST_MAINTAINER}")
|
|
40
|
+
message ( "DIST_URL: ${DIST_URL}")
|
|
41
|
+
message ( "DIST_DESC: ${DIST_DESC}")
|
|
42
|
+
string ( REGEX REPLACE ".*depends[ \t]?=[ \t]?[\"']([^\"']+)[\"'].*" "\\1"
|
|
43
|
+
DIST_DEPENDS ${DIST_INFO} )
|
|
44
|
+
if ( DIST_DEPENDS STREQUAL DIST_INFO )
|
|
45
|
+
set ( DIST_DEPENDS "" )
|
|
46
|
+
endif ()
|
|
47
|
+
message ( "DIST_DEPENDS: ${DIST_DEPENDS}")
|
|
48
|
+
## 2DO: Parse DIST_DEPENDS and try to install Dependencies with automatically using externalproject_add
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
## INSTALL DEFAULTS (Relative to CMAKE_INSTALL_PREFIX)
|
|
52
|
+
# Primary paths
|
|
53
|
+
set ( INSTALL_BIN bin CACHE PATH "Where to install binaries to." )
|
|
54
|
+
set ( INSTALL_LIB lib CACHE PATH "Where to install libraries to." )
|
|
55
|
+
set ( INSTALL_INC include CACHE PATH "Where to install headers to." )
|
|
56
|
+
set ( INSTALL_ETC etc CACHE PATH "Where to store configuration files" )
|
|
57
|
+
set ( INSTALL_SHARE share CACHE PATH "Directory for shared data." )
|
|
58
|
+
|
|
59
|
+
# Secondary paths
|
|
60
|
+
option ( INSTALL_VERSION
|
|
61
|
+
"Install runtime libraries and executables with version information." OFF)
|
|
62
|
+
set ( INSTALL_DATA ${INSTALL_SHARE}/${DIST_NAME} CACHE PATH
|
|
63
|
+
"Directory the package can store documentation, tests or other data in.")
|
|
64
|
+
set ( INSTALL_DOC ${INSTALL_DATA}/doc CACHE PATH
|
|
65
|
+
"Recommended directory to install documentation into.")
|
|
66
|
+
set ( INSTALL_EXAMPLE ${INSTALL_DATA}/example CACHE PATH
|
|
67
|
+
"Recommended directory to install examples into.")
|
|
68
|
+
set ( INSTALL_TEST ${INSTALL_DATA}/test CACHE PATH
|
|
69
|
+
"Recommended directory to install tests into.")
|
|
70
|
+
set ( INSTALL_FOO ${INSTALL_DATA}/etc CACHE PATH
|
|
71
|
+
"Where to install additional files")
|
|
72
|
+
|
|
73
|
+
# Tweaks and other defaults
|
|
74
|
+
# Setting CMAKE to use loose block and search for find modules in source directory
|
|
75
|
+
set ( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true )
|
|
76
|
+
set ( CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH} )
|
|
77
|
+
option ( BUILD_SHARED_LIBS "Build shared libraries" ON )
|
|
78
|
+
|
|
79
|
+
# In MSVC, prevent warnings that can occur when using standard libraries.
|
|
80
|
+
if ( MSVC )
|
|
81
|
+
add_definitions ( -D_CRT_SECURE_NO_WARNINGS )
|
|
82
|
+
endif ()
|
|
83
|
+
|
|
84
|
+
# RPath and relative linking
|
|
85
|
+
option ( USE_RPATH "Use relative linking." ON)
|
|
86
|
+
if ( USE_RPATH )
|
|
87
|
+
string ( REGEX REPLACE "[^!/]+" ".." UP_DIR ${INSTALL_BIN} )
|
|
88
|
+
set ( CMAKE_SKIP_BUILD_RPATH FALSE CACHE STRING "" FORCE )
|
|
89
|
+
set ( CMAKE_BUILD_WITH_INSTALL_RPATH FALSE CACHE STRING "" FORCE )
|
|
90
|
+
set ( CMAKE_INSTALL_RPATH $ORIGIN/${UP_DIR}/${INSTALL_LIB}
|
|
91
|
+
CACHE STRING "" FORCE )
|
|
92
|
+
set ( CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE CACHE STRING "" FORCE )
|
|
93
|
+
set ( CMAKE_INSTALL_NAME_DIR @executable_path/${UP_DIR}/${INSTALL_LIB}
|
|
94
|
+
CACHE STRING "" FORCE )
|
|
95
|
+
endif ()
|
|
96
|
+
|
|
97
|
+
## MACROS
|
|
98
|
+
# Parser macro
|
|
99
|
+
macro ( parse_arguments prefix arg_names option_names)
|
|
100
|
+
set ( DEFAULT_ARGS )
|
|
101
|
+
foreach ( arg_name ${arg_names} )
|
|
102
|
+
set ( ${prefix}_${arg_name} )
|
|
103
|
+
endforeach ()
|
|
104
|
+
foreach ( option ${option_names} )
|
|
105
|
+
set ( ${prefix}_${option} FALSE )
|
|
106
|
+
endforeach ()
|
|
107
|
+
|
|
108
|
+
set ( current_arg_name DEFAULT_ARGS )
|
|
109
|
+
set ( current_arg_list )
|
|
110
|
+
foreach ( arg ${ARGN} )
|
|
111
|
+
set ( larg_names ${arg_names} )
|
|
112
|
+
list ( FIND larg_names "${arg}" is_arg_name )
|
|
113
|
+
if ( is_arg_name GREATER -1 )
|
|
114
|
+
set ( ${prefix}_${current_arg_name} ${current_arg_list} )
|
|
115
|
+
set ( current_arg_name ${arg} )
|
|
116
|
+
set ( current_arg_list )
|
|
117
|
+
else ()
|
|
118
|
+
set ( loption_names ${option_names} )
|
|
119
|
+
list ( FIND loption_names "${arg}" is_option )
|
|
120
|
+
if ( is_option GREATER -1 )
|
|
121
|
+
set ( ${prefix}_${arg} TRUE )
|
|
122
|
+
else ()
|
|
123
|
+
set ( current_arg_list ${current_arg_list} ${arg} )
|
|
124
|
+
endif ()
|
|
125
|
+
endif ()
|
|
126
|
+
endforeach ()
|
|
127
|
+
set ( ${prefix}_${current_arg_name} ${current_arg_list} )
|
|
128
|
+
endmacro ()
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
# install_executable ( executable_targets )
|
|
132
|
+
# Installs any executables generated using "add_executable".
|
|
133
|
+
# USE: install_executable ( lua )
|
|
134
|
+
# NOTE: subdirectories are NOT supported
|
|
135
|
+
set ( CPACK_COMPONENT_RUNTIME_DISPLAY_NAME "${DIST_NAME} Runtime" )
|
|
136
|
+
set ( CPACK_COMPONENT_RUNTIME_DESCRIPTION
|
|
137
|
+
"Executables and runtime libraries. Installed into ${INSTALL_BIN}." )
|
|
138
|
+
macro ( install_executable )
|
|
139
|
+
foreach ( _file ${ARGN} )
|
|
140
|
+
if ( INSTALL_VERSION )
|
|
141
|
+
set_target_properties ( ${_file} PROPERTIES VERSION ${DIST_VERSION}
|
|
142
|
+
SOVERSION ${DIST_VERSION} )
|
|
143
|
+
endif ()
|
|
144
|
+
install ( TARGETS ${_file} RUNTIME DESTINATION ${INSTALL_BIN}
|
|
145
|
+
COMPONENT Runtime )
|
|
146
|
+
endforeach()
|
|
147
|
+
endmacro ()
|
|
148
|
+
|
|
149
|
+
# install_library ( library_targets )
|
|
150
|
+
# Installs any libraries generated using "add_library" into apropriate places.
|
|
151
|
+
# USE: install_library ( libexpat )
|
|
152
|
+
# NOTE: subdirectories are NOT supported
|
|
153
|
+
set ( CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "${DIST_NAME} Development Libraries" )
|
|
154
|
+
set ( CPACK_COMPONENT_LIBRARY_DESCRIPTION
|
|
155
|
+
"Static and import libraries needed for development. Installed into ${INSTALL_LIB} or ${INSTALL_BIN}." )
|
|
156
|
+
macro ( install_library )
|
|
157
|
+
foreach ( _file ${ARGN} )
|
|
158
|
+
if ( INSTALL_VERSION )
|
|
159
|
+
set_target_properties ( ${_file} PROPERTIES VERSION ${DIST_VERSION}
|
|
160
|
+
SOVERSION ${DIST_VERSION} )
|
|
161
|
+
endif ()
|
|
162
|
+
install ( TARGETS ${_file}
|
|
163
|
+
RUNTIME DESTINATION ${INSTALL_BIN} COMPONENT Runtime
|
|
164
|
+
LIBRARY DESTINATION ${INSTALL_LIB} COMPONENT Runtime
|
|
165
|
+
ARCHIVE DESTINATION ${INSTALL_LIB} COMPONENT Library )
|
|
166
|
+
endforeach()
|
|
167
|
+
endmacro ()
|
|
168
|
+
|
|
169
|
+
# helper function for various install_* functions, for PATTERN/REGEX args.
|
|
170
|
+
macro ( _complete_install_args )
|
|
171
|
+
if ( NOT("${_ARG_PATTERN}" STREQUAL "") )
|
|
172
|
+
set ( _ARG_PATTERN PATTERN ${_ARG_PATTERN} )
|
|
173
|
+
endif ()
|
|
174
|
+
if ( NOT("${_ARG_REGEX}" STREQUAL "") )
|
|
175
|
+
set ( _ARG_REGEX REGEX ${_ARG_REGEX} )
|
|
176
|
+
endif ()
|
|
177
|
+
endmacro ()
|
|
178
|
+
|
|
179
|
+
# install_header ( files/directories [INTO destination] )
|
|
180
|
+
# Install a directories or files into header destination.
|
|
181
|
+
# USE: install_header ( lua.h luaconf.h ) or install_header ( GL )
|
|
182
|
+
# USE: install_header ( mylib.h INTO mylib )
|
|
183
|
+
# For directories, supports optional PATTERN/REGEX arguments like install().
|
|
184
|
+
set ( CPACK_COMPONENT_HEADER_DISPLAY_NAME "${DIST_NAME} Development Headers" )
|
|
185
|
+
set ( CPACK_COMPONENT_HEADER_DESCRIPTION
|
|
186
|
+
"Headers needed for development. Installed into ${INSTALL_INC}." )
|
|
187
|
+
macro ( install_header )
|
|
188
|
+
parse_arguments ( _ARG "INTO;PATTERN;REGEX" "" ${ARGN} )
|
|
189
|
+
_complete_install_args()
|
|
190
|
+
foreach ( _file ${_ARG_DEFAULT_ARGS} )
|
|
191
|
+
if ( IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${_file}" )
|
|
192
|
+
install ( DIRECTORY ${_file} DESTINATION ${INSTALL_INC}/${_ARG_INTO}
|
|
193
|
+
COMPONENT Header ${_ARG_PATTERN} ${_ARG_REGEX} )
|
|
194
|
+
else ()
|
|
195
|
+
install ( FILES ${_file} DESTINATION ${INSTALL_INC}/${_ARG_INTO}
|
|
196
|
+
COMPONENT Header )
|
|
197
|
+
endif ()
|
|
198
|
+
endforeach()
|
|
199
|
+
endmacro ()
|
|
200
|
+
|
|
201
|
+
# install_data ( files/directories [INTO destination] )
|
|
202
|
+
# This installs additional data files or directories.
|
|
203
|
+
# USE: install_data ( extra data.dat )
|
|
204
|
+
# USE: install_data ( image1.png image2.png INTO images )
|
|
205
|
+
# For directories, supports optional PATTERN/REGEX arguments like install().
|
|
206
|
+
set ( CPACK_COMPONENT_DATA_DISPLAY_NAME "${DIST_NAME} Data" )
|
|
207
|
+
set ( CPACK_COMPONENT_DATA_DESCRIPTION
|
|
208
|
+
"Application data. Installed into ${INSTALL_DATA}." )
|
|
209
|
+
macro ( install_data )
|
|
210
|
+
parse_arguments ( _ARG "INTO;PATTERN;REGEX" "" ${ARGN} )
|
|
211
|
+
_complete_install_args()
|
|
212
|
+
foreach ( _file ${_ARG_DEFAULT_ARGS} )
|
|
213
|
+
if ( IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${_file}" )
|
|
214
|
+
install ( DIRECTORY ${_file}
|
|
215
|
+
DESTINATION ${INSTALL_DATA}/${_ARG_INTO}
|
|
216
|
+
COMPONENT Data ${_ARG_PATTERN} ${_ARG_REGEX} )
|
|
217
|
+
else ()
|
|
218
|
+
install ( FILES ${_file} DESTINATION ${INSTALL_DATA}/${_ARG_INTO}
|
|
219
|
+
COMPONENT Data )
|
|
220
|
+
endif ()
|
|
221
|
+
endforeach()
|
|
222
|
+
endmacro ()
|
|
223
|
+
|
|
224
|
+
# INSTALL_DOC ( files/directories [INTO destination] )
|
|
225
|
+
# This installs documentation content
|
|
226
|
+
# USE: install_doc ( doc/ doc.pdf )
|
|
227
|
+
# USE: install_doc ( index.html INTO html )
|
|
228
|
+
# For directories, supports optional PATTERN/REGEX arguments like install().
|
|
229
|
+
set ( CPACK_COMPONENT_DOCUMENTATION_DISPLAY_NAME "${DIST_NAME} Documentation" )
|
|
230
|
+
set ( CPACK_COMPONENT_DOCUMENTATION_DESCRIPTION
|
|
231
|
+
"Application documentation. Installed into ${INSTALL_DOC}." )
|
|
232
|
+
macro ( install_doc )
|
|
233
|
+
parse_arguments ( _ARG "INTO;PATTERN;REGEX" "" ${ARGN} )
|
|
234
|
+
_complete_install_args()
|
|
235
|
+
foreach ( _file ${_ARG_DEFAULT_ARGS} )
|
|
236
|
+
if ( IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${_file}" )
|
|
237
|
+
install ( DIRECTORY ${_file} DESTINATION ${INSTALL_DOC}/${_ARG_INTO}
|
|
238
|
+
COMPONENT Documentation ${_ARG_PATTERN} ${_ARG_REGEX} )
|
|
239
|
+
else ()
|
|
240
|
+
install ( FILES ${_file} DESTINATION ${INSTALL_DOC}/${_ARG_INTO}
|
|
241
|
+
COMPONENT Documentation )
|
|
242
|
+
endif ()
|
|
243
|
+
endforeach()
|
|
244
|
+
endmacro ()
|
|
245
|
+
|
|
246
|
+
# install_example ( files/directories [INTO destination] )
|
|
247
|
+
# This installs additional examples
|
|
248
|
+
# USE: install_example ( examples/ exampleA )
|
|
249
|
+
# USE: install_example ( super_example super_data INTO super)
|
|
250
|
+
# For directories, supports optional PATTERN/REGEX argument like install().
|
|
251
|
+
set ( CPACK_COMPONENT_EXAMPLE_DISPLAY_NAME "${DIST_NAME} Examples" )
|
|
252
|
+
set ( CPACK_COMPONENT_EXAMPLE_DESCRIPTION
|
|
253
|
+
"Examples and their associated data. Installed into ${INSTALL_EXAMPLE}." )
|
|
254
|
+
macro ( install_example )
|
|
255
|
+
parse_arguments ( _ARG "INTO;PATTERN;REGEX" "" ${ARGN} )
|
|
256
|
+
_complete_install_args()
|
|
257
|
+
foreach ( _file ${_ARG_DEFAULT_ARGS} )
|
|
258
|
+
if ( IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${_file}" )
|
|
259
|
+
install ( DIRECTORY ${_file} DESTINATION ${INSTALL_EXAMPLE}/${_ARG_INTO}
|
|
260
|
+
COMPONENT Example ${_ARG_PATTERN} ${_ARG_REGEX} )
|
|
261
|
+
else ()
|
|
262
|
+
install ( FILES ${_file} DESTINATION ${INSTALL_EXAMPLE}/${_ARG_INTO}
|
|
263
|
+
COMPONENT Example )
|
|
264
|
+
endif ()
|
|
265
|
+
endforeach()
|
|
266
|
+
endmacro ()
|
|
267
|
+
|
|
268
|
+
# install_test ( files/directories [INTO destination] )
|
|
269
|
+
# This installs tests and test files, DOES NOT EXECUTE TESTS
|
|
270
|
+
# USE: install_test ( my_test data.sql )
|
|
271
|
+
# USE: install_test ( feature_x_test INTO x )
|
|
272
|
+
# For directories, supports optional PATTERN/REGEX argument like install().
|
|
273
|
+
set ( CPACK_COMPONENT_TEST_DISPLAY_NAME "${DIST_NAME} Tests" )
|
|
274
|
+
set ( CPACK_COMPONENT_TEST_DESCRIPTION
|
|
275
|
+
"Tests and associated data. Installed into ${INSTALL_TEST}." )
|
|
276
|
+
macro ( install_test )
|
|
277
|
+
parse_arguments ( _ARG "INTO;PATTERN;REGEX" "" ${ARGN} )
|
|
278
|
+
_complete_install_args()
|
|
279
|
+
foreach ( _file ${_ARG_DEFAULT_ARGS} )
|
|
280
|
+
if ( IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${_file}" )
|
|
281
|
+
install ( DIRECTORY ${_file} DESTINATION ${INSTALL_TEST}/${_ARG_INTO}
|
|
282
|
+
COMPONENT Test ${_ARG_PATTERN} ${_ARG_REGEX} )
|
|
283
|
+
else ()
|
|
284
|
+
install ( FILES ${_file} DESTINATION ${INSTALL_TEST}/${_ARG_INTO}
|
|
285
|
+
COMPONENT Test )
|
|
286
|
+
endif ()
|
|
287
|
+
endforeach()
|
|
288
|
+
endmacro ()
|
|
289
|
+
|
|
290
|
+
# install_foo ( files/directories [INTO destination] )
|
|
291
|
+
# This installs optional or otherwise unneeded content
|
|
292
|
+
# USE: install_foo ( etc/ example.doc )
|
|
293
|
+
# USE: install_foo ( icon.png logo.png INTO icons)
|
|
294
|
+
# For directories, supports optional PATTERN/REGEX argument like install().
|
|
295
|
+
set ( CPACK_COMPONENT_OTHER_DISPLAY_NAME "${DIST_NAME} Unspecified Content" )
|
|
296
|
+
set ( CPACK_COMPONENT_OTHER_DESCRIPTION
|
|
297
|
+
"Other unspecified content. Installed into ${INSTALL_FOO}." )
|
|
298
|
+
macro ( install_foo )
|
|
299
|
+
parse_arguments ( _ARG "INTO;PATTERN;REGEX" "" ${ARGN} )
|
|
300
|
+
_complete_install_args()
|
|
301
|
+
foreach ( _file ${_ARG_DEFAULT_ARGS} )
|
|
302
|
+
if ( IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${_file}" )
|
|
303
|
+
install ( DIRECTORY ${_file} DESTINATION ${INSTALL_FOO}/${_ARG_INTO}
|
|
304
|
+
COMPONENT Other ${_ARG_PATTERN} ${_ARG_REGEX} )
|
|
305
|
+
else ()
|
|
306
|
+
install ( FILES ${_file} DESTINATION ${INSTALL_FOO}/${_ARG_INTO}
|
|
307
|
+
COMPONENT Other )
|
|
308
|
+
endif ()
|
|
309
|
+
endforeach()
|
|
310
|
+
endmacro ()
|
|
311
|
+
|
|
312
|
+
## CTest defaults
|
|
313
|
+
|
|
314
|
+
## CPack defaults
|
|
315
|
+
set ( CPACK_GENERATOR "ZIP" )
|
|
316
|
+
set ( CPACK_STRIP_FILES TRUE )
|
|
317
|
+
set ( CPACK_PACKAGE_NAME "${DIST_NAME}" )
|
|
318
|
+
set ( CPACK_PACKAGE_VERSION "${DIST_VERSION}")
|
|
319
|
+
set ( CPACK_PACKAGE_VENDOR "LuaDist" )
|
|
320
|
+
set ( CPACK_COMPONENTS_ALL Runtime Library Header Data Documentation Example Other )
|
|
321
|
+
include ( CPack )
|
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
#! /bin/sh
|
|
2
|
+
# Wrapper for compilers which do not understand '-c -o'.
|
|
3
|
+
|
|
4
|
+
scriptversion=2018-03-07.03; # UTC
|
|
5
|
+
|
|
6
|
+
# Copyright (C) 1999-2021 Free Software Foundation, Inc.
|
|
7
|
+
# Written by Tom Tromey <tromey@cygnus.com>.
|
|
8
|
+
#
|
|
9
|
+
# This program is free software; you can redistribute it and/or modify
|
|
10
|
+
# it under the terms of the GNU General Public License as published by
|
|
11
|
+
# the Free Software Foundation; either version 2, or (at your option)
|
|
12
|
+
# any later version.
|
|
13
|
+
#
|
|
14
|
+
# This program is distributed in the hope that it will be useful,
|
|
15
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
# GNU General Public License for more details.
|
|
18
|
+
#
|
|
19
|
+
# You should have received a copy of the GNU General Public License
|
|
20
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
21
|
+
|
|
22
|
+
# As a special exception to the GNU General Public License, if you
|
|
23
|
+
# distribute this file as part of a program that contains a
|
|
24
|
+
# configuration script generated by Autoconf, you may include it under
|
|
25
|
+
# the same distribution terms that you use for the rest of that program.
|
|
26
|
+
|
|
27
|
+
# This file is maintained in Automake, please report
|
|
28
|
+
# bugs to <bug-automake@gnu.org> or send patches to
|
|
29
|
+
# <automake-patches@gnu.org>.
|
|
30
|
+
|
|
31
|
+
nl='
|
|
32
|
+
'
|
|
33
|
+
|
|
34
|
+
# We need space, tab and new line, in precisely that order. Quoting is
|
|
35
|
+
# there to prevent tools from complaining about whitespace usage.
|
|
36
|
+
IFS=" "" $nl"
|
|
37
|
+
|
|
38
|
+
file_conv=
|
|
39
|
+
|
|
40
|
+
# func_file_conv build_file lazy
|
|
41
|
+
# Convert a $build file to $host form and store it in $file
|
|
42
|
+
# Currently only supports Windows hosts. If the determined conversion
|
|
43
|
+
# type is listed in (the comma separated) LAZY, no conversion will
|
|
44
|
+
# take place.
|
|
45
|
+
func_file_conv ()
|
|
46
|
+
{
|
|
47
|
+
file=$1
|
|
48
|
+
case $file in
|
|
49
|
+
/ | /[!/]*) # absolute file, and not a UNC file
|
|
50
|
+
if test -z "$file_conv"; then
|
|
51
|
+
# lazily determine how to convert abs files
|
|
52
|
+
case `uname -s` in
|
|
53
|
+
MINGW*)
|
|
54
|
+
file_conv=mingw
|
|
55
|
+
;;
|
|
56
|
+
CYGWIN* | MSYS*)
|
|
57
|
+
file_conv=cygwin
|
|
58
|
+
;;
|
|
59
|
+
*)
|
|
60
|
+
file_conv=wine
|
|
61
|
+
;;
|
|
62
|
+
esac
|
|
63
|
+
fi
|
|
64
|
+
case $file_conv/,$2, in
|
|
65
|
+
*,$file_conv,*)
|
|
66
|
+
;;
|
|
67
|
+
mingw/*)
|
|
68
|
+
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
|
69
|
+
;;
|
|
70
|
+
cygwin/* | msys/*)
|
|
71
|
+
file=`cygpath -m "$file" || echo "$file"`
|
|
72
|
+
;;
|
|
73
|
+
wine/*)
|
|
74
|
+
file=`winepath -w "$file" || echo "$file"`
|
|
75
|
+
;;
|
|
76
|
+
esac
|
|
77
|
+
;;
|
|
78
|
+
esac
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
# func_cl_dashL linkdir
|
|
82
|
+
# Make cl look for libraries in LINKDIR
|
|
83
|
+
func_cl_dashL ()
|
|
84
|
+
{
|
|
85
|
+
func_file_conv "$1"
|
|
86
|
+
if test -z "$lib_path"; then
|
|
87
|
+
lib_path=$file
|
|
88
|
+
else
|
|
89
|
+
lib_path="$lib_path;$file"
|
|
90
|
+
fi
|
|
91
|
+
linker_opts="$linker_opts -LIBPATH:$file"
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
# func_cl_dashl library
|
|
95
|
+
# Do a library search-path lookup for cl
|
|
96
|
+
func_cl_dashl ()
|
|
97
|
+
{
|
|
98
|
+
lib=$1
|
|
99
|
+
found=no
|
|
100
|
+
save_IFS=$IFS
|
|
101
|
+
IFS=';'
|
|
102
|
+
for dir in $lib_path $LIB
|
|
103
|
+
do
|
|
104
|
+
IFS=$save_IFS
|
|
105
|
+
if $shared && test -f "$dir/$lib.dll.lib"; then
|
|
106
|
+
found=yes
|
|
107
|
+
lib=$dir/$lib.dll.lib
|
|
108
|
+
break
|
|
109
|
+
fi
|
|
110
|
+
if test -f "$dir/$lib.lib"; then
|
|
111
|
+
found=yes
|
|
112
|
+
lib=$dir/$lib.lib
|
|
113
|
+
break
|
|
114
|
+
fi
|
|
115
|
+
if test -f "$dir/lib$lib.a"; then
|
|
116
|
+
found=yes
|
|
117
|
+
lib=$dir/lib$lib.a
|
|
118
|
+
break
|
|
119
|
+
fi
|
|
120
|
+
done
|
|
121
|
+
IFS=$save_IFS
|
|
122
|
+
|
|
123
|
+
if test "$found" != yes; then
|
|
124
|
+
lib=$lib.lib
|
|
125
|
+
fi
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
# func_cl_wrapper cl arg...
|
|
129
|
+
# Adjust compile command to suit cl
|
|
130
|
+
func_cl_wrapper ()
|
|
131
|
+
{
|
|
132
|
+
# Assume a capable shell
|
|
133
|
+
lib_path=
|
|
134
|
+
shared=:
|
|
135
|
+
linker_opts=
|
|
136
|
+
for arg
|
|
137
|
+
do
|
|
138
|
+
if test -n "$eat"; then
|
|
139
|
+
eat=
|
|
140
|
+
else
|
|
141
|
+
case $1 in
|
|
142
|
+
-o)
|
|
143
|
+
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
|
144
|
+
eat=1
|
|
145
|
+
case $2 in
|
|
146
|
+
*.o | *.[oO][bB][jJ])
|
|
147
|
+
func_file_conv "$2"
|
|
148
|
+
set x "$@" -Fo"$file"
|
|
149
|
+
shift
|
|
150
|
+
;;
|
|
151
|
+
*)
|
|
152
|
+
func_file_conv "$2"
|
|
153
|
+
set x "$@" -Fe"$file"
|
|
154
|
+
shift
|
|
155
|
+
;;
|
|
156
|
+
esac
|
|
157
|
+
;;
|
|
158
|
+
-I)
|
|
159
|
+
eat=1
|
|
160
|
+
func_file_conv "$2" mingw
|
|
161
|
+
set x "$@" -I"$file"
|
|
162
|
+
shift
|
|
163
|
+
;;
|
|
164
|
+
-I*)
|
|
165
|
+
func_file_conv "${1#-I}" mingw
|
|
166
|
+
set x "$@" -I"$file"
|
|
167
|
+
shift
|
|
168
|
+
;;
|
|
169
|
+
-l)
|
|
170
|
+
eat=1
|
|
171
|
+
func_cl_dashl "$2"
|
|
172
|
+
set x "$@" "$lib"
|
|
173
|
+
shift
|
|
174
|
+
;;
|
|
175
|
+
-l*)
|
|
176
|
+
func_cl_dashl "${1#-l}"
|
|
177
|
+
set x "$@" "$lib"
|
|
178
|
+
shift
|
|
179
|
+
;;
|
|
180
|
+
-L)
|
|
181
|
+
eat=1
|
|
182
|
+
func_cl_dashL "$2"
|
|
183
|
+
;;
|
|
184
|
+
-L*)
|
|
185
|
+
func_cl_dashL "${1#-L}"
|
|
186
|
+
;;
|
|
187
|
+
-static)
|
|
188
|
+
shared=false
|
|
189
|
+
;;
|
|
190
|
+
-Wl,*)
|
|
191
|
+
arg=${1#-Wl,}
|
|
192
|
+
save_ifs="$IFS"; IFS=','
|
|
193
|
+
for flag in $arg; do
|
|
194
|
+
IFS="$save_ifs"
|
|
195
|
+
linker_opts="$linker_opts $flag"
|
|
196
|
+
done
|
|
197
|
+
IFS="$save_ifs"
|
|
198
|
+
;;
|
|
199
|
+
-Xlinker)
|
|
200
|
+
eat=1
|
|
201
|
+
linker_opts="$linker_opts $2"
|
|
202
|
+
;;
|
|
203
|
+
-*)
|
|
204
|
+
set x "$@" "$1"
|
|
205
|
+
shift
|
|
206
|
+
;;
|
|
207
|
+
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
|
|
208
|
+
func_file_conv "$1"
|
|
209
|
+
set x "$@" -Tp"$file"
|
|
210
|
+
shift
|
|
211
|
+
;;
|
|
212
|
+
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
|
|
213
|
+
func_file_conv "$1" mingw
|
|
214
|
+
set x "$@" "$file"
|
|
215
|
+
shift
|
|
216
|
+
;;
|
|
217
|
+
*)
|
|
218
|
+
set x "$@" "$1"
|
|
219
|
+
shift
|
|
220
|
+
;;
|
|
221
|
+
esac
|
|
222
|
+
fi
|
|
223
|
+
shift
|
|
224
|
+
done
|
|
225
|
+
if test -n "$linker_opts"; then
|
|
226
|
+
linker_opts="-link$linker_opts"
|
|
227
|
+
fi
|
|
228
|
+
exec "$@" $linker_opts
|
|
229
|
+
exit 1
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
eat=
|
|
233
|
+
|
|
234
|
+
case $1 in
|
|
235
|
+
'')
|
|
236
|
+
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
|
237
|
+
exit 1;
|
|
238
|
+
;;
|
|
239
|
+
-h | --h*)
|
|
240
|
+
cat <<\EOF
|
|
241
|
+
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
|
242
|
+
|
|
243
|
+
Wrapper for compilers which do not understand '-c -o'.
|
|
244
|
+
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
|
|
245
|
+
arguments, and rename the output as expected.
|
|
246
|
+
|
|
247
|
+
If you are trying to build a whole package this is not the
|
|
248
|
+
right script to run: please start by reading the file 'INSTALL'.
|
|
249
|
+
|
|
250
|
+
Report bugs to <bug-automake@gnu.org>.
|
|
251
|
+
EOF
|
|
252
|
+
exit $?
|
|
253
|
+
;;
|
|
254
|
+
-v | --v*)
|
|
255
|
+
echo "compile $scriptversion"
|
|
256
|
+
exit $?
|
|
257
|
+
;;
|
|
258
|
+
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
|
|
259
|
+
icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
|
|
260
|
+
func_cl_wrapper "$@" # Doesn't return...
|
|
261
|
+
;;
|
|
262
|
+
esac
|
|
263
|
+
|
|
264
|
+
ofile=
|
|
265
|
+
cfile=
|
|
266
|
+
|
|
267
|
+
for arg
|
|
268
|
+
do
|
|
269
|
+
if test -n "$eat"; then
|
|
270
|
+
eat=
|
|
271
|
+
else
|
|
272
|
+
case $1 in
|
|
273
|
+
-o)
|
|
274
|
+
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
|
275
|
+
# So we strip '-o arg' only if arg is an object.
|
|
276
|
+
eat=1
|
|
277
|
+
case $2 in
|
|
278
|
+
*.o | *.obj)
|
|
279
|
+
ofile=$2
|
|
280
|
+
;;
|
|
281
|
+
*)
|
|
282
|
+
set x "$@" -o "$2"
|
|
283
|
+
shift
|
|
284
|
+
;;
|
|
285
|
+
esac
|
|
286
|
+
;;
|
|
287
|
+
*.c)
|
|
288
|
+
cfile=$1
|
|
289
|
+
set x "$@" "$1"
|
|
290
|
+
shift
|
|
291
|
+
;;
|
|
292
|
+
*)
|
|
293
|
+
set x "$@" "$1"
|
|
294
|
+
shift
|
|
295
|
+
;;
|
|
296
|
+
esac
|
|
297
|
+
fi
|
|
298
|
+
shift
|
|
299
|
+
done
|
|
300
|
+
|
|
301
|
+
if test -z "$ofile" || test -z "$cfile"; then
|
|
302
|
+
# If no '-o' option was seen then we might have been invoked from a
|
|
303
|
+
# pattern rule where we don't need one. That is ok -- this is a
|
|
304
|
+
# normal compilation that the losing compiler can handle. If no
|
|
305
|
+
# '.c' file was seen then we are probably linking. That is also
|
|
306
|
+
# ok.
|
|
307
|
+
exec "$@"
|
|
308
|
+
fi
|
|
309
|
+
|
|
310
|
+
# Name of file we expect compiler to create.
|
|
311
|
+
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
|
|
312
|
+
|
|
313
|
+
# Create the lock directory.
|
|
314
|
+
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
|
|
315
|
+
# that we are using for the .o file. Also, base the name on the expected
|
|
316
|
+
# object file name, since that is what matters with a parallel build.
|
|
317
|
+
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
|
|
318
|
+
while true; do
|
|
319
|
+
if mkdir "$lockdir" >/dev/null 2>&1; then
|
|
320
|
+
break
|
|
321
|
+
fi
|
|
322
|
+
sleep 1
|
|
323
|
+
done
|
|
324
|
+
# FIXME: race condition here if user kills between mkdir and trap.
|
|
325
|
+
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
|
326
|
+
|
|
327
|
+
# Run the compile.
|
|
328
|
+
"$@"
|
|
329
|
+
ret=$?
|
|
330
|
+
|
|
331
|
+
if test -f "$cofile"; then
|
|
332
|
+
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
|
|
333
|
+
elif test -f "${cofile}bj"; then
|
|
334
|
+
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
|
|
335
|
+
fi
|
|
336
|
+
|
|
337
|
+
rmdir "$lockdir"
|
|
338
|
+
exit $ret
|
|
339
|
+
|
|
340
|
+
# Local Variables:
|
|
341
|
+
# mode: shell-script
|
|
342
|
+
# sh-indentation: 2
|
|
343
|
+
# eval: (add-hook 'before-save-hook 'time-stamp)
|
|
344
|
+
# time-stamp-start: "scriptversion="
|
|
345
|
+
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
|
346
|
+
# time-stamp-time-zone: "UTC0"
|
|
347
|
+
# time-stamp-end: "; # UTC"
|
|
348
|
+
# End:
|