This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: configure scripts and cross-compiling


From: "Peter Kurpis" <pkurpis@keck.hawaii.edu>
To: <aoliva@redhat.com>
Cc: <gcc-help@gcc.gnu.org>; <bug-autoconf@gnu.org>
Sent: Thursday, May 24, 2001 11:04 AM
Subject: Re: configure scripts and cross-compiling


> `$CXX --print-search-dirs | sed -n 's/^install:
\(.*\)\/lib\/.*$/\1\/lib/p'`

To the best of my knowledge, sed is somewhat broken on a large number
of systems when it comes to using the \( \) backreferences.

One alternative might be:
`$CXX --print-search-dirs | sed -n 's#^install: ##p' | sed
's#/lib/.*#/lib#`

This gets rid of the \1 and save a bit of escaping characters. I know
there are a milion sed, awk, perl etc. ways to do this but as far as I
know simple sed commands like these are more portable. (Perhaps you
could do it in one go to save setting up one of the two pipes...)

Regards,
 Martin.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]