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"

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to