autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Success (mostly) with the testsuite


From: David Morgan
Subject: Re: Success (mostly) with the testsuite
Date: Tue, 24 Oct 2000 14:20:16 -0700

Hi Pavel 

I have investigated further

> 
> The best I can come up with so far is the line that does the sed replacement.
> 
> /^X\(\/\).*/{ s//\1/p; q;}
> 
> When presented with ac_file=Makefile this substitution is returning
> . XMakefile which I am not sure where we get this from.  It seems to work
> on the command line when passed XMakefile so I am not sure.
> 
> I've tried this in a small script and the same wrong thing happens.
> Given ac_file=Makefile I get . XMakefile
> 
> I'd appreciate a suggestion as to what to look at.  I'm taking a lunch
> break and then will have another look with fresher eyes.
> 

The problem is the expr replacement and the sed on ac_dir.
This has a comment just before it of:
# Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.

I have come to see there is something wrong.

The expr parts returns '.' on stdout (correct) and 1 - which seems wrong.

The gotcha here is that doing this as separate operations:
ac_dir=`expr ...`
echo $?

appears to echo the return code of the assignment not the expr.

Having the expr separately and then printing the return code
expr ...
echo $?

returned a 1

With the expr giving me a general result of "." and with the sed doing its
own thing gives an output of ". ." from sed - this then
is appended to the "." giving me ". . ." for the ac_dir of Makefile.

I also think the sed expression is wrong.  Fixing the combination of the 
two may require the test to be broken into 2 parts.

The following general code worked for me:

ac_dir=`expr ...`
if test -z "$ac_dir"; then
  ac_dir=`sed ...`
fi

After this change in the configure script I am now running the test suite.

It seems test 4 tools.m4:188 locks up but I am looking at that now and I'll
let you know what I find.

Regards
 David



reply via email to

[Prev in Thread] Current Thread [Next in Thread]