Hi! On Sat, Sep 21, 2024 at 07:43:25PM +0200, Jakub Jelinek wrote: > 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.
I'd like to ping this patch. Bootstrapped/regtested on x86_64-linux and i686-linux several times (and tested that make regenerate-opt-urls just works in that case even without make html or configuring in d,fortran). > 2024-09-21 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. > > --- gcc/Makefile.in.jj 2024-09-18 15:03:25.979207519 +0200 > +++ gcc/Makefile.in 2024-09-21 19:26:31.160949856 +0200 > @@ -3640,12 +3640,12 @@ $(build_htmldir)/gccinstall/index.html: > $(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)) Jakub