summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2009-04-09 12:17:25 +0200
committerBruno Haible <bruno@clisp.org>2009-04-09 12:17:25 +0200
commit2f5ba37e26608fb39f701c2c674305798ef26125 (patch)
tree8cdf88aba13f34a86a09f3a9ee5f24d5eef1efd9 /doc
parent97e59cd448f5420f94050aa927ba0a3e0e010735 (diff)
downloadlibunistring-2f5ba37e26608fb39f701c2c674305798ef26125.tar.gz
Build and install the documentation.
Diffstat (limited to 'doc')
-rw-r--r--doc/Makefile.am186
-rw-r--r--doc/libunistring.texi7
2 files changed, 193 insertions, 0 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644
index 0000000..bf1549f
--- /dev/null
+++ b/doc/Makefile.am
@@ -0,0 +1,186 @@
+## Makefile for the doc subdirectory of GNU libunistring.
+## Copyright (C) 2009 Free Software Foundation, Inc.
+##
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+## Process this file with automake to produce Makefile.in.
+
+AUTOMAKE_OPTIONS = 1.5 gnits
+EXTRA_DIST =
+MOSTLYCLEANFILES =
+
+# List of -I options referring to directories that contain texinfo sources
+# used by this directory.
+# Should contain at least one -I option, to work around a bug in texi2dvi 1.13,
+# see <http://lists.gnu.org/archive/html/bug-automake/2009-04/msg00029.html>.
+TEXINCLUDES = -I .
+
+MAKEINFO = env LANG= LC_MESSAGES= LC_ALL= LANGUAGE= @MAKEINFO@
+MAKEINFOFLAGS = $(TEXINCLUDES) --no-split
+
+info_TEXINFOS = libunistring.texi
+# List of texinfo sources @included by libunistring.texi, excluding version.texi.
+libunistring_TEXINFOS = \
+ unitypes.texi unistr.texi uniconv.texi unistdio.texi uniname.texi \
+ unictype.texi uniwidth.texi uniwbrk.texi unilbrk.texi uninorm.texi \
+ unicase.texi uniregex.texi \
+ gpl.texi lgpl.texi fdl.texi
+
+# The dependencies of stamp-vti generated by automake are incomplete.
+# So we have to duplicate the entire rule which would otherwise be generated
+# by automake.
+$(srcdir)/stamp-vti: $(info_TEXINFOS) $(libunistring_TEXINFOS) $(top_srcdir)/version.sh
+ (dir=.; test -f ./libunistring.texi || dir=$(srcdir); \
+ set `$(SHELL) $(top_srcdir)/build-aux/mdate-sh $$dir/libunistring.texi`; \
+ echo "@set UPDATED $$1 $$2 $$3"; \
+ echo "@set UPDATED-MONTH $$2 $$3"; \
+ echo "@set EDITION $(VERSION)"; \
+ echo "@set VERSION $(VERSION)") > vti.tmp
+ cmp -s vti.tmp $(srcdir)/version.texi \
+ || (echo "Updating $(srcdir)/version.texi"; \
+ cp vti.tmp $(srcdir)/version.texi)
+ rm -f vti.tmp
+ cp $(srcdir)/version.texi $@
+
+# We distribute only the split HTML documentation.
+# The user can generate the others, via
+# make libunistring.ps
+# make libunistring.pdf
+# make libunistring.html
+
+all-local: html-local
+install-data-local: install-html
+installdirs-local: installdirs-html
+uninstall-local: uninstall-html
+# Hidden from automake, but really activated. Works around an automake-1.5 bug.
+#distdir: dist-html
+
+html-local: html-split
+# Override of automake's definition. The HTML files we want to distribute are
+# not the ones that automake knows about, and we cannot define HTMLS to a value
+# containing wildcards.
+install-html: install-html-split
+ @:
+uninstall-html: uninstall-html-split
+dist-html: dist-html-split
+
+# CLEANFILES: libunistring.{dvi,ps,pdf,html} are already known to automake.
+MAINTAINERCLEANFILES = libunistring_*.html
+
+
+# Documentation in DVI format.
+
+# Override of automake's definition:
+#TEXI2DVI = @TEXI2DVI@
+TEXI2DVI = @TEXI2DVI@ $(TEXINCLUDES)
+
+# The install-dvi target is already defined by automake.
+
+installdirs-dvi:
+ $(mkdir_p) $(DESTDIR)$(dvidir)
+
+uninstall-dvi:
+ $(RM) $(DESTDIR)$(dvidir)/libunistring.dvi
+
+
+# Documentation in Postscript format.
+
+# Override of automake's definition:
+#DVIPS = @DVIPS@
+DVIPS = @DVIPS@ -D600
+
+libunistring.ps: libunistring.dvi
+ $(DVIPS) -o $@ `if test -f libunistring.dvi; then echo libunistring.dvi; else echo $(srcdir)/libunistring.dvi; fi`
+
+# The install-ps target is already defined by automake.
+
+installdirs-ps:
+ $(mkdir_p) $(DESTDIR)$(psdir)
+
+uninstall-ps:
+ $(RM) $(DESTDIR)$(psdir)/libunistring.ps
+
+
+# Documentation in Portable Document Format.
+
+# Override of automake's definition:
+#TEXI2PDF = @TEXI2DVI@ --pdf
+TEXI2PDF = @TEXI2DVI@ --pdf $(TEXINCLUDES)
+
+# The install-pdf target is already defined by automake.
+
+installdirs-pdf:
+ $(mkdir_p) $(DESTDIR)$(pdfdir)
+
+uninstall-pdf:
+ $(RM) $(DESTDIR)$(pdfdir)/libunistring.pdf
+
+
+# Documentation in HTML format.
+
+TEXI2HTML = @PERL@ $(top_srcdir)/build-aux/texi2html
+
+html-monolithic: libunistring.html
+html-split: libunistring_toc.html
+
+# Override of automake's definition.
+# We want to use texi2html, not makeinfo --html.
+libunistring.html: libunistring.texi version.texi $(libunistring_TEXINFOS)
+ $(TEXI2HTML) $(TEXINCLUDES) -no-sec-nav -no-menu -toc-links -number -monolithic `if test -f libunistring.texi; then echo libunistring.texi; else echo $(srcdir)/libunistring.texi; fi`
+
+libunistring_toc.html: libunistring.texi version.texi $(libunistring_TEXINFOS)
+ case "@PERL@" in \
+ *"/missing perl") \
+ $(TEXI2HTML) $(TEXINCLUDES) -no-sec-nav -no-menu -toc-links -number -split_chapter `if test -f libunistring.texi; then echo libunistring.texi; else echo $(srcdir)/libunistring.texi; fi` || exit 0 ;; \
+ *) $(RM) libunistring_*.html ; \
+ $(TEXI2HTML) $(TEXINCLUDES) -no-sec-nav -no-menu -toc-links -number -split_chapter `if test -f libunistring.texi; then echo libunistring.texi; else echo $(srcdir)/libunistring.texi; fi` ;; \
+ esac \
+ && { mv libunistring/libunistring.html libunistring_toc.html; \
+ mv libunistring/*.html .; \
+ rmdir libunistring; \
+ }
+
+install-html-monolithic: libunistring.html
+ $(mkdir_p) $(DESTDIR)$(htmldir)
+ $(INSTALL_DATA) `if test -f libunistring.html; then echo .; else echo $(srcdir); fi`/libunistring.html $(DESTDIR)$(htmldir)/libunistring.html
+
+install-html-split: libunistring_toc.html
+ $(mkdir_p) $(DESTDIR)$(htmldir)
+ for file in `if test -f libunistring_toc.html; then echo .; else echo $(srcdir); fi`/libunistring_*.html; do \
+ $(INSTALL_DATA) $$file $(DESTDIR)$(htmldir)/`basename $$file`; \
+ done
+
+installdirs-html:
+ $(mkdir_p) $(DESTDIR)$(htmldir)
+
+uninstall-html-monolithic:
+ $(RM) $(DESTDIR)$(htmldir)/libunistring.html
+
+uninstall-html-split:
+ $(RM) $(DESTDIR)$(htmldir)/libunistring_*.html
+
+dist-html-monolithic:
+ $(mkdir_p) $(distdir)/
+ file=libunistring.html; \
+ if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ cp -p $$d/$$file $(distdir)/$$file || exit 1
+
+# We would like to put libunistring_*.html into EXTRA_DIST, but it doesn't work.
+dist-html-split:
+ $(mkdir_p) $(distdir)/
+ file=libunistring_toc.html; \
+ if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ for file in `cd $$d && echo libunistring_*.html`; do \
+ cp -p $$d/$$file $(distdir)/$$file || exit 1; \
+ done
diff --git a/doc/libunistring.texi b/doc/libunistring.texi
index d0eff27..e40c70e 100644
--- a/doc/libunistring.texi
+++ b/doc/libunistring.texi
@@ -1,6 +1,7 @@
\input texinfo @c -*-texinfo-*-
@comment %**start of header
@setfilename libunistring.info
+@documentencoding UTF-8
@settitle GNU libunistring
@finalout
@c Indices:
@@ -16,6 +17,12 @@
@ifclear texi2html
@firstparagraphindent insert
@end ifclear
+@c texi2html-1.76 does not support @arrow{}.
+@ifset texi2html
+@macro arrow{}
+→
+@end macro
+@end ifset
@comment %**end of header
@include version.texi