Repository navigation
Conversation
If you try to assign and export on the same line on some older /bin/sh implementations, it complains: ``` $ export "NAME=value" NAME=value: is not an identifier ``` Also, as written, the name and value are quoted together. This also makes old /bin/sh sad: ``` $ "NAME=value" NAME=value: not found ``` This commit rewrites run-compiler's assignments and exports to work with old /bin/sh, splitting assignment and export into two separate statements, and only quote the value. So now we have: ``` NAME="value" export NAME ``` While we're here, make the same change to the two supporting assign+export lines preceeding the script to be consistent with how exports work throughout the rest of configure.ac.
|
Splitting assignments and export into multiple commands to make the script work in older systems with an sh interpreters that doesn't comply with POSIX issue 6 or issue 7 is fine. 👍
That makes any sh sad, not only old sh. :( |
Fair enough, we can rewrite the commit message to drop that note if we like. |
|
Thanks! |
If you try to assign and export on the same line on some older /bin/sh implementations, it complains: ``` $ export "NAME=value" NAME=value: is not an identifier ``` This commit rewrites run-compiler's assignments and exports to work with old /bin/sh, splitting assignment and export into two separate statements, and only quote the value. So now we have: ``` NAME="value" export NAME ``` While we're here, make the same change to the two supporting assign+export lines preceeding the script to be consistent with how exports work throughout the rest of configure.ac. Closes curl#11228
|
Sorry to reply to a long dead thread, but in case anyone is building an old version of curl, I'd like to spare them the hours of troubleshooting I just went through by helping this thread show up in their search results. For me this bug manifested as the curl build process hanging at "checking if compiler accepts some basic options...", with no further output. (Related: lwthiker/curl-impersonate#261) |
If you try to assign and export on the same line on some older /bin/sh implementations, it complains:
Also, as written, the name and value are quoted together. This also makes old /bin/sh sad:
This commit rewrites run-compiler's assignments and exports to work with old /bin/sh, splitting assignment and export into two separate statements, and only quote the value. So now we have:
While we're here, make the same change to the two supporting assign+export lines preceeding the script to be consistent with how exports work throughout the rest of configure.ac.