RFC: Permit relative path for --with-gxx-include-dir

Daniel Jacobowitz drow@false.org
Wed Mar 7 17:10:00 GMT 2007


On Wed, Mar 07, 2007 at 08:41:50AM -0800, Mark Mitchell wrote:
> I'm not sure what else a relative path would be relative to, other than
> the prefix?  The current working directory doesn't seem an obvious
> choice to me, but that's the only other thing I can imagine.  What
> interpretation would you make of a relative path?

"the user made a mistake" or "absolute paths don't start with / on
this system" (which your code incorrectly assumes, by the way).

> In any case, it seems better to me to define and document a way of doing
> what we want to do (which my patch does), rather than rely on the
> (AFAICT) undocumented approach of passing:
> 
>   --w-g-i-d='${prefix}'/some/where

It's undocumented in this context, but it seems better to me to
document it rather than add a new mechanism.

Google Code Search is really handy... I can find a number of other
examples of this by searching for:
  \--.*=\\\${prefix}

Aha, in fact, here's one interesting one!

svn://gcc.gnu.org/svn/gcc/branches/apple/trunk/build_gcc

# These are the configure and build flags that are used.
CONFIGFLAGS="--disable-checking -enable-werror \
  --prefix=$DEST_ROOT \
  --mandir=\${prefix}/share/man \
  --enable-languages=c,objc,c++,obj-c++ \
  --program-transform-name=/^[cg][^.-]*$/s/$/-$MAJ_VERS/ \
  --with-gxx-include-dir=\${prefix}/include/c++/$LIBSTDCXX_VERSION \
  --with-slibdir=/usr/lib \
  --build=$BUILD-apple-darwin$DARWIN_VERS"

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gcc-patches mailing list