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: Roberto Bagnara
Subject: Re: Testing a new compiler with Automake "simple tests"
Date: Thu, 19 Aug 2010 15:12:45 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050929 Thunderbird/1.0.7 Fedora/1.0.7-1.1.fc4 Mnenhy/0.7.3.0

On 08/18/10 20:34, Ralf Wildenhues wrote:
* Stefano Lattarini wrote on Wed, Aug 18, 2010 at 03:42:01PM CEST:
On Wednesday 18 August 2010, Roberto Bagnara wrote:
On 08/18/10 13:18, Stefano Lattarini wrote:
At Wednesday 18 August 2010, Roberto Bagnara wrote:
  >>  #$(TESTS:address@hidden@): ../../bin/compiler

The above is rejected even with the dot.
This seems like an automake limitation... no big deal though, as there
is the simple workaround:

   TESTS_OBJS = $(TESTS:address@hidden@)
   $(TESTS_OBJS): ../../bin/compiler

which is also clearer to read IMO.

Yeah, that's just an automake parsing buglet.

it's better to do:
    TESTS = t1 t2 t3 t4 t5 t6
    TESTS_OBJS = $(t1_OBJECTS) $(t2_OBJECTS) $(t3_OBJECTS) \
                 $(t4_OBJECTS) $(t5_OBJECTS) $(t6_OBJECTS)

    $(TESTS_OBJS): ../../bin/compiler

Unfortunately, this is more error-prone, since if you add, say,
`t7' to TESTS, but forget to add $(t7_OBJECTS) to TESTS_OBJS,
you'll have missing dependencies...  Well, you'll decide what's
better for you.

Hmm, it is error-prone indeed.  Moreover, we have more than one
thousands tests and we could soon have two thousands of them.

I suppose automake could be enhanced to also define $(OBJECTS) as the
set of all objects.

Yes, this would be a nice thing.

But there are other ways you could hack around this.  Iff your compiler
is generated from a different Makefile.am (this is important!), then in
the tests/Makefile.am you could:

BUILT_SOURCES = stamp-objects
stamp-objects: ../../bin/compiler
         -rm -f *.$(OBJEXT)
         -rm -f sub/*.$(OBJEXT)
         ...
         echo timestamp>$@

It is rather hacky, but it should work.  Untested.

It works!
Thanks,

   Roberto

--
Prof. Roberto Bagnara
Applied Formal Methods Laboratory
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:address@hidden



reply via email to

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