automake
[Top][All Lists]
Advanced

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

Re: renamed objects and other languages


From: Stepan Kasal
Subject: Re: renamed objects and other languages
Date: Thu, 26 Apr 2007 11:58:26 +0200
User-agent: Mutt/1.4.2.1i

Hello Florian,

* Florian Briegel wrote on Mon, Apr 23, 2007 at 11:59:10AM CEST:
> Am Montag, 23. April 2007 schrieb Benoit Sigoure:
> > Is there any reason why you would not want to do this?
> 
> Simplicity.
> 
>   aaa_SOURCES = foo.x
> 
> is much more easy to handle [...]

indeed.  I believe you have found a bug, and I believe it is
desirable to fix it.

Though I'm not able to write a patch right now, I can write down some
hints: perhaps they will inspire someone to contribute a patch.  ;-)

First, let's start with a completely different example:

wow_SOURCES = boo.cc baux.h bleah.zz
.zz.cc:
        cp $< $@

Then the generated Makefile.in contains:

am_wow_OBJECTS = boo.$(OBJEXT) bleah.$(OBJEXT)
wow_OBJECTS = $(am_wow_OBJECTS)

Why?  Obviously, Automake knows there is a .cc.o rule, which results
in boo.o.  Automake also knows there is no rule to compile *.h to an
object file, so there is no baux.o in the list.

Most interestingly, Automake is able to discover that *.zz will be
eventually compiled into *.o, via a *.cc file.
Look at the procedure derive_suffix in automake/automake.in.
For example, derive_suffix('.zz', '$(OBJEXT)') evaluates to '.cc'.

So back to your example:
I believe Automake knows foo.cc is the last step before foo.o, and I
believe the code should be fixed to use foo.cc instead of foo.x in
the `aaa-foo.o' rule.

If you are willing to make a first iteration of the patch, I believe
it would be welcome.  The next step would be to run "make check" with
that patch.

Hope this helps,
        Stepan




reply via email to

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