crosstool-ng: where is a strategic place to tell crosstool-ng that sed should be gsed?
Yann E. MORIN
yann.morin.1998@anciens.enib.fr
Tue Jan 6 19:15:00 GMT 2009
John, Dimitry,
All,
On Tuesday 06 January 2009 18:39:17 Dimitry Andric wrote:
> John Utz wrote:
> > BSD sed doesnt grok '-r' and it's used all over the place in crosstool-ng.
> The (FreeBSD) sed option for extended regular expressions is -E, but a
> quick hack alternative would be to just do "alias sed gsed" in the
> beginning of the script. :)
Or better, a shell function defined from the calling shell, and that is
exported, such as:
---8<--- BEGIN ---8<---
sed() { gsed "$@"; }
export -f sed
./configure bla bla
make
make install
ct-ng bla bla
---8<--- END ---8<---
As for awk, I'm quite sure we're already calling gawk, not plain awk (by
default, awk used to be mawk on my Debian box, so I had to explicitly call
gawk).
> > What would be desired would be either some environment vars or some
> > configure time detection that does the right thing or a flag called 'use
> > BSD names for gnu utils'
> Just something like:
> SED="gsed"
> AWK="gawk"
> and replacing direct invocations of sed, awk, e.g. with ${SED}, ${AWK},
> and so on.
Which means ./configure should be able to:
- check for a tool
- accept command line options such as: --with-sed=/foo/bar/gsed
- set some VAR to the path of the tool
- sed ./ct-ng.in replacing @@VAR@@ with ${VAR}
That'd be great, but is currently low on my TODO, because ./configure is
hand-written, and has grown quite a bit out of control untill now... :-(
But if someone is willing to have a look... ;-]
Thus, the function trick would be a fast workaround.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software Designer | \ / CAMPAIGN | ___ |
| --==< ^_^ >==-- `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
`------------------------------^-------^------------------^--------------------'
--
For unsubscribe information see http://sourceware.org/lists.html#faq
More information about the crossgcc
mailing list