Re: Problems with a wrapper for configure

2004-04-27 Thread Andre Poenitz
On Tue, Apr 27, 2004 at 11:13:12AM +0100, Angus Leeming wrote: > Georg Baum wrote: > >> for arg in $@ > > > > This needs to be: > > > > for arg in "@" > > That's "$@" ? Yes. > > > as I learned recently from André. Otherwise it would print the same > > wrong result even if the input was correc

Re: Problems with a wrapper for configure

2004-04-27 Thread Angus Leeming
Angus Leeming wrote: > The moral of the story is that this works: > > CONFIGURE="../configure --prefix=/usr/local ${EXTRAINC} > --enable-maintainer-mode --with-version-suffix > --with-included-gettext" > > echo ${CONFIGURE} "--with-frontend=${FRONTEND}" > cd ${BUILDDIR} > ${CONFIGURE} "--with-fr

Re: Problems with a wrapper for configure

2004-04-27 Thread Angus Leeming
Alfredo Braunstein wrote: > bash dont do variable substitution inside '', but it does inside "". Sure. That's true of all sh-shells. csh too for that matter. > I don't know if this applies here though. Gee I barely know what are > we talkning about. ;-) Shells are easy, except when they aren't.

Re: Problems with a wrapper for configure

2004-04-27 Thread Angus Leeming
Georg Baum wrote: > From the bash manpage, section "Special Parameters": > > @ Expands to the positional parameters, starting from one. > When the expansion occurs within double quotes, each parameter > expands to a separate > word. That is, "$@" is equivalent to "$1" "$2" ... When there ar

Re: Problems with a wrapper for configure

2004-04-27 Thread Alfredo Braunstein
Angus Leeming wrote: > The moral of the story is that this works: > > CONFIGURE="../configure --prefix=/usr/local ${EXTRAINC} > --enable-maintainer-mode --with-version-suffix --with-included-gettext" > > echo ${CONFIGURE} "--with-frontend=${FRONTEND}" > cd ${BUILDDIR} > ${CONFIGURE} "--with-fron

Re: Problems with a wrapper for configure

2004-04-27 Thread Georg Baum
Angus Leeming wrote: > Georg Baum wrote: >>> for arg in $@ >> >> This needs to be: >> >> for arg in "@" > > That's "$@" ? Of course, sorry for the confusion. >> as I learned recently from André. Otherwise it would print the same >> wrong result even if the input was correct. > > Explanation

Re: Problems with a wrapper for configure

2004-04-27 Thread Angus Leeming
The moral of the story is that this works: CONFIGURE="../configure --prefix=/usr/local ${EXTRAINC} --enable-maintainer-mode --with-version-suffix --with-included-gettext" echo ${CONFIGURE} "--with-frontend=${FRONTEND}" cd ${BUILDDIR} ${CONFIGURE} "--with-frontend=${FRONTEND}" But putting the '-

Re: Problems with a wrapper for configure

2004-04-27 Thread Angus Leeming
Georg Baum wrote: >> for arg in $@ > > This needs to be: > > for arg in "@" That's "$@" ? > as I learned recently from André. Otherwise it would print the same > wrong result even if the input was correct. Explanation please. -- Angus

Re: Problems with a wrapper for configure

2004-04-27 Thread Georg Baum
Angus Leeming wrote: > From the mailer. Attached is the test code I've used. 'conftest.sh' > invokes a dummy 'configure' that just prints out the args: > > $ sh conftest.sh > ./configure --with-frontend='xforms qt gtk' > arg is "--with-frontend='xforms" > arg is "qt" > arg is "gtk'" I get the sa

Re: Problems with a wrapper for configure

2004-04-26 Thread Angus Leeming
Georg Baum wrote: >> CONFIGURE="../configure --prefix=/usr/local >> --with-extra-inc=/usr/include/qt3 --enable-maintainer-mode >> --with-version-suffix --with-included-gettext >> --with-frontend='xforms qt gtk'" > > Does this line break come from the mailer or is it in the script? I > don't know,

Re: Problems with a wrapper for configure

2004-04-26 Thread Georg Baum
Angus Leeming wrote: > $ cat conftest.sh > #! /bin/sh > > CONFIGURE="../configure --prefix=/usr/local > --with-extra-inc=/usr/include/qt3 --enable-maintainer-mode > --with-version-suffix --with-included-gettext --with-frontend='xforms > qt gtk'" Does this line break come from the mailer or is it

Problems with a wrapper for configure

2004-04-26 Thread Angus Leeming
Can anybody see what is wrong with this shell script. It fails on a machine running Debian unstable. Error message below. The perverse thing is that it runs fine on a machine running Fedora 1 and if I cut and paste ../configure --prefix=/usr/local --with-extra-inc=/usr/include/qt3 --enable-mai