[GRASS5] configure.in Wants testers...

Justin Hickey jhickey at hpcc.nectec.or.th
Tue Nov 28 23:17:16 EST 2000


Hi Eric

"Eric G . Miller" wrote:
> On Tue, Nov 28, 2000 at 04:26:38PM +0700, Justin Hickey wrote:
> Well here's my understanding:
> 
> foo=${bar}   # Perform variable expansion on "bar", put result in foo.
> 
> foo=$(bar)   # Execute "bar" in a subshell, put result in foo.
> 
> The $(cmd) syntax is supposed to be the portable equivalent of `cmd`,
> only special characters $ \ and * (I think) are not treated as
> "metacharacters".
> 
> This $(...) syntax is different from Makefile $(...) which apparently 
> is variable substitution/expansion.

Ahh, OK, I went looking into why this doesn't seem to work for SGI and
found on the man page for sh the following:

Command Substitution
The standard output from a command enclosed in parentheses preceded by a
dollar sign ( $() ) or a pair of grave accents (``) may be used as part
or all of a word; trailing newlines are removed.

Obviously it is supposed to work on SGI's, they even claim the (``)
style to be archaic. However the following script

#!/bin/sh

qwer=$(pwd)
asdf=`pwd`
echo $qwer
echo $asdf

Produces the following output

$(pwd)
/usr/people/jhickey/testDir/sh

Thus, it obviously does not work on SGI as it is supposed to. I am due
for an OS upgrade soon, so if this problem is not solved with the
upgrade, I will try to submit a bug report to SGI.

In the meantime, would it be safe to change the SRCDIR code in
configure.in to `pwd` instead of $(pwd)? Perhaps we can add a comment to
change it back to $(pwd) when SGI fixes this bug. Just an idea.

BTW, do you want me to submit the bindir change or do you want to? I
didn't change it yesterday because I didn't have time to test --bindir
and --with-bindir. I tested them today and --bindir seems to work, but
--with-bindir does not, but then I can't find --with-bindir in the
configure.in file. Please let me know what you want to do.

-- 
Sincerely,

Jazzman (a.k.a. Justin Hickey)  e-mail: jhickey at hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand
==================================================================
People who think they know everything are very irritating to those
of us who do.  ---Anonymous

Jazz and Trek Rule!!!
==================================================================

---------------------------------------- 
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'



More information about the grass-dev mailing list