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: Wed, 18 Aug 2010 12:45:00 +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/17/2010 08:47 PM, Ralf Wildenhues wrote:
* Stefano Lattarini wrote on Tue, Aug 17, 2010 at 02:26:13PM CEST:
At Tuesday 17 August 2010, Roberto Bagnara wrote:
On 08/17/10 13:26, Stefano Lattarini wrote:
    $(TESTS): your-special-purpose-compiler

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.

This doesn't take into account that object file names are an internal
detail of Automake.  In practice, they might end in .obj, as Stefano
already noted, which $(OBJEXT) or @OBJEXT@ can tell you, but also,
object files may be renamed due to one of several reasons such as
per-target flags, (obsolete) KnR support, and others.

I'm mentioning @OBJEXT@ because
   $(TESTS:=$(OBJEXT)): compiler

is not portable to some make implementations, while
   $(TESTS:address@hidden@): compiler

is.  Also, if your tests contain scripts as well,
   $(check_PROGRAMS:address@hidden@): compiler

or EXTRA_PROGRAMS may be more correct.

Dear Stefano and Ralf,

thank you very much for your assistance.  I am a bit
confused; here is what I have in my Makefile.am

# This does not work: Automake 1.11 rejects it with
#   Makefile.am:1148: bad characters in variable name `$(TESTS'
#$(TESTS:address@hidden@): ../../bin/compiler

# This does not work: when ../../bin/compiler changes, tests are not recompiled.
#TESTS_OBJS = $(TESTS:address@hidden@)
#$(TESTS_OBJS): ../../bin/compiler

# This works (but is nonportable and has several other problems).
TESTS_OBJS = $(TESTS:=.o)
$(TESTS_OBJS): ../../bin/compiler

I am sure I am missing something obvious...
All the best,

   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]