How to convert command.env tcl lists with spaces into working env strings
Steven Smith
steve.t.smith at gmail.com
Thu Sep 1 11:51:42 UTC 2022
How does one convert a build.env list into a working string for sh env?
If I specify this build.env
> build.env-append \
> CC=${configure.cc} \
> "CFLAGS=${configure.cflags} [get_canonical_archflags cc]"
and later say something like
> system "env ${build.env}"
This tcl string with braces ‘{…}’ is passed to the shell, which breaks:
> env CC=/usr/bin/clang {CFLAGS=-Os -arch x86_64}
Rather, I need a port file command that converts build.env to:
> env CC=/usr/bin/clang CFLAGS="-Os -arch x86_64"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20220901/328aa8e1/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3898 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20220901/328aa8e1/attachment.bin>
More information about the macports-dev
mailing list