This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

dependency generation changes


I've just put in some makefile changes that revamp the way automatic
dependencies are handled.  There is no longer a separate
dependency-generation pass.  Instead, the compilations use -MD and related
options to generate a dependency file corresponding to each object file.
This means the dependencies are now right for all the different flavors of
object file when things like #ifdef SHARED are involved.

One oddity in how I did this is that the post-processing we do on
dependency files is not done immediately after the compilation that
generated the file, but by the next make run that uses it.  I can change
this if it proves to be a problem.  The post-processing step allows the
build directory to be relocated.  After a "make" run, the dependency files
generated during the "make others" pass will still be around in their
un-post-processed form, and likewise with the test file deps after "make
check".  Any make run that completes without compiling anything new will
post-process all the dependency files, so if you want to leave a build
directory such that you can move it around later, do an extra "make".

An important new caveat is that if you remove dependency files (*.d and *.dt)
by hand without removing the corresponding object files, then the dependency
information will be lost.  Be careful not to do that, or a later header
file change might not cause everything to be rebuilt that it should.

I tested some builds from scratch and some using old build directories.
I haven't done exhaustive testing.  Please let me know if you see any new
problems with the makefiles.  It's hard to robustly test that all the
right dependencies are there, i.e. that changing files causes
recompilations when it should.  I did only trivial testing of that.


Thanks,
Roland


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]