public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* dependency generation changes
@ 2003-05-02  2:21 Roland McGrath
  2003-05-02  4:27 ` Ulrich Drepper
  0 siblings, 1 reply; 3+ messages in thread
From: Roland McGrath @ 2003-05-02  2:21 UTC (permalink / raw)
  To: GNU libc hackers

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: dependency generation changes
  2003-05-02  2:21 dependency generation changes Roland McGrath
@ 2003-05-02  4:27 ` Ulrich Drepper
  2003-05-02  7:21   ` Roland McGrath
  0 siblings, 1 reply; 3+ messages in thread
From: Ulrich Drepper @ 2003-05-02  4:27 UTC (permalink / raw)
  To: Roland McGrath; +Cc: GNU libc hackers

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This new method has a problem with -jN, N > 1.  The stamp.oST files are
sometimes not created before needed in another goal.

- -- 
- --------------.                        ,-.            444 Castro Street
Ulrich Drepper \    ,-----------------'   \ Mountain View, CA 94041 USA
Red Hat         `--' drepper at redhat.com `---------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+sfNN2ijCOnn/RHQRAkdSAJ0Yr6t6OthNivONp+PYM1BlNThLwQCcDjFx
nrXtnspuMBXZ1CXK/QWgfyQ=
=Hp6d
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: dependency generation changes
  2003-05-02  4:27 ` Ulrich Drepper
@ 2003-05-02  7:21   ` Roland McGrath
  0 siblings, 0 replies; 3+ messages in thread
From: Roland McGrath @ 2003-05-02  7:21 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: GNU libc hackers

> This new method has a problem with -jN, N > 1.  The stamp.oST files are
> sometimes not created before needed in another goal.
>
> make[2]: Entering directory `/misc/myware/drepper/gnu/libc/locale'
> .././scripts/mkinstalldirs /home/drepper/local/glibc-build/20030501/locale
> echo '' > /home/drepper/local/glibc-build/20030501/locale/stamp.oST
> /bin/sh: line 1:
> /home/drepper/local/glibc-build/20030501/locale/stamp.oST: No such file
> or directory
> mkdir /home/drepper/local/glibc-build/20030501/locale
> make[2]: *** [/home/drepper/local/glibc-build/20030501/locale/stamp.oS]
> Error 1

An error like this from sh means the directory didn't exist.  I added the
$(make-target-directory) that should fix this case.  There might be others
that can come up with -j too.  Many could be omitted before because the
deps pass always did it first.  If any similar problem comes up, it should
be fixed just as simply.


Thanks,
Roland

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-05-02  7:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-02  2:21 dependency generation changes Roland McGrath
2003-05-02  4:27 ` Ulrich Drepper
2003-05-02  7:21   ` Roland McGrath

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).