tags:

views:

126

answers:

1

Hello! I'm trying to dig in one autotools-based project, kind of big in fact. I'm working on a small part of it, a subdirectory. And I need to add/move/remove files and directories constantly inside this little part.

Running ./configure on top-level every time not only time-consuming, but causes the whole object tree to become invalid (sorry about the terms, but I'm kind of new at this). So I figured out how to regenerate Makefile.in from Makefile.am (by running automake path/to/my/part), and I figured out how to regenerate Makefile from Makefile.in in build tree (by runinning ./config.status path/to/my/part). But there's something I still cannot figure out: how to regenerate all dependency files (.deps/*.Plo inside each subdirectory in build tree). Indeed, running configure again solves the problem. So, my question is: how to regenerate dependency files without running configure again? Thanks in advance.

A: 

Maybe the answer is a bit late...

I assume you cleaned your path/to/my/part and regenerated Makefile by the commands listed in your question.

Then execute

rm .deps/*

to remove the old dependencies and

grep "^include " Makefile | sed -e 's/^include .\///;s/\$(DEPDIR)/.deps/' | xargs touch

to query the Makefile for dependencies and generate empty bogus files. Now

make

should compile your code and regenerate the dependencies as side-effect.

Note: I assume your the DEPDIR to be set to the default (.deps) and that there are no further include directives in your Makefile.am. However, changing this should be simple.

Niels Lohmann