https://gcc.gnu.org/g:ba53ccad554bb4f3c2b0e457a18557ae0f54b05e
commit r15-4009-gba53ccad554bb4f3c2b0e457a18557ae0f54b05e Author: Jakub Jelinek <ja...@redhat.com> Date: Wed Oct 2 10:14:50 2024 +0200 opts: Fix up regenerate-opt-urls dependencies It seems that we currently require 1) enabling at least c,c++,fortran,d in --enable-languages 2) first doing make html before one can successfully regenerate-opt-urls, otherwise without 2) one gets make regenerate-opt-urls make: *** No rule to make target '/home/jakub/src/gcc/obj12x/gcc/HTML/gcc-15.0.0/gcc/Option-Index.html', needed by 'regenerate-opt-urls'. Stop. or say if not configuring d after make html one still gets make regenerate-opt-urls make: *** No rule to make target '/home/jakub/src/gcc/obj12x/gcc/HTML/gcc-15.0.0/gdc/Option-Index.html', needed by 'regenerate-opt-urls'. Stop. Now, I believe neither 1) nor 2) is really necessary. The regenerate-opt-urls goal has dependency on 3 Option-Index.html files, but those files don't have dependencies how to generate them. make html has dependency on $(HTMLS_BUILD) which adds $(build_htmldir)/gcc/index.html and lang.html among other things, where the former actually builds not just index.html but also Option-Index.html and tons of other files, and lang.html is filled in by configure depending on configured languages, so sometimes will include gfortran.html and sometimes d.html. The following patch adds dependencies of the Option-Index.html on their corresponding index.html files and that is all that seems to be needed, make regenerate-opt-urls then works even without prior make html and even if just a subset of c/c++, fortran and d is enabled. 2024-10-02 Jakub Jelinek <ja...@redhat.com> * Makefile.in ($(OPT_URLS_HTML_DEPS)): Add dependencies of the Option-Index.html files on the corresponding index.html files. Don't mention the requirement that all languages that have their own HTML manuals to be enabled. Diff: --- gcc/Makefile.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 68fda1a75918..059cf2e8f79f 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -3640,12 +3640,12 @@ $(build_htmldir)/gccinstall/index.html: $(TEXI_GCCINSTALL_FILES) $(SHELL) $(srcdir)/doc/install.texi2html # Regenerate the .opt.urls files from the generated html, and from the .opt -# files. Doing so requires all languages that have their own HTML manuals -# to be enabled. +# files. .PHONY: regenerate-opt-urls OPT_URLS_HTML_DEPS = $(build_htmldir)/gcc/Option-Index.html \ $(build_htmldir)/gdc/Option-Index.html \ $(build_htmldir)/gfortran/Option-Index.html +$(OPT_URLS_HTML_DEPS): %/Option-Index.html: %/index.html regenerate-opt-urls: $(srcdir)/regenerate-opt-urls.py $(OPT_URLS_HTML_DEPS) $(srcdir)/regenerate-opt-urls.py $(build_htmldir) $(shell dirname $(srcdir))