* Makefile.in: Add html support.
* java/Make-lang.in: Likewise.
* fortran/Make-lang.in: Likewise.
* treelang/Make-lang.in: Likewise.
* doc/install.texi: Likewise.
* doc/makefile.texi: Likewise.
* doc/sourcebuild.texi: Likewise.
From-SVN: r90577
+2004-11-12 Mike Stump <mrs@apple.com>
+
+ * Makefile.in: Add html support.
+ * java/Make-lang.in: Likewise.
+ * fortran/Make-lang.in: Likewise.
+ * treelang/Make-lang.in: Likewise.
+ * doc/install.texi: Likewise.
+ * doc/makefile.texi: Likewise.
+ * doc/sourcebuild.texi: Likewise.
+
2004-11-13 Kazu Hirata <kazu@cs.umass.edu>
* tree-ssa-loop-manip.c: Fix a comment typo.
MAKEINFO = @MAKEINFO@
MAKEINFOFLAGS = --no-split
TEXI2DVI = texi2dvi
+TEXI2HTML = $(MAKEINFO) --html
TEXI2POD = perl $(srcdir)/../contrib/texi2pod.pl
POD2MAN = pod2man --center="GNU" --release="gcc-$(version)"
# Some versions of `touch' (such as the version on Solaris 2.8)
# Dir for temp files.
tmpdir = /tmp
+# Directory in which to put HTML
+htmldir = $(objdir)/HTML/gcc-$(version)
+
# Whether we were configured with NLS.
USE_NLS = @USE_NLS@
doc/gccint.dvi: $(TEXI_GCCINT_FILES)
doc/cppinternals.dvi: $(TEXI_CPPINT_FILES)
+$(htmldir)/cpp/index.html: $(TEXI_CPP_FILES)
+$(htmldir)/gcc/index.html: $(TEXI_GCC_FILES)
+$(htmldir)/gccint/index.html: $(TEXI_GCCINT_FILES)
+$(htmldir)/cppinternals/index.html: $(TEXI_CPPINT_FILES)
+
dvi:: doc/gcc.dvi doc/gccint.dvi doc/gccinstall.dvi doc/cpp.dvi \
doc/cppinternals.dvi
doc/gccinstall.dvi: $(TEXI_GCCINSTALL_FILES)
$(TEXI2DVI) -I $(abs_docdir) -I $(abs_docdir)/include -o $@ $<
+html:: $(htmldir)/cpp/index.html $(htmldir)/gcc/index.html \
+ $(htmldir)/gccinstall/index.html $(htmldir)/gccint/index.html \
+ $(htmldir)/cppinternals/index.html
+
+$(htmldir)/%/index.html: %.texi
+ $(mkinstalldirs) $(@D)
+ rm -f $(@D)/*
+ $(TEXI2HTML) -I $(abs_docdir) -I $(abs_docdir)/include -o $(@D) $<
+
+# Duplicate entry to handle renaming of gccinstall
+$(htmldir)/gccinstall/index.html: $(TEXI_GCCINSTALL_FILES)
+ $(mkinstalldirs) $(@D)
+ echo rm -f $(@D)/*
+ $(TEXI2HTML) -I $(abs_docdir) -I $(abs_docdir)/include -o $(@D) $<
+
MANFILES = doc/gcov.1 doc/cpp.1 doc/gcc.1 doc/gfdl.7 doc/gpl.7 doc/fsf-funding.7
generated-manpages: man
Free Software Foundation}, though such manuals may not be for the most
recent version of GCC@.
+If you would like to generate online HTML documentation, do @samp{cd
+@var{objdir}; make html} and HTML will be generated for the manuals in
+@file{@var{objdir}/HTML}.
+
@html
<hr />
<p>
@item dvi
Produce DVI-formatted documentation.
+@item html
+Produce HTML-formatted documentation.
+
@item man
Generate man pages.
The main GCC documentation is in the form of manuals in Texinfo
format. These are installed in Info format, and DVI versions may be
-generated by @samp{make dvi}. In addition, some man pages are
+generated by @samp{make dvi} and HTML versions may be generated by
+@command{make html}. In addition, some man pages are
generated from the Texinfo manuals, there are some other text files
with miscellaneous documentation, and runtime libraries have their own
documentation outside the @file{gcc} directory. FIXME: document the
@end table
DVI formatted manuals are generated by @samp{make dvi}, which uses
-@command{texi2dvi} (via the Makefile macro @code{$(TEXI2DVI)}). Info
+@command{texi2dvi} (via the Makefile macro @code{$(TEXI2DVI)}). HTML
+formatted manuals are generated by @command{make html}. Info
manuals are generated by @samp{make info} (which is run as part of
a bootstrap); this generates the manuals in the source directory,
using @command{makeinfo} via the Makefile macro @code{$(MAKEINFO)},
This should be done using @code{$(TEXI2DVI)}, with appropriate
@option{-I} arguments pointing to directories of included files.
This hook is a double-colon hook.
+@item html
+Build HTML documentation for the front end, in the source directory.
@item man
Build generated man pages for the front end from Texinfo manuals
(@pxref{Man Page Generation}), in the build directory. This target
# Each language makefile fragment must provide the following targets:
#
# foo.all.build, foo.all.cross, foo.start.encap, foo.rest.encap,
-# foo.info, foo.dvi,
+# foo.info
# foo.install-normal, foo.install-common, foo.install-info, foo.install-man,
# foo.uninstall, foo.distdir,
# foo.mostlyclean, foo.clean, foo.distclean, foo.extraclean,
f95.info: doc/gfortran.info
dvi:: doc/gfortran.dvi
+html:: $(htmldir)/gfortran/index.html
F95_MANFILES = doc/gfortran.1
doc/gfortran.info: $(GFORTRAN_TEXI)
if [ x$(BUILD_INFO) = xinfo ]; then \
rm -f doc/gfortran.info-*; \
- $(MAKEINFO) -I$(srcdir)/doc/include -I$(srcdir)/fortran \
- -o doc/gfortran.info $(srcdir)/fortran/gfortran.texi; \
+ $(MAKEINFO) -I $(srcdir)/doc/include -I $(srcdir)/fortran \
+ -o $@ $<; \
else true; fi
doc/gfortran.dvi: $(GFORTRAN_TEXI)
$(TEXI2DVI) -I $(srcdir)/fortran -I $(abs_docdir)/include -o $@ $<
+$(htmldir)/gfortran/index.html: $(GFORTRAN_TEXI)
+ $(mkinstalldirs) $(@D)
+ rm -f $(@D)/*
+ $(TEXI2HTML) -I $(docdir)/include -I $(srcdir)/fortran -o $(@D) $<
+
.INTERMEDIATE: gfortran.pod
gfortran.pod: $(GFORTRAN_TEXI)
-cp -p $^ $(srcdir)/doc
dvi:: doc/gcj.dvi
+html:: $(htmldir)/java/index.html
JAVA_MANFILES = doc/gcj.1 doc/gcjh.1 doc/jv-scan.1 doc/jcf-dump.1 doc/gij.1 \
doc/jv-convert.1 doc/grmic.1 doc/grmiregistry.1
-DINLINER_FOR_JAVA=1 \
$(srcdir)/tree-inline.c -o $@
+TEXI_JAVA_FILES = java/gcj.texi $(docdir)/include/fdl.texi $(docdir)/include/gpl.texi \
+ $(docdir)/include/gcc-common.texi
+
# Documentation
-doc/gcj.info: java/gcj.texi $(docdir)/include/fdl.texi \
- $(docdir)/include/gpl.texi $(docdir)/include/gcc-common.texi
+doc/gcj.info: $(TEXI_JAVA_FILES)
if test "x$(BUILD_INFO)" = xinfo; then \
rm -f doc/gcj.info*; \
$(MAKEINFO) $(MAKEINFOFLAGS) -I $(docdir)/include -o $@ $<; \
else true; fi
-doc/gcj.dvi: java/gcj.texi $(docdir)/include/fdl.texi \
- $(docdir)/include/gpl.texi $(docdir)/include/gcc-common.texi
+doc/gcj.dvi: $(TEXI_JAVA_FILES)
$(TEXI2DVI) -I $(abs_docdir)/include -o $@ $<
+$(htmldir)/java/index.html: $(TEXI_JAVA_FILES)
+ $(mkinstalldirs) $(@D)
+ rm -f $(@D)/*
+ $(TEXI2HTML) -I $(docdir)/include -I $(srcdir)/java -o $(@D) $<
+
.INTERMEDIATE: gcj.pod gcjh.pod jv-scan.pod jcf-dump.pod gij.pod \
jv-convert.pod grmic.pod grmiregistry.pod
dvi:: doc/treelang.dvi
-doc/treelang.info: treelang/treelang.texi $(docdir)/include/gcc-common.texi \
- $(docdir)/include/gpl.texi $(docdir)/include/fdl.texi \
+TEXI_TREELANG_FILES = treelang/treelang.texi \
+ $(docdir)/include/gcc-common.texi \
+ $(docdir)/include/gpl.texi \
+ $(docdir)/include/fdl.texi \
$(docdir)/include/funding.texi
+
+doc/treelang.info: $(TEXI_TREELANG_FILES)
$(MAKEINFO) $(MAKEINFOFLAGS) -I$(docdir)/include -o $@ $<
-doc/treelang.dvi: treelang/treelang.texi $(docdir)/include/gcc-common.texi \
- $(docdir)/include/gpl.texi $(docdir)/include/fdl.texi \
- $(docdir)/include/funding.texi
+doc/treelang.dvi: $(TEXI_TREELANG_FILES)
$(TEXI2DVI) -I $(abs_docdir)/include -o $@ $<
+html:: $(htmldir)/treelang/index.html
+
+$(htmldir)/treelang/index.html: $(TEXI_TREELANG_FILES)
+ $(mkinstalldirs) $(@D)
+ rm -f $(@D)/*
+ $(TEXI2HTML) -I$(docdir)/include -I$(srcdir)/treelang \
+ --verbose --number-sections \
+ -o $(@D) $<
+
#\f
# Install hooks:
#\f
-.PHONY: treelang.html
-
-treelang.html:
- cd $(srcdir)/treelang && texi2html -I ../doc/include -verbose -menu -split_chapter -number treelang.texi
-# mv treelang*.html $(srcdir)/treelang
-
config.status: treelang/config-lang.in