Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I have a project that uses GNU autotools to build itself. I am trying to modify so that autotools generates all the non-versioned control files in a separate directory so that I can keep the source tree clean of temporary files. Anyone has any ideas how to do this ?

share|improve this question
2  
Just do a out-of-tree build: stackoverflow.com/questions/1311231/… it still leaves some residue, unfortunately. Give CMake a try some day. –  Vitor Jul 1 '11 at 13:21
1  
That day has come, it took me less than an hour to switch from that ugly autconf to cmake which seems a lot more cleaner. –  vorad Jul 1 '11 at 16:27
    
CMake is way cleaner than autoconf: in fact, a out of tree build is the most common way of doing a CMake build. Good choice :) –  Vitor Jul 1 '11 at 16:36
    
How usual is it to have a Makefile at the top of the source tree that controls the build process with cmake? Say make will run mkdir -p build && cd build && cmake .. && make and so on (different targets maybe like make test etc.). –  vorad Jul 1 '11 at 16:50
    
Uncommon. CMake should generate makefiles, not the other way around! Look for a book called Mastering CMake or at VTK or KDE building processes for real word examples. A great advantage of CMake is being on top of make: it can also build your software using Visual Studio vcproj, nmake Makefiles, XCode etc. KDE uses a shell script ('kdebuild') to start the build processes - maybe you want to take a look at it. –  Vitor Jul 1 '11 at 16:57
show 1 more comment

1 Answer

The autotools package has a lot of hard coded relative paths and names in it for a good reason. Your best option is to sum up the output and tag them as ignored in your revision control, e.g. in .cvsignore, .hgignore or as svn:ignore attibute. Some RCS let you even recursively specify wildcards.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.