[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#12142: automake tries to compile a program when 'foo' and 'foo.cxx'
bug#12142: automake tries to compile a program when 'foo' and 'foo.cxx' exist (though the former is header)
Sun, 5 Aug 2012 11:45:51 +0200
I was writing a C++ library and I think I hit a pretty ugly bug within
automake. My library was structured like the following:
- src/foo (the header file),
- src/foo.cxx (the code).
These files assemble a library, let's call it libfoo.la.
The problem is that every time I modify src/foo.cxx and call 'make',
automake first (correctly) compiles the library, and then mistakenly
tries to compile and link it into a program src/foo, either effectively
overwriting or removing my header file, or failing early due to
missing dependency file.
What's interesting, 'make' calls not following src/foo.cxx changes work
correctly; just the one after modifying src/foo.cxx fails.
Here are the minimal configure.ac & Makefile.am files with which I can
reproduce the issue:
include_HEADERS = src/foo
lib_LTLIBRARIES = libfoo.la
libfoo_la_SOURCES = src/foo.cxx
I've also prepared a git repository with the simple test case:
git clone https://bitbucket.org/mgorny/automake-cxx-bug.git
make # compiles fine
make # fails
Related Gentoo bug report:
Description: PGP signature
- bug#12142: automake tries to compile a program when 'foo' and 'foo.cxx' exist (though the former is header),
Michał Górny <=