summaryrefslogtreecommitdiffstats
path: root/doc/Makefile.am
blob: f7560291dbe2fdce155ff8644e5b5b9f44e08cb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
## Makefile for the doc subdirectory of the GNU NLS Utilities
## Copyright (C) 1995-1997, 2001 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 2, 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, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

## Process this file with automake to produce Makefile.in.

docdir = $(prefix)/doc/@PACKAGE@
dvidir = $(docdir)
psdir = $(docdir)
pdfdir = $(docdir)
htmldir = $(docdir)

AUTOMAKE_OPTIONS = 1.2 gnits

SED = sed
RM = rm -f

MAKEINFO = env LANG= LANGUAGE= @MAKEINFO@

info_TEXINFOS = gettext.texi
# List of texinfo sources @included by gettext.texi, excluding version.texi.
gettext_TEXINFOS = \
  xgettext.texi msginit.texi msgmerge.texi msgcat.texi msgconv.texi \
  msggrep.texi msgexec.texi msguniq.texi msgcomm.texi msgcmp.texi \
  msgattrib.texi msgen.texi msgfmt.texi msgunfmt.texi \
  iso-639.texi iso-3166.texi

EXTRA_DIST = iso-639.sed iso-3166.sed ISO_639 ISO_3166 nls.texi matrix.texi $(EXTRA_DIST_html) texi2html

iso-639.texi: ISO_639 iso-639.sed
	$(SED) -f $(srcdir)/iso-639.sed $(srcdir)/ISO_639 > iso-639.tmp
	rm -f $(srcdir)/iso-639.texi
	mv iso-639.tmp $(srcdir)/iso-639.texi

iso-3166.texi: ISO_3166 iso-3166.sed
	$(SED) -f $(srcdir)/iso-3166.sed $(srcdir)/ISO_3166 > iso-3166.tmp
	rm -f $(srcdir)/iso-3166.texi
	mv iso-3166.tmp $(srcdir)/iso-3166.texi


# We distribute only the split HTML documentation.
# The user can generate the others, via
#   make gettext.ps
#   make gettext.pdf
#   make gettext.html

all-local: html
install-data-local: install-html
installdirs-local: installdirs-html
uninstall-local: uninstall-html

html: html-split
install-html: install-html-split
uninstall-html: uninstall-html-split

# This strange way of taking wildcards is a workaround to an automake-1.5 bug
# which would occur if we wrote $(wildcard $(srcdir)/gettext_*.html).
EXTRA_DIST_html = $(notdir $(wildcard gettext_*.html) $(wildcard $(addprefix $(srcdir), $(addprefix /, gettext_*.html))))
CLEANFILES = gettext.pdf gettext.html
# gettext.dvi and gettext.ps are already known to automake.
MAINTAINERCLEANFILES = gettext_*.html


# Documentation in DVI format.

install-dvi: gettext.dvi
	$(mkinstalldirs) $(DESTDIR)$(dvidir)
	$(INSTALL_DATA) `if test -f gettext.dvi; then echo .; else echo $(srcdir); fi`/gettext.dvi $(DESTDIR)$(dvidir)/gettext.dvi

installdirs-dvi:
	$(mkinstalldirs) $(DESTDIR)$(dvidir)

uninstall-dvi:
	$(RM) $(DESTDIR)$(dvidir)/gettext.dvi


# Documentation in Postscript format.

DVIPS = @DVIPS@ -D600

ps: gettext.ps

gettext.ps: gettext.dvi
	$(DVIPS) -o $@ `if test -f gettext.dvi; then echo gettext.dvi; else echo $(srcdir)/gettext.dvi; fi`

install-ps: gettext.ps
	$(mkinstalldirs) $(DESTDIR)$(psdir)
	$(INSTALL_DATA) `if test -f gettext.ps; then echo .; else echo $(srcdir); fi`/gettext.ps $(DESTDIR)$(psdir)/gettext.ps

installdirs-ps:
	$(mkinstalldirs) $(DESTDIR)$(psdir)

uninstall-ps:
	$(RM) $(DESTDIR)$(psdir)/gettext.ps


# Documentation in Portable Document Format.

TEXI2PDF = @TEXI2PDF@
SUFFIXES = .pdf

pdf: gettext.pdf

.texi.pdf:
	TEXINPUTS=.:$$TEXINPUTS \
	  MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2PDF) $<

install-pdf: gettext.pdf
	$(mkinstalldirs) $(DESTDIR)$(pdfdir)
	$(INSTALL_DATA) `if test -f gettext.pdf; then echo .; else echo $(srcdir); fi`/gettext.pdf $(DESTDIR)$(pdfdir)/gettext.pdf

installdirs-pdf:
	$(mkinstalldirs) $(DESTDIR)$(pdfdir)

uninstall-pdf:
	$(RM) $(DESTDIR)$(pdfdir)/gettext.pdf


# Documentation in HTML format.

TEXI2HTML = @PERL@ $(srcdir)/texi2html

html-monolithic: gettext.html
html-split: gettext_toc.html

gettext.html: gettext.texi version.texi $(gettext_TEXINFOS)
	$(TEXI2HTML) -expandinfo -number -monolithic `if test -f gettext.texi; then echo gettext.texi; else echo $(srcdir)/gettext.texi; fi`

gettext_toc.html: gettext.texi version.texi $(gettext_TEXINFOS)
	case "@PERL@" in \
	  *"/missing perl") \
	     $(TEXI2HTML) -expandinfo -number -split_chapter `if test -f gettext.texi; then echo gettext.texi; else echo $(srcdir)/gettext.texi; fi` || exit 0 ;; \
	  *) $(RM) gettext_*.html ; \
	     $(TEXI2HTML) -expandinfo -number -split_chapter `if test -f gettext.texi; then echo gettext.texi; else echo $(srcdir)/gettext.texi; fi` ;; \
	esac

install-html-monolithic: gettext.html
	$(mkinstalldirs) $(DESTDIR)$(htmldir)
	$(INSTALL_DATA) `if test -f gettext.html; then echo .; else echo $(srcdir); fi`/gettext.html $(DESTDIR)$(htmldir)/gettext.html

install-html-split: gettext_toc.html
	$(mkinstalldirs) $(DESTDIR)$(htmldir)
	for file in `if test -f gettext_toc.html; then echo .; else echo $(srcdir); fi`/gettext_*.html; do \
	  $(INSTALL_DATA) $$file $(DESTDIR)$(htmldir)/`basename $$file`; \
	done

installdirs-html:
	$(mkinstalldirs) $(DESTDIR)$(htmldir)

uninstall-html-monolithic:
	$(RM) $(DESTDIR)$(htmldir)/gettext.html

uninstall-html-split:
	$(RM) $(DESTDIR)$(htmldir)/gettext_*.html


# One more automake bug.
installdirs: installdirs-local