[Top][All Lists]

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

Re: How do I avoid this infinite loop?

From: Jules Colding
Subject: Re: How do I avoid this infinite loop?
Date: Wed, 5 Nov 2008 11:23:00 +0100

Hi Ralf,

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

I have a little project in where I use a third party project. My
"" has a rule to update and build the third party project but this rule enters an unconditional infinite loop. Right now I'm getting
the source for the external project from svn. I would like my to do this:
I pasted the "" in below. The problem is that make repeats
the "$(TAO_FILES):" target infinitely. How to I make it execute the "$
(TAO_FILES):" target exactly once?

First, are you really sure it runs indefinitely?  Maybe it just runs
once for each file in $(TAO_FILES).

If that is the case, then here's the deal explained:
< >

That may actually be the case... The commands is very time consuming so I didn't let it run for more than 5 or 10 times. Thanks for the link, I'll investigate.

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?

        $(ACE_ROOT)/ace/libACE.dylib                            \

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?


Why is that necessary?  Killing parallel make is such a performance

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.

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?

        cd $(ACE_ROOT) && $(SVN) up
        cd $(TAO_ROOT) && $(ACE_ROOT)/bin/ TAO_ACE.mwc -type gnuace
        cd $(ACE_ROOT)/ace                 && CXX="$(CXX) $

If you are aiming to overwrite CXX for the makefile in question,
then either use
 $(MAKE) -f GNUmakefile CXX='$(CXX) ...'

or use
 CXX='$(CXX) ...' $(MAKE) -e -f GNUmakefile

otherwise that won't work.  With non-GNU make, the first of the two
possibilities does not always override variables initialized in the

Ah, I didn't know that.

Hope that helps.

It surely does :-)

Thanks a lot,

reply via email to

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