<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="">How does one convert a build.env list into a working string for sh env?</div><div class=""><br class=""></div><div class="">If I specify this build.env</div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div style="margin: 0px; font-stretch: normal; font-size: 24px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">build.env-append </span><span style="font-variant-ligatures: no-common-ligatures; color: #9d206f" class="">\</span></div><div style="margin: 0px; font-stretch: normal; font-size: 24px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> CC=${</span><span style="font-variant-ligatures: no-common-ligatures; color: #c1651c" class=""><a href="http://configure.cc" class="">configure.cc</a></span><span style="font-variant-ligatures: no-common-ligatures" class="">} </span><span style="font-variant-ligatures: no-common-ligatures; color: #9d206f" class="">\</span></div><div style="margin: 0px; font-stretch: normal; font-size: 24px; line-height: normal; font-family: Menlo; color: rgb(157, 32, 111);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""> </span><span style="font-variant-ligatures: no-common-ligatures" class="">"CFLAGS=${configure.cflags} [get_canonical_archflags cc]"</span></div></blockquote></div><div class=""><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 22px; caret-color: rgb(0, 0, 0);" class=""><br class=""></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 22px; caret-color: rgb(0, 0, 0);" class="">and later say something like</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 22px; caret-color: rgb(0, 0, 0);" class=""><br class=""></div><div class=""><div class=""><div class=""><blockquote type="cite" class=""><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><font face="Menlo" size="5" class=""><span style="caret-color: rgb(0, 0, 0);" class="">system "env ${build.env}"</span></font></div></blockquote></div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 22px;" class=""><div style="margin: 0px; font-stretch: normal; font-size: 24px; line-height: normal; font-family: Menlo; color: rgb(157, 32, 111);" class=""></div></div></div></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 22px; caret-color: rgb(0, 0, 0);" class=""><br class=""></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 22px; caret-color: rgb(0, 0, 0);" class="">This tcl string with braces ‘{…}’ is passed to the shell, which breaks:</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 22px; caret-color: rgb(0, 0, 0);" class=""><br class=""></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 22px; caret-color: rgb(0, 0, 0);" class=""><blockquote type="cite" class=""><div style="margin: 0px; font-stretch: normal; font-size: 24px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">env CC=/usr/bin/clang {CFLAGS=-Os -arch x86_64}</span></div></blockquote></div><div style="color: rgb(157, 32, 111); font-family: Menlo; font-size: 24px;" class=""><br class=""></div><div style="color: rgb(157, 32, 111); font-family: Menlo; font-size: 24px;" class=""><div style="font-family: Helvetica; font-size: 22px; color: rgb(0, 0, 0); caret-color: rgb(0, 0, 0);" class="">Rather, I need a port file command that converts build.env to:</div><div style="font-family: Helvetica; font-size: 22px; color: rgb(0, 0, 0); caret-color: rgb(0, 0, 0);" class=""><br class=""></div><div style="font-family: Helvetica; font-size: 22px; color: rgb(0, 0, 0); caret-color: rgb(0, 0, 0);" class=""><blockquote type="cite" class=""><div style="margin: 0px; font-stretch: normal; font-size: 24px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">env CC=/usr/bin/clang CFLAGS="-Os -arch x86_64"</span></div></blockquote><br class=""></div></div></div></div></body></html>