Add makefile target to update HTML files in source tree
diff mbox series

Message ID 20191008110138.GA4713@redhat.com
State New
Headers show
Series
  • Add makefile target to update HTML files in source tree
Related show

Commit Message

Jonathan Wakely Oct. 8, 2019, 11:01 a.m. UTC
Also remove the creation of the html/ext sub-directory, which has been
unused since revision r245258.

	* doc/Makefile.am (doc-html-docbook-regenerate): New target.
	(${docbook_outdir}/html): Do not create unused 'html/ext' directory.
	* doc/Makefile.in: Regenerate.
	* doc/xml/manual/documentation_hacking.xml: Document new target.
	* doc/html/*: Regenerate.

If you have the docbook stylesheets installed then this allows
updating the libstdc++-v3/doc/html/ contents with a single command.

Committed to trunk.
commit f1aa075fb7778fcd6e0bad1df0e88251dab5d641
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Oct 8 11:47:01 2019 +0100

    Add makefile target to update HTML files in source tree
    
    Also remove the creation of the html/ext sub-directory, which has been
    unused since revision r245258.
    
            * doc/Makefile.am (doc-html-docbook-regenerate): New target.
            (${docbook_outdir}/html): Do not create unused 'html/ext' directory.
            * doc/Makefile.in: Regenerate.
            * doc/xml/manual/documentation_hacking.xml: Document new target.
            * doc/html/*: Regenerate.

Patch
diff mbox series

diff --git a/libstdc++-v3/doc/Makefile.am b/libstdc++-v3/doc/Makefile.am
index b9aca381b74..9b385edecff 100644
--- a/libstdc++-v3/doc/Makefile.am
+++ b/libstdc++-v3/doc/Makefile.am
@@ -476,7 +476,6 @@  ${docbook_outdir}/fo:
 
 ${docbook_outdir}/html:
 	mkdir -p ${docbook_outdir}/html
-	mkdir -p ${docbook_outdir}/html/ext
 	mkdir -p ${docbook_outdir}/html/images
 	mkdir -p ${docbook_outdir}/html/manual
 
@@ -545,6 +544,12 @@  stamp-html-docbook: $(xml_sources) ${docbook_outdir}/html
 
 doc-html-docbook: stamp-html-docbook-data
 
+# Generate the HTML pages and copy them back to the source tree.
+doc-html-docbook-regenerate: doc-html-docbook
+	$(INSTALL_DATA) ${docbook_outdir}/html/*.html ${top_srcdir}/doc/html
+	$(INSTALL_DATA) ${docbook_outdir}/html/images/* ${top_srcdir}/doc/html/images
+	$(INSTALL_DATA) ${docbook_outdir}/html/manual/*.html ${top_srcdir}/doc/html/manual
+
 # HTML, all one page
 # NB: Have to generate customization XSL for UTF-8 output.
 manual_html = ${docbook_outdir}/html/libstdc++-manual-single.html
diff --git a/libstdc++-v3/doc/xml/manual/documentation_hacking.xml b/libstdc++-v3/doc/xml/manual/documentation_hacking.xml
index e0990a28516..7db776794c2 100644
--- a/libstdc++-v3/doc/xml/manual/documentation_hacking.xml
+++ b/libstdc++-v3/doc/xml/manual/documentation_hacking.xml
@@ -807,13 +807,20 @@ 
       </para>
 
       <para>
-	Generated files are output into separate sub directores of
+	Generated files are output into separate sub-directores of
 	<filename class="directory">doc/docbook/</filename> in the
 	build directory, based on the output format. For instance, the
 	HTML docs will be in <filename
 	class="directory">doc/docbook/html</filename>.
       </para>
 
+      <para>
+	The <screen>doc-html-docbook-regenerate</screen> target will generate
+	the HTML files and copy them back to the libstdc++ source tree.
+	This can be used to update the HTML files that are checked in to
+	version control.
+      </para>
+
       <para>
 	If the Docbook stylesheets are installed in a custom location,
 	one can use the variable <literal>XSL_STYLE_DIR</literal> to