## Makefile for the doc subdirectory of the GNU C++ Standard library.
##
-## Copyright (C) 2008-2020 Free Software Foundation, Inc.
+## Copyright (C) 2008-2024 Free Software Foundation, Inc.
##
## This file is part of the libstdc++ version 3 distribution.
## Process this file with automake to produce Makefile.in.
# Documentation Overview
#
+# See ./xml/manual/documentation_hacking.xml for full details.
+#
# There are two main input materials for libstdc++ documentation.
# The first is the doxygen markup in libstdc++ sources, which is a
# reference to the API. And the second is the manual, via docbook markup in
mkdir -p ${doxygen_outdir}/man
stamp-xml-doxygen: ${doxygen_outdir}/xml
- -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
+ -srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
builddir=`cd ..; ${PWD_COMMAND}`; \
${SHELL} ${doxygen_script} \
- --host_alias=${host_alias} --mode=xml $${srcdir} $${builddir} NO)
+ --host_alias=${host_alias} --mode=xml \
+ "$${srcdir}" "$${builddir}" NO
$(STAMP) stamp-xml-doxygen
stamp-xml-single-doxygen: stamp-xml-doxygen
$(STAMP) stamp-xml-single-doxygen
stamp-html-doxygen: ${doxygen_outdir}/html
- -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
+ -srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
builddir=`cd ..; ${PWD_COMMAND}`; \
${SHELL} ${doxygen_script} \
- --host_alias=${host_alias} --mode=html $${srcdir} $${builddir} YES)
+ --host_alias=${host_alias} --mode=html \
+ "$${srcdir}" "$${builddir}" YES
$(STAMP) stamp-html-doxygen
stamp-latex-doxygen: ${doxygen_outdir}/latex
- -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
+ -srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
builddir=`cd ..; ${PWD_COMMAND}`; \
${SHELL} ${doxygen_script} \
- --host_alias=${host_alias} --mode=latex $${srcdir} $${builddir} NO)
+ --host_alias=${host_alias} --mode=latex --latex_cmd=$(LATEX_CMD) \
+ "$${srcdir}" "$${builddir}" NO
$(STAMP) stamp-latex-doxygen
# Chance of loooooonnggg creation time on this rule. Iff this fails,
# look at refman.log and see if TeX's memory is exhausted. Symptoms
# include asking a wizard to enlarge capacity. If this is the case,
# find texmf.cnf and add a zero for pool_size, string_vacancies,
-# max_strings, and pool_free values.
+# max_strings, and pool_free values. A much simpler workaround is to
+# install lualatex and set LATEX_CMD=lualatex when running make.
# Errors like "File `foo.sty' not found" mean a TeX package is missing.
stamp-pdf-doxygen: stamp-latex-doxygen ${doxygen_outdir}/pdf
- -(cd ${doxygen_outdir}/latex && $(MAKE) -i pdf;)
- echo "Generating doxygen pdf file...";
- if [ -f ${doxygen_pdf} ]; then \
+ @echo "Generating doxygen pdf file...";
+ -$(MAKE) -C ${doxygen_outdir}/latex -i pdf
+ @if [ -f ${doxygen_pdf} ]; then \
mv ${doxygen_pdf} ${api_pdf} ; \
echo ":: PDF file is ${api_pdf}"; \
else \
echo "... error"; \
grep -F 'LaTeX Error' ${doxygen_outdir}/latex/refman.log; \
+ grep -F 'TeX capacity exceeded, sorry' ${doxygen_outdir}/latex/refman.log; \
exit 12; \
fi
$(STAMP) stamp-pdf-doxygen
stamp-man-doxygen: ${doxygen_outdir}/man
- -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
+ -srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
builddir=`cd ..; ${PWD_COMMAND}`; \
${SHELL} ${doxygen_script} \
- --host_alias=${host_alias} --mode=man $${srcdir} $${builddir} YES)
+ --host_alias=${host_alias} --mode=man \
+ "$${srcdir}" "$${builddir}" YES
$(STAMP) stamp-man-doxygen
doc-xml-doxygen: stamp-xml-doxygen
${xml_dir}/manual/status_cxx1998.xml \
${xml_dir}/manual/status_cxx2011.xml \
${xml_dir}/manual/status_cxx2014.xml \
+ ${xml_dir}/manual/status_cxx2017.xml \
+ ${xml_dir}/manual/status_cxx2020.xml \
${xml_dir}/manual/status_cxxtr1.xml \
${xml_dir}/manual/status_cxxtr24733.xml \
${xml_dir}/manual/strings.xml \
doc-pdf-docbook: stamp-pdf-docbook
# TEXINFO, via docbook2X
-# NB: Both experimental and tempermental
+# NB: Both experimental and temperamental
manual_texi = ${docbook_outdir}/texinfo/libstdc++-manual.texi
manual_info = ${docbook_outdir}/texinfo/libstdc++-manual.info
DB2TEXI_FLAGS = \
stamp-info-docbook: stamp-texinfo-docbook
@echo "Generating info files..."
- $(MAKEINFO) $(MAKEINFOFLAGS) ${manual_texi}
+ $(MAKEINFO) $(MAKEINFOFLAGS) ${manual_texi} -o ${manual_info}
$(STAMP) stamp-info-docbook
doc-texinfo-docbook: stamp-texinfo-docbook