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

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

 



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

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf


[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux