autoconf
[Top][All Lists]
Advanced

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

Re: 'make' vs 'make -j1': Tpo files in different places


From: Ralf Wildenhues
Subject: Re: 'make' vs 'make -j1': Tpo files in different places
Date: Tue, 20 Jul 2010 20:53:10 +0200
User-agent: Mutt/1.5.20 (2010-04-22)

Hello Chris,

your question is an Automake one, not an Autoconf one.  Anyway:

* Chris Stankevitz wrote on Tue, Jul 20, 2010 at 08:39:09PM CEST:
> 'make' puts my .Tpo in this directory:
> .deps/TCExpressionLexer.Tpo
> 
> 'make -j1' puts my .Tpo in this directory:
> .deps/../../../SimLib/SimLib/Expression/TCExpressionLexer.Tpo

Please post 'make' and 'make -j1' output that shows this difference,
thanks.

Which Automake version are you using?

> Note: Some of my targets are placed in $(srcdir).  These targets are
> c++ source files created by the tool ANTLR.

OK.

> Question 1: why does 'make' and 'make -j1' place .Tpo files in different 
> directories?

Shouldn't happen.

> # These files are produced by ANTLR.  They must be created before attemping
> # to make the application, so they are added to BUILT_SOURCES
> BUILT_SOURCES = \
>         $(srcdir)/TCExpressionLexer.cpp \
>         $(srcdir)/TCExpressionLexer.hpp \
>         $(srcdir)/TCExpressionLexerTokenTypes.hpp \
>         $(srcdir)/TCExpressionParser.cpp \
>         $(srcdir)/TCExpressionParser.hpp \
>         $(srcdir)/TCExpressionTreeWalker.cpp \
>         $(srcdir)/TCExpressionTreeWalker.hpp
> 
> # Clean the auto-generated source files during a clean.  Also include the
> # text file that is produced but not used.
> CLEANFILES = $(BUILT_SOURCES) $(srcdir)/TCExpressionLexerTokenTypes.txt

IIUC then the BUILT_SOURCES are to be distributed, right?  If yes, they
should rather be in MAINTAINERCLEANFILES than in CLEANFILES, and if no,
they should rather be built in the build tree not the source tree, so
that read-only source trees can work.  If that is possible with antlr,
that is.

> # These instructions are a "hack" used to instruct make that all of the 
> # BUILT_SOURCES are produced when invoking the above rule and they are
> # not to be run in parallel
> $(srcdir)/TCExpressionLexer.hpp: $(srcdir)/TCExpressionLexer.cpp
> $(srcdir)/TCExpressionLexerTokenTypes.hpp: $(srcdir)/TCExpressionLexer.cpp
> $(srcdir)/TCExpressionParser.cpp: $(srcdir)/TCExpressionLexer.cpp
> $(srcdir)/TCExpressionParser.hpp: $(srcdir)/TCExpressionLexer.cpp
> $(srcdir)/TCExpressionTreeWalker.cpp: $(srcdir)/TCExpressionLexer.cpp
> $(srcdir)/TCExpressionTreeWalker.hpp: $(srcdir)/TCExpressionLexer.cpp

Why are these dependencies necessary?

Cheers,
Ralf



reply via email to

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