automake
[Top][All Lists]
Advanced

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

Re: How do I avoid this infinite loop?


From: Ralf Wildenhues
Subject: Re: How do I avoid this infinite loop?
Date: Thu, 6 Nov 2008 22:07:49 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

* Jules Colding wrote on Wed, Nov 05, 2008 at 11:23:00AM CET:
> On 04/11/2008, at 22.39, Ralf Wildenhues wrote:
>> * Jules Colding wrote on Tue, Nov 04, 2008 at 08:46:54AM CET:

>>> if HAVE_ACE_ROOT
>>> export LORICA_ROOT = $(LORICA_top_dir)
>>
>> FWIW, 'export' is GNU make-specific (several instances).
>
> What is the platform independent way to export Makefile variables then?

There is no platform-independent way to do so for all rules.  You have
to do it in every command in every rule that needs it:

target: prereq1 ...
        FOO='$(FOO)'; export FOO; \
        command...

>>>     $(ACE_ROOT)/ace/libACE.so.$(LIBACE_CURRENT).$(LIBACETAO_REVISION).$
>>
>> This looks very unportable to other systems.  Why do you not just use
>> libtool libraries, forget about the difference between darwin and  
>> linux,
>> and gain portability to BSDs and several other systems on the way?
>>
>> Erm, if those TAO libs are not yours, then you should go and suggest
>> this to their author, I guess.
>
> They do not use libtool to build these libraries. They are using a build 
> system called MPC (Makefile Project Creator) and there is no way I could 
> convince them to do it differently (they support Windows...). Is there a 
> better way for me to use these libraries in my ".am" files instead of the 
> above?

I have no idea.  I have never heard of MPC before, nor taken a look.

>>> .NOTPARALLEL:
>>
>> Why is that necessary?  Killing parallel make is such a performance
>> breaker.
>
> Yes, but I've seen it break horribly when some of the source files are  
> produced by the make target. Especially when some source files depends  
> on the presence of other (automatically generated) source files.

Then you should investigate which dependencies are not specified
correctly.

>> And this is GNU make-specific, too, by the way.  If you cannot
>> specify the full dependency graph, maybe you can require GNU make 3.81
>> and use order-only dependencies for at least some parallelism?
>
> How would I do that?

First off, the important part is you investigating which dependencies
are missing.  Then, when you know what's happening, state those
dependencies in the Makefile.am file.  Only if that produces suboptimal
rules (that rebuild too much, too often), start considering order-only
dependencies.  They are no panacea for not knowing what's going on.

Order-only dependencies are described here:
<http://www.gnu.org/software/make/manual/html_node/Prerequisite-Types.html>

Cheers,
Ralf




reply via email to

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