c++ - Automake rebuild source file if Makefile changes -


when using autoconf/automake build system if compiler flags or other variables in makefile.am (or higher level configure.ac) change, c++ source files associated makefile not automatically rebuilt. becomes important use automake part of continuous build system recompiles needed.

my thought include makefile dependency .o files theoretically solve above issue. couple of questions:

first, possible add rule that? prefer not have add custom rule every single makefile.am, placed top-level file (like configure.ac) great.

second, downside approach in cases change makefile did not affect compilation end rebuilding when not needed. guess i'm willing live (or @ least try see how painful is) have better guarantee builds correct, there better way solve problem? believe clearmake solves saving actual compiler command (along other dependencies) comparing current command previous determine if file needs regenerated.

if use ccache (./configure cxx='ccache g++', or add ccache's g++ path), spurious rebuilds should cheap , still safe. make sure never use am_maintainer_mode autoconf macro, makes dependency tracking optional (conditional on --enable-maintainer-mode flag).


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -