autoconf-patches
[Top][All Lists]
Advanced

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

Re: Avoid certain spurious `testsuite' rebuilds


From: Ralf Wildenhues
Subject: Re: Avoid certain spurious `testsuite' rebuilds
Date: Sun, 2 Apr 2006 18:36:58 +0200
User-agent: Mutt/1.5.9i

Hi Noah,

* Noah Misch wrote on Sat, Apr 01, 2006 at 08:49:16PM CEST:
> On Sat, Apr 01, 2006 at 03:04:00PM +0200, Ralf Wildenhues wrote:
> > * Noah Misch wrote on Fri, Mar 31, 2006 at 06:09:06PM CEST:
> 
> > > +stamp_tgat = $(srcdir)/stamp-tgat
> 
> > > +## Rebuild TESTSUITE_GENERATED_AT when their sources change.
> > > +$(stamp_tgat): $(stamp_acm4)
> > > + test -f updated && mv -f updated $@; :

Shouldn't that be
        test -f updated && mv -f updated $@ || :

to cope with make implementations invoking `sh -e -c'?


> > `updated' and `$(stamp_tgat)' aka `$(srcdir)/stamp-tgat' may not be on
> > the same mount point.
> 
> Yes; good catch.  I moved `updated' into the source directory.

Thanks.  It may be useful to rename it so its purpose is easier to
deduce; maybe updated_tgat is enough.

> > If you want to be compatible to old BSDs, avoid touch for creating files
> > or updating time stamps, see autoconf.texi.  I don't know if we can
> > ignore this in practice, though.
> 
> From that description in the manual, I take that one should not use
> `touch' to update the mtime of an existing, empty file.  Using `touch'
> to update the mtime of an existing file >0 bytes long is portable, as
> is using `touch' to create a new, empty file with mtime = time().  Do
> you agree?

Yes, I think that's ok.

> Thanks for the review.  Here is an updated patch (same ChangeLog):

Thanks.  I guess it's ok to install.  It still doesn't work with OpenBSD
make though; I think it's because it does not check again that the
stamp-tgat time is not updated after its rule is executed:

$ touch ../autoconf-2.59c/lib/autoconf/c.m4
$ make check
echo 'This file preserves a timestamp.' >../../autoconf-2.59c/tests/updated
{ (cd ../../autoconf-2.59c/tests && ./mktests.sh  `echo " 
"../../autoconf-2.59c/lib/autoconf/general.m4  
../../autoconf-2.59c/lib/autoconf/status.m4  
../../autoconf-2.59c/lib/autoconf/autoheader.m4  
../../autoconf-2.59c/lib/autoconf/autoupdate.m4  
../../autoconf-2.59c/lib/autoconf/specific.m4  
../../autoconf-2.59c/lib/autoconf/functions.m4  
../../autoconf-2.59c/lib/autoconf/lang.m4  
../../autoconf-2.59c/lib/autoconf/c.m4  
../../autoconf-2.59c/lib/autoconf/fortran.m4  
../../autoconf-2.59c/lib/autoconf/headers.m4  
../../autoconf-2.59c/lib/autoconf/libs.m4  
../../autoconf-2.59c/lib/autoconf/types.m4  
../../autoconf-2.59c/lib/autoconf/programs.m4 | sed 's, [^ ]*/, 
../lib/autoconf/,g'`) &&  if test -f ../../autoconf-2.59c/tests/stamp-tgat; 
then rm -f ../../autoconf-2.59c/tests/updated; fi; }  || test $? -eq 55
echo 'This file preserves a timestamp.' >../../autoconf-2.59c/tests/stamp-acm4
test -f ../../autoconf-2.59c/tests/updated && mv -f 
../../autoconf-2.59c/tests/updated ../../autoconf-2.59c/tests/stamp-tgat; :
cd ../lib/autotest && make  autotest.m4f
`autotest.m4f' is up to date.
./autom4te --language=autotest -I ../../autoconf-2.59c/tests suite.at -o 
./testsuite.tmp

and the debugging output contains:
| ./testsuite:? = ../../autoconf-2.59c/tests/stamp-tgat

after the stamp-tgat rule.  I have not further analyzed this, though.

Anyway, it does not regress, and it improves with gmake there, so
I guess that is ok.

Cheers,
Ralf




reply via email to

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