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

Interesting automake feature




Hi,

I decided to finally take the plunge and automake:ify a new project when I
imported into SourceForge. It is a simple project with a few dozen classes
and it had a simple build system. Following a few tutorials I got automake
up and running and it seems to compile my project. It is horribly verbose
and slow, but if this is the way to go, I'll go that path too.

Anyway, I stumbled on a not so nice feature though, which must be
something I do totally wrong. It may be something that someone else has
seen, so I'll ask here. I have C++ files, the source files named "foo.cpp"
and the headers just "foo". But automake has a nasty habit of totally
destroying the headers when compiling. Needless to say this is a fucking
bad bug, it should never even attempt to overwrite my code. I already lost
a lot of small changes due to this fact. I see that it does things like:

	g++ [options] connection.cpp -o connection

which is really bad. It should of course be:

	g++ [options] connection.cpp -c connection

This does happen as soon as I edit a file and do a recompile. Doing a full
"make clean && ./autogen.sg && ./configure && make" always works ok. As
soon as a single file is edited and a non-clean recompilation is attempted
I get this problem. Compiling all files takes 20 minutes on my faster
machine, so it is no option.

Apparently I do something wrong, but my Makefile.am is really simple, and
contains no custom rules or anything that isn't on the first page of any
automake tutorial. My configure.in is also very simple and does nothing
more than setup some C++ cruft and check for a few libs. Anyone else seen
something like this?

I've tried with autoconf2.13 (won't work, so I use 2.5x instead) and the
automake versions from 1.4 to 1.7. All have the same problem. 1.7 is a lot
more verbose, but still nukes my precious files. Useless pice of crap.

The auto[conf|make] files are available from SourceForge if needed.


-- 
  And it came to pass that in time the Great God Om spake unto Brutha,
    the Chosen One: "Psst!"
                                        -- Terry Pratchett, Small Gods