1## Makefile for the gettext-tools/doc subdirectory of GNU gettext 2## Copyright (C) 1995-1997, 2001-2007, 2009, 2013-2015, 2018-2020 Free 3## Software Foundation, Inc. 4## 5## This program is free software: you can redistribute it and/or modify 6## it under the terms of the GNU General Public License as published by 7## the Free Software Foundation; either version 3 of the License, or 8## (at your option) any later version. 9## 10## This program is distributed in the hope that it will be useful, 11## but WITHOUT ANY WARRANTY; without even the implied warranty of 12## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13## GNU General Public License for more details. 14## 15## You should have received a copy of the GNU General Public License 16## along with this program. If not, see <https://www.gnu.org/licenses/>. 17 18## Process this file with automake to produce Makefile.in. 19 20AUTOMAKE_OPTIONS = 1.2 gnits 21 22# This directory does not support parallel make. 23# So, turn off parallel execution (at least in GNU make >= 4.0). 24GNUMAKEFLAGS = -j1 25 26EXTRA_DIST = 27MOSTLYCLEANFILES = 28 29# List of -I options referring to directories that contain texinfo 30# sources used by this directory. 31TEXINCLUDES = -I $(top_srcdir)/../gettext-runtime/doc 32 33SED = sed 34RM = rm -f 35 36MAKEINFO = env LANG= LC_MESSAGES= LC_ALL= LANGUAGE= @MAKEINFO@ 37MAKEINFOFLAGS = $(TEXINCLUDES) --no-split 38 39info_TEXINFOS = gettext.texi 40# List of texinfo sources @included by gettext.texi, excluding version.texi. 41gettext_TEXINFOS = \ 42 xgettext.texi \ 43 msginit.texi \ 44 msgmerge.texi \ 45 msgcat.texi \ 46 msgconv.texi \ 47 msggrep.texi \ 48 msgfilter.texi \ 49 msguniq.texi \ 50 msgcomm.texi \ 51 msgcmp.texi \ 52 msgattrib.texi \ 53 msgen.texi \ 54 msgexec.texi \ 55 msgfmt.texi \ 56 msgunfmt.texi \ 57 gettextize.texi \ 58 autopoint.texi \ 59 lang-c.texi \ 60 lang-python.texi \ 61 lang-java.texi \ 62 lang-csharp.texi \ 63 lang-javascript.texi \ 64 lang-scheme.texi \ 65 lang-lisp.texi \ 66 lang-clisp-c.texi \ 67 lang-elisp.texi \ 68 lang-librep.texi \ 69 lang-ruby.texi \ 70 lang-sh.texi \ 71 $(top_srcdir)/../gettext-runtime/doc/rt-gettext.texi \ 72 $(top_srcdir)/../gettext-runtime/doc/rt-ngettext.texi \ 73 $(top_srcdir)/../gettext-runtime/doc/rt-envsubst.texi \ 74 lang-bash.texi \ 75 lang-gawk.texi \ 76 lang-lua.texi \ 77 lang-pascal.texi \ 78 lang-smalltalk.texi \ 79 lang-vala.texi \ 80 lang-wxwidgets.texi \ 81 lang-tcl.texi \ 82 lang-perl.texi \ 83 lang-php.texi \ 84 lang-pike.texi \ 85 lang-gcc-source.texi \ 86 lang-ycp.texi \ 87 $(top_srcdir)/../gettext-runtime/doc/nls.texi \ 88 $(top_srcdir)/../gettext-runtime/doc/matrix.texi \ 89 iso-639.texi \ 90 iso-639-2.texi \ 91 iso-3166.texi \ 92 gpl.texi \ 93 lgpl.texi \ 94 fdl.texi 95 96# The FAQ. To be edited with Mozilla. 97# The tutorial. To be edited by hand. 98doc_DATA = FAQ.html tutorial.html 99EXTRA_DIST += $(doc_DATA) 100 101EXTRA_DIST += \ 102 iso-639.sed iso-639-2.sed iso-3166.sed \ 103 ISO_639 ISO_639-2 ISO_3166 ISO_3166_de 104 105iso-639.texi: ISO_639 iso-639.sed 106 $(SED) -f $(srcdir)/iso-639.sed $(srcdir)/ISO_639 > iso-639.tmp 107 rm -f $(srcdir)/iso-639.texi 108 mv iso-639.tmp $(srcdir)/iso-639.texi 109 110iso-639-2.texi: ISO_639-2 iso-639-2.sed 111 $(SED) -f $(srcdir)/iso-639-2.sed $(srcdir)/ISO_639-2 > iso-639-2.tmp 112 rm -f $(srcdir)/iso-639-2.texi 113 mv iso-639-2.tmp $(srcdir)/iso-639-2.texi 114 115iso-3166.texi: ISO_3166 iso-3166.sed 116 $(SED) -f $(srcdir)/iso-3166.sed $(srcdir)/ISO_3166 > iso-3166.tmp 117 rm -f $(srcdir)/iso-3166.texi 118 mv iso-3166.tmp $(srcdir)/iso-3166.texi 119 120# The dependencies of stamp-vti generated by automake are incomplete. 121# So we have to duplicate the entire rule which would otherwise be generated 122# by automake. 123$(srcdir)/stamp-vti: $(info_TEXINFOS) $(gettext_TEXINFOS) $(top_srcdir)/../.version 124 (dir=.; test -f ./gettext.texi || dir=$(srcdir); \ 125 set `$(SHELL) $(top_srcdir)/../build-aux/mdate-sh $$dir/gettext.texi`; \ 126 echo "@set UPDATED $$1 $$2 $$3"; \ 127 echo "@set UPDATED-MONTH $$2 $$3"; \ 128 echo "@set EDITION $(VERSION)"; \ 129 echo "@set VERSION $(VERSION)"; \ 130 echo "@set ARCHIVE-VERSION $(ARCHIVE_VERSION)") > vti.tmp 131 cmp -s vti.tmp $(srcdir)/version.texi \ 132 || (echo "Updating $(srcdir)/version.texi"; \ 133 cp vti.tmp $(srcdir)/version.texi) 134 rm -f vti.tmp 135 cp $(srcdir)/version.texi $@ 136 137# We distribute only the split HTML documentation. 138# The user can generate the others, via 139# make gettext.ps 140# make gettext.pdf 141# make gettext.html 142 143all-local: html-local 144install-data-local: install-html 145installdirs-local: installdirs-html 146uninstall-local: uninstall-html 147dist-hook: dist-html 148 149html-local: html-split 150# Override of automake's definition. The HTML files we want to distribute are 151# not the ones that automake knows about, and we cannot define HTMLS to a value 152# containing wildcards. 153install-html: install-html-split 154 @: 155uninstall-html: uninstall-html-split 156dist-html: dist-html-split 157 158# CLEANFILES: gettext.{dvi,ps,pdf,html} are already known to automake. 159MAINTAINERCLEANFILES = gettext_*.html 160 161 162# Documentation in DVI format. 163 164# Override of automake's definition: 165#TEXI2DVI = texi2dvi 166TEXI2DVI = texi2dvi $(TEXINCLUDES) 167 168# The install-dvi target is already defined by automake. 169 170installdirs-dvi: 171 $(MKDIR_P) $(DESTDIR)$(dvidir) 172 173uninstall-dvi: 174 $(RM) $(DESTDIR)$(dvidir)/gettext.dvi 175 176# Temporary index files. automake removes only the predefined ones by itself. 177MOSTLYCLEANFILES += \ 178 gettext.am gettext.ams \ 179 gettext.cp gettext.cps \ 180 gettext.ef gettext.efs \ 181 gettext.em gettext.ems \ 182 gettext.ev gettext.evs \ 183 gettext.fn gettext.fns \ 184 gettext.kw gettext.kws \ 185 gettext.op gettext.ops \ 186 gettext.pg gettext.pgs \ 187 gettext.vr gettext.vrs 188 189 190# Documentation in Postscript format. 191 192# Override of automake's definition: 193#DVIPS = @DVIPS@ 194DVIPS = @DVIPS@ -D600 195 196gettext.ps: gettext.dvi 197 $(DVIPS) -o $@ `if test -f gettext.dvi; then echo gettext.dvi; else echo $(srcdir)/gettext.dvi; fi` 198 199# The install-ps target is already defined by automake. 200 201installdirs-ps: 202 $(MKDIR_P) $(DESTDIR)$(psdir) 203 204uninstall-ps: 205 $(RM) $(DESTDIR)$(psdir)/gettext.ps 206 207 208# Documentation in Portable Document Format. 209 210# Override of automake's definition: 211#TEXI2PDF = @TEXI2PDF@ 212TEXI2PDF = @TEXI2PDF@ $(TEXINCLUDES) 213 214# The install-pdf target is already defined by automake. 215 216installdirs-pdf: 217 $(MKDIR_P) $(DESTDIR)$(pdfdir) 218 219uninstall-pdf: 220 $(RM) $(DESTDIR)$(pdfdir)/gettext.pdf 221 222 223# Documentation in HTML format. 224 225TEXI2HTML = @PERL@ $(top_srcdir)/../build-aux/texi2html 226 227html-monolithic: gettext.html 228html-split: gettext_toc.html 229 230# Override of automake's definition. 231# We want to use texi2html, not makeinfo --html. 232# Newer versions of texi2html also need the options --no-menu --no-sec-nav. 233gettext.html: gettext.texi version.texi $(gettext_TEXINFOS) 234 $(TEXI2HTML) $(TEXINCLUDES) -no-sec-nav -no-menu -toc-links -number -monolithic $(srcdir)/gettext.texi 235 236gettext_toc.html: gettext.texi version.texi $(gettext_TEXINFOS) 237 case "@PERL@" in \ 238 *"/missing perl") \ 239 $(TEXI2HTML) $(TEXINCLUDES) -no-sec-nav -no-menu -toc-links -number -split_chapter $(srcdir)/gettext.texi || exit 0 ;; \ 240 *) $(RM) gettext_*.html ; \ 241 $(TEXI2HTML) $(TEXINCLUDES) -no-sec-nav -no-menu -toc-links -number -split_chapter $(srcdir)/gettext.texi ;; \ 242 esac \ 243 && { mv gettext/gettext.html gettext_toc.html; \ 244 for file in gettext/*.html; do \ 245 sed -e 's/gettext\.html/gettext_toc.html/g' < $$file > `basename $$file` && rm -f $$file; \ 246 done; \ 247 rmdir gettext; \ 248 } 249 250install-html-monolithic: gettext.html 251 $(MKDIR_P) $(DESTDIR)$(htmldir) 252 $(INSTALL_DATA) `if test -f gettext.html; then echo .; else echo $(srcdir); fi`/gettext.html $(DESTDIR)$(htmldir)/gettext.html 253 254install-html-split: gettext_toc.html 255 $(MKDIR_P) $(DESTDIR)$(htmldir) 256 for file in `if test -f gettext_toc.html; then echo .; else echo $(srcdir); fi`/gettext_*.html; do \ 257 $(INSTALL_DATA) $$file $(DESTDIR)$(htmldir)/`basename $$file`; \ 258 done 259 260installdirs-html: 261 $(MKDIR_P) $(DESTDIR)$(htmldir) 262 263uninstall-html-monolithic: 264 $(RM) $(DESTDIR)$(htmldir)/gettext.html 265 266uninstall-html-split: 267 $(RM) $(DESTDIR)$(htmldir)/gettext_*.html 268 269dist-html-monolithic: 270 $(MKDIR_P) $(distdir)/ 271 file=gettext.html; \ 272 if test -f $$file; then d=.; else d=$(srcdir); fi; \ 273 cp -p $$d/$$file $(distdir)/$$file || exit 1 274 275# We would like to put gettext_*.html into EXTRA_DIST, but it doesn't work. 276dist-html-split: gettext_toc.html 277 $(MKDIR_P) $(distdir)/ 278 file=gettext_toc.html; \ 279 if test -f $$file; then d=.; else d=$(srcdir); fi; \ 280 for file in `cd $$d && echo gettext_*.html`; do \ 281 cp -p $$d/$$file $(distdir)/$$file || exit 1; \ 282 done 283