This is the mail archive of the
mailing list for the GCC project.
Re: [build/rfc] automatic md file dependencies
- From: DJ Delorie <dj at redhat dot com>
- To: rth at redhat dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 15 Dec 2004 19:39:23 -0500
- Subject: Re: [build/rfc] automatic md file dependencies
- References: <20041215225517.GA23034@redhat.com>
Note one problem with this type of system:
If you edit an .md file to remove an (include), and delete the
included file, as long as the dependency is still there, the missing
file will cause a build failure, and may even prevent regenerating
With GNU make, you can get around this somewhat by rebuilding any
needed Makefile sources and restarting the build, but your patch has
no targets corresponding to the included mddeps.mk, but if mddeps.mk
itself depends on those files, you have the same problem.
But, as you noticed, you end up building mddeps.mk too often.
Anyway, if you could try your patch with the scenario I described
above and ensure that it would work, I'd appreciate it. You might
want to experiment with .PHONY.
FYI I got around this with code like this in t-target:
md_file = md
MD_FILES = a b c d e f
md : $(srcdir)/config/target/t-target
for md in $(MD_FILES); do \
echo "(include \"$(srcdir)/config/target/$$md.md\")"; \
done > md
It's not automatic, but it's easy to manage and reliable wrt deletions.