This is the mail archive of the mailing list for the GCC project.

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

Re: [build/rfc] automatic md file dependencies

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, but if
itself depends on those files, you have the same problem.

But, as you noticed, you end up building 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/$$\")"; \
	done > md

It's not automatic, but it's easy to manage and reliable wrt deletions.

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