1## Makefile for the gettext-tools/doc subdirectory of GNU gettext 2## Copyright (C) 1995-1997, 2001-2006 Free Software Foundation, Inc. 3## 4## This program is free software; you can redistribute it and/or modify 5## it under the terms of the GNU General Public License as published by 6## the Free Software Foundation; either version 2, or (at your option) 7## any later version. 8## 9## This program is distributed in the hope that it will be useful, 10## but WITHOUT ANY WARRANTY; without even the implied warranty of 11## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12## GNU General Public License for more details. 13## 14## You should have received a copy of the GNU General Public License 15## along with this program; if not, write to the Free Software Foundation, 16## Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 18## Process this file with automake to produce Makefile.in. 19 20AUTOMAKE_OPTIONS = 1.2 gnits 21EXTRA_DIST = 22MOSTLYCLEANFILES = 23TEXINCLUDES = -I $(top_srcdir)/../gettext-runtime/doc 24 25SED = sed 26RM = rm -f 27 28MAKEINFO = env LANG= LC_MESSAGES= LC_ALL= LANGUAGE= @MAKEINFO@ 29MAKEINFOFLAGS = $(TEXINCLUDES) --no-split 30 31info_TEXINFOS = gettext.texi 32# List of texinfo sources @included by gettext.texi, excluding version.texi. 33gettext_TEXINFOS = \ 34 xgettext.texi msginit.texi msgmerge.texi msgcat.texi msgconv.texi \ 35 msggrep.texi msgfilter.texi msguniq.texi msgcomm.texi msgcmp.texi \ 36 msgattrib.texi msgen.texi msgexec.texi msgfmt.texi msgunfmt.texi \ 37 gettextize.texi autopoint.texi iso-639.texi iso-639-2.texi iso-3166.texi \ 38 gpl.texi lgpl.texi fdl.texi \ 39 $(top_srcdir)/../gettext-runtime/doc/rt-gettext.texi \ 40 $(top_srcdir)/../gettext-runtime/doc/rt-ngettext.texi \ 41 $(top_srcdir)/../gettext-runtime/doc/rt-envsubst.texi 42 43# The FAQ. To be edited with Mozilla. 44# The tutorial. To be edited by hand. 45doc_DATA = FAQ.html tutorial.html 46EXTRA_DIST += $(doc_DATA) 47 48EXTRA_DIST += \ 49 iso-639.sed iso-639-2.sed iso-3166.sed \ 50 ISO_639 ISO_639-2 ISO_3166 ISO_3166_de \ 51 texi2html \ 52 ChangeLog.0 53 54iso-639.texi: ISO_639 iso-639.sed 55 $(SED) -f $(srcdir)/iso-639.sed $(srcdir)/ISO_639 > iso-639.tmp 56 rm -f $(srcdir)/iso-639.texi 57 mv iso-639.tmp $(srcdir)/iso-639.texi 58 59iso-639-2.texi: ISO_639-2 iso-639-2.sed 60 $(SED) -f $(srcdir)/iso-639-2.sed $(srcdir)/ISO_639-2 > iso-639-2.tmp 61 rm -f $(srcdir)/iso-639-2.texi 62 mv iso-639-2.tmp $(srcdir)/iso-639-2.texi 63 64iso-3166.texi: ISO_3166 iso-3166.sed 65 $(SED) -f $(srcdir)/iso-3166.sed $(srcdir)/ISO_3166 > iso-3166.tmp 66 rm -f $(srcdir)/iso-3166.texi 67 mv iso-3166.tmp $(srcdir)/iso-3166.texi 68 69# The dependencies of stamp-vti generated by automake are incomplete. 70# So we have to duplicate the entire rule which would otherwise be generated 71# by automake. 72$(srcdir)/stamp-vti: $(info_TEXINFOS) $(gettext_TEXINFOS) $(top_srcdir)/../version.sh 73 (dir=.; test -f ./gettext.texi || dir=$(srcdir); \ 74 set `$(SHELL) $(top_srcdir)/../build-aux/mdate-sh $$dir/gettext.texi`; \ 75 echo "@set UPDATED $$1 $$2 $$3"; \ 76 echo "@set UPDATED-MONTH $$2 $$3"; \ 77 echo "@set EDITION $(VERSION)"; \ 78 echo "@set VERSION $(VERSION)") > vti.tmp 79 cmp -s vti.tmp version.texi \ 80 || (echo "Updating version.texi"; \ 81 cp vti.tmp version.texi) 82 rm -f vti.tmp 83 cp version.texi $@ 84 85# We distribute only the split HTML documentation. 86# The user can generate the others, via 87# make gettext.ps 88# make gettext.pdf 89# make gettext.html 90 91all-local: html-local 92install-data-local: install-html 93installdirs-local: installdirs-html 94uninstall-local: uninstall-html 95# Hidden from automake, but really activated. Works around an automake-1.5 bug. 96#distdir: dist-html 97 98html-local: html-split 99# Override of automake's definition. The HTML files we want to distribute are 100# not the ones that automake knows about, and we cannot define HTMLS to a value 101# containing wildcards. 102install-html: install-html-split 103 @: 104uninstall-html: uninstall-html-split 105dist-html: dist-html-split 106 107CLEANFILES = gettext.pdf gettext.html 108# gettext.dvi and gettext.ps are already known to automake. 109MAINTAINERCLEANFILES = gettext_*.html 110 111 112# Documentation in DVI format. 113 114# Override of automake's definition: 115#TEXI2DVI = texi2dvi 116TEXI2DVI = texi2dvi $(TEXINCLUDES) 117 118# The install-dvi target is already defined by automake. 119 120installdirs-dvi: 121 $(mkdir_p) $(DESTDIR)$(dvidir) 122 123uninstall-dvi: 124 $(RM) $(DESTDIR)$(dvidir)/gettext.dvi 125 126# Temporary index files. automake removes only the predefined ones by itself. 127MOSTLYCLEANFILES += \ 128 gettext.am gettext.ams \ 129 gettext.cp gettext.cps \ 130 gettext.ef gettext.efs \ 131 gettext.em gettext.ems \ 132 gettext.ev gettext.evs \ 133 gettext.fn gettext.fns \ 134 gettext.kw gettext.kws \ 135 gettext.op gettext.ops \ 136 gettext.pg gettext.pgs \ 137 gettext.vr gettext.vrs 138 139 140# Documentation in Postscript format. 141 142# Override of automake's definition: 143#DVIPS = @DVIPS@ 144DVIPS = @DVIPS@ -D600 145 146gettext.ps: gettext.dvi 147 $(DVIPS) -o $@ `if test -f gettext.dvi; then echo gettext.dvi; else echo $(srcdir)/gettext.dvi; fi` 148 149# The install-ps target is already defined by automake. 150 151installdirs-ps: 152 $(mkdir_p) $(DESTDIR)$(psdir) 153 154uninstall-ps: 155 $(RM) $(DESTDIR)$(psdir)/gettext.ps 156 157 158# Documentation in Portable Document Format. 159 160# Override of automake's definition: 161#TEXI2PDF = @TEXI2PDF@ 162TEXI2PDF = @TEXI2PDF@ $(TEXINCLUDES) 163SUFFIXES = .pdf 164 165# The install-pdf target is already defined by automake. 166 167installdirs-pdf: 168 $(mkdir_p) $(DESTDIR)$(pdfdir) 169 170uninstall-pdf: 171 $(RM) $(DESTDIR)$(pdfdir)/gettext.pdf 172 173 174# Documentation in HTML format. 175 176TEXI2HTML = @PERL@ $(srcdir)/texi2html 177 178html-monolithic: gettext.html 179html-split: gettext_toc.html 180 181# Override of automake's definition. 182# We want to use texi2html, not makeinfo --html. 183gettext.html: gettext.texi version.texi $(gettext_TEXINFOS) 184 $(TEXI2HTML) $(TEXINCLUDES) -number -monolithic `if test -f gettext.texi; then echo gettext.texi; else echo $(srcdir)/gettext.texi; fi` 185 186gettext_toc.html: gettext.texi version.texi $(gettext_TEXINFOS) 187 case "@PERL@" in \ 188 *"/missing perl") \ 189 $(TEXI2HTML) $(TEXINCLUDES) -number -split_chapter `if test -f gettext.texi; then echo gettext.texi; else echo $(srcdir)/gettext.texi; fi` || exit 0 ;; \ 190 *) $(RM) gettext_*.html ; \ 191 $(TEXI2HTML) $(TEXINCLUDES) -number -split_chapter `if test -f gettext.texi; then echo gettext.texi; else echo $(srcdir)/gettext.texi; fi` ;; \ 192 esac 193 194install-html-monolithic: gettext.html 195 $(mkdir_p) $(DESTDIR)$(htmldir) 196 $(INSTALL_DATA) `if test -f gettext.html; then echo .; else echo $(srcdir); fi`/gettext.html $(DESTDIR)$(htmldir)/gettext.html 197 198install-html-split: gettext_toc.html 199 $(mkdir_p) $(DESTDIR)$(htmldir) 200 for file in `if test -f gettext_toc.html; then echo .; else echo $(srcdir); fi`/gettext_*.html; do \ 201 $(INSTALL_DATA) $$file $(DESTDIR)$(htmldir)/`basename $$file`; \ 202 done 203 204installdirs-html: 205 $(mkdir_p) $(DESTDIR)$(htmldir) 206 207uninstall-html-monolithic: 208 $(RM) $(DESTDIR)$(htmldir)/gettext.html 209 210uninstall-html-split: 211 $(RM) $(DESTDIR)$(htmldir)/gettext_*.html 212 213dist-html-monolithic: 214 $(mkdir_p) $(distdir)/ 215 file=gettext.html; \ 216 if test -f $$file; then d=.; else d=$(srcdir); fi; \ 217 cp -p $$d/$$file $(distdir)/$$file || exit 1 218 219# We would like to put gettext_*.html into EXTRA_DIST, but it doesn't work. 220dist-html-split: 221 $(mkdir_p) $(distdir)/ 222 file=gettext_toc.html; \ 223 if test -f $$file; then d=.; else d=$(srcdir); fi; \ 224 for file in `cd $$d && echo gettext_*.html`; do \ 225 cp -p $$d/$$file $(distdir)/$$file || exit 1; \ 226 done 227