This is the mail archive of the
mailing list for the Cygwin project.
Re: mknetrel issues
- From: Igor Pechtchanski <pechtcha at cs dot nyu dot edu>
- To: Max Bowsher <maxb at ukf dot net>
- Cc: cygwin-apps at cygwin dot com
- Date: Sat, 14 Jun 2003 18:45:47 -0400 (EDT)
- Subject: Re: mknetrel issues
- Reply-to: cygwin-apps at cygwin dot com
On Sat, 14 Jun 2003, Max Bowsher wrote:
> I've been trying to use mknetrel (natively on Cygwin) to build myself a
> I ran into a variety of small issues:
> 1) This line:
> sedit 's/^gcc_version_trigger[ ]*=.*$//' Makefile '*' :
> contains whitespace in the sed pattern. It's quoted here, but by the time it
> is actually used, the quotes have been lost by passing it to a shell
> function, producing the error "unterminated 's' command".
> 2) Use of $(BASE_FLAGS_TO_PASS) and $(EXTRA_HOST_FLAGS)
> I'm guessing these are intended to be make variables, but the quotes are
> getting lost prematurely, and they are being interpreted by bash as $()
> command interpolation.
> 3) There seems to be a bug in extra/gcc: The addmakeflags GCJ=... GCJH=...
> does not take account of the fact that addmakeflags removes whitespace
> between its arguments, leading to the single flag of GCJ=...GCJH=... being
> I'm a little confused why all this is going wrong for me - given that
> mknetrel must obviously get regular use. On the other hand, I don't see what
> could be odd about my system to cause this.
> Can anyone (well, cgf, probably) explain any of this?
Did you try a simple script with the same quoting? The one below seems to
work for me:
gcc_version_trigger = BLAH
Testing" | sed "$1"
sedit 's/^gcc_version_trigger[ ]*=.*$//'
Further, mknetrel is a bash script. AFAIK, bash inherits the environment
variables and some aliases/shell functions from the parent shell. If you
compared the values of the environment variables and exported aliases for
your shell with those for cgf's (who runs mknetrel regularly, apparently
with no such problems), you might see some clues...
One thing I thought of right away was whether "sed" was an exported shell
function in your environment. I got the same results as you did by doing
export -f sed
and then running the script above. FWIW, quoting the arguments to sed
above (i.e., using '"$@"' instead of '$*') fixes the problem. However,
mknetrel defines its own sed() function, so I'm not sure how this relates.
I'm also not sure why you'd lose the quoting in case 2 above, but it may
be related to a similar problem. Perhaps running mknetrel with "bash -p"
|\ _,,,---,,_ firstname.lastname@example.org
ZZZzz /,`.-'`' -. ;-;;,_ email@example.com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D.
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster." -- Patrick Naughton