diff options
| author | William Ahern <william@25thandclement.com> | 2016-10-19 01:53:42 -0700 |
|---|---|---|
| committer | William Ahern <william@25thandclement.com> | 2016-10-19 01:53:42 -0700 |
| commit | ed41847aea5553e67e7df58723dd863c2110b6ae (patch) | |
| tree | 20b6f3df1fba70e917f28417f2def7e4bbf09f4e | |
| parent | 40951862e12fe8d9c2fd0ffd4f16e9fe4d951f33 (diff) | |
| download | luaossl-ed41847aea5553e67e7df58723dd863c2110b6ae.tar.gz luaossl-ed41847aea5553e67e7df58723dd863c2110b6ae.tar.bz2 luaossl-ed41847aea5553e67e7df58723dd863c2110b6ae.zip | |
update luapath
| -rwxr-xr-x | mk/luapath | 29 |
1 files changed, 27 insertions, 2 deletions
| @@ -104,6 +104,30 @@ | |||
| 104 | # interpreter glob patterns from preferred install directory | 104 | # interpreter glob patterns from preferred install directory |
| 105 | # string.match expressions. | 105 | # string.match expressions. |
| 106 | # | 106 | # |
| 107 | # * 2016-10-10 - Fix issue with passing empty CPPFLAGS to ${CC}. /usr/bin/cc | ||
| 108 | # in NetBSD 7.0.1 does not tolerate an empty string argument. This | ||
| 109 | # exposed a bug in NetBSD's and FreeBSD's /bin/sh, triggered by how we | ||
| 110 | # pass CPPFLAGS (see evalmacro and runcc routines, below). | ||
| 111 | # | ||
| 112 | # Some Ash variants (confirmed /bin/sh in NetBSD 7.0.1 and FreeBSD | ||
| 113 | # 10.1) will expand unquoted ${UNSET-} and ${UNSET:-} as an empty | ||
| 114 | # string rather than eliding it during argument processing. That is, | ||
| 115 | # | ||
| 116 | # nargs() { printf "%d\n" "$#"; } | ||
| 117 | # nargs ${UNSET} 2 3 | ||
| 118 | # nargs ${UNSET-} 2 3 | ||
| 119 | # | ||
| 120 | # prints "2" and "3", whereas every other shell tested prints "2" and | ||
| 121 | # "2" (confirmed dash in Ubuntu Xenial; bash 4.3 in Ubuntu Xenial; | ||
| 122 | # pdksh in FreeBSD 10.1, NetBSD 7.0, OS X 10.1, OpenBSD 6.0; ksh93 in | ||
| 123 | # Solaris 11.3 and AIX 7.1; ksh88 in AIX 7.1). | ||
| 124 | # | ||
| 125 | # A workaround in set -u mode (where unbound variable expansion aborts | ||
| 126 | # execution) is to substitute a known empty value. E.g. | ||
| 127 | # | ||
| 128 | # EMPTY= | ||
| 129 | # nargs ${UNSET-$EMPTY} | ||
| 130 | # | ||
| 107 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # | 131 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # |
| 108 | # | 132 | # |
| 109 | # Copyright (C) 2012-2016 William Ahern | 133 | # Copyright (C) 2012-2016 William Ahern |
| @@ -138,10 +162,11 @@ unset IFS # no field splitting surprises | |||
| 138 | unset LUA_PATH || true # interferes search for module install directory | 162 | unset LUA_PATH || true # interferes search for module install directory |
| 139 | unset LUA_CPATH || true | 163 | unset LUA_CPATH || true |
| 140 | 164 | ||
| 141 | MYVERSION=20160325 | 165 | MYVERSION=20161010 |
| 142 | MYVENDOR="william@25thandClement.com" | 166 | MYVENDOR="william@25thandClement.com" |
| 143 | 167 | ||
| 144 | 168 | ||
| 169 | EMPTY= # empty string for parameter expansion workaround for Ash bug | ||
| 145 | DEVRANDOM=/dev/urandom | 170 | DEVRANDOM=/dev/urandom |
| 146 | SANDBOX="${TMPDIR}/${0##*/}-" | 171 | SANDBOX="${TMPDIR}/${0##*/}-" |
| 147 | 172 | ||
| @@ -322,7 +347,7 @@ runcc() { | |||
| 322 | # | 347 | # |
| 323 | evalmacro() { | 348 | evalmacro() { |
| 324 | printf "#include <$1>\n[===[$2]===]\n" \ | 349 | printf "#include <$1>\n[===[$2]===]\n" \ |
| 325 | | runcc ${CPPFLAGS:-} -E - 2>>/dev/null \ | 350 | | runcc ${CPPFLAGS:-${EMPTY}} -E - 2>>/dev/null \ |
| 326 | | sed -ne " | 351 | | sed -ne " |
| 327 | s/^.*\\[===\\[ *\\(${3:-.*}\\) *\\]===\\].*$/${4:-\\1}/ | 352 | s/^.*\\[===\\[ *\\(${3:-.*}\\) *\\]===\\].*$/${4:-\\1}/ |
| 328 | t Found | 353 | t Found |
