# Boost-Build :

From: Andre Hentz (gclbb-jamboost_at_[hidden])
Date: 2003-04-21 18:50:26

On Mon, 21 Apr 2003, David Abrahams wrote:
> >> 1. I want to make sure this is the only core change which is
> >> immediately needed, especially in the area of path
> >> translation. There are a number of other functions at
> >> http://cygwin.com/cygwin-api/cygwin-api.html which might be
> >> worth exposing.
> >>
> >
> > Perhaps a platform dependent way of escaping arguments. Or a
> > platform independent way of executing commands, something like exec().
>
> Not sure what you're suggesting. Could you be more concrete?

I may be suggesting something impossible to achieve but let's see. Getting
the pathname right is half of the problem. The other half is getting this
pathname through the shell (command.com, cmd.com, bash, tcsh, you name
it). Once we the pathname is acceptable by the compiler/linker, it has to
be escaped properly, according to the platform. For instance, c:\my files
maybe correct for msvc and borland but it may have to be escaped in
different ways under nt or cygwin.

The possibilities I can think of are:
1) Instead of saying "\$(var)", we could say \$(var:XXX) to get a
properly escaped argument.
2) Instead of CC \$(var1) \$(var2), we could have 'exec CC \$(var1)
\$(var2)', which would avoid shell expansion and associated problems.

I'm pretty new to BoostBuild so please excuse me if any of the above
doesn't make much sense.

Best,

Andre Hentz