I've got a source base in C using autoconf/automake, which now should be compiled using a C++ Compiler.
So I've renamed all files from .c to .cpp and changed all makefiles accordingly. However I get the following error (e.g.):
make[3]: *** No rule to make target 'tmsConfigFiles.c', needed by 'tmsConfigFiles.o'. Stop.
The Makefile basically consists of
bin_PROGRAMS = configparser
configparser_SOURCES = tmsConfigFiles.cpp tmsMoreFiles.cpp tmsEvenMoreFiles.cpp
AM_CXXFLAGS = -I .. -DSOME_DEFINE -Wall -Wextra -etc
This works for the overwhelming parts of the source code (some of which were cpp from start) but for some files the error message above appears. Did try to clean and autoreconf -is etc. to no avail.
The same revision works on Centos 6, fails sometimes on Centos 7, failes always on my Arch box.
Anyone had a similar bug in autotools or knows a workaround?
The obvious thing that I can think of is that you have not re-executed automake (or more properly autoreconf) after changing Makefile.am, and for whatever reason (there are more than a few ways for that to happen) you don't have maintaner-mode enabled.
This is, though, assuming you are actually editing Makefile.am to begin with. If you actually edited Makefile, then it's the opposite problem, automake is doing the right thing and ignoring altogether your changes by re-generating the file that should not be edited.
git clean -fx did not remove .deps directories.
Removing them manually solved the issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With