automake
[Top][All Lists]
Advanced

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

Re: Testing a new compiler with Automake "simple tests"


From: Stefano Lattarini
Subject: Re: Testing a new compiler with Automake "simple tests"
Date: Tue, 17 Aug 2010 14:26:13 +0200
User-agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )

At Tuesday 17 August 2010, Roberto Bagnara wrote:
> On 08/17/10 13:26, Stefano Lattarini wrote:
> > At Tuesday 17 August 2010, Roberto Bagnara wrote:
> >> I would like to test a new special-purpose compiler
> >> (which is part of a bigger project) using the Automake
> >> "simple tests" feature.
> >> 
> >> I have two problems:
> >> 
> >> 1) I have not found a way to force recompilation
> >> 
> >>      of all test programs whenever the compiler executable
> >>      has changed.  Note that we are talking about
> >>      thousands of test programs so, if at all possible,
> >>      I would like to avoid listing that dependency
> >>      for each one of those.
> > 
> > Maybe I don't understand the problem, but... what's wrong
> > 
> > with:
> >    $(TESTS): your-special-purpose-compiler
> > 
> > or something similar?
> 
> That dependency cases relinking whenever the compiler
> changes, whereas I need recompilation.
Obviously you're right, sorry for not thinking this through.
If every test program is built from a single `.c' file, what
about using this instead:
  $(TESTS:=.o) your-special-purpose-compiler
It should also be portable make AFAIK.

> Do you know if there is a way I can force Automake
> to add a dependency on the compiler in the .c.o rule?
> That is, to generate:
> 
> .c.o: my-special-purpose-compiler
>       $(AM_V_CC) \
>       $(COMPILE) -c $<
> 
No, sorry; I don't even think it's possible (but I'm not sure about 
it, either).

> >> 2) Automatic dependency tracking cannot work in
> >> 
> >>      that directory of the project (indeed, the only
> >>      dependency is on the compiler... all the test
> >>      programs are self-contained).  How can I disably
> >>      automatic dependency tracking *only* on that
> >>      directory?
> > 
> > What about adding `no-dependencies' to AUTOMAKE_OPTIONS
> > in that directory's Makefile.am?
> Yes, this works.  Sorry for not having looked at the manual
> carefully enough (not that I did not try).
Well, I think it's not your fault: that option should be at least 
mentioned in the "Dependency Tracking" section.  This can probably be 
seen as a documentation bug.  Maybe I'll attempt a patch later or 
tomorrow.

Regards,
   Stefano



reply via email to

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