summaryrefslogtreecommitdiffstats
path: root/contrib/awk/doc/Makefile.in
blob: edcf404656021bd5b404918b33d04e49920dac50 (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
# Makefile for GNU Awk documentation.
#
# Copyright (C) 1993-2000 the Free Software Foundation, Inc.
# 
# This file is part of GAWK, the GNU implementation of the
# AWK Programming Language.
# 
# GAWK 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 of the License, or
# (at your option) any later version.
# 
# GAWK 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

SHELL = /bin/sh

srcdir = @srcdir@
VPATH = @srcdir@

INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@

prefix = @prefix@
exec_prefix = @exec_prefix@
binprefix =
manprefix =

bindir = @bindir@
libdir = @libdir@
mandir = @mandir@/man1
manext = .1
infodir = @infodir@
datadir = @datadir@/awk

TEXI2DVI = texi2dvi
TEX = tex
MAKEINFO = makeinfo --no-split
TROFF = groff -t -Tps
SEDME = sed -e "s/^level0 restore/level0 restore flashme 100 72 moveto (Copyright `date '+%m-%d-%y %T'`, FSF, Inc. (all)) show/" \
		-e "s/^\/level0 save def/\/level0 save def 30 -48 translate/"

DOCS= gawk.1 igawk.1 gawk.texi

TEXFILES= gawk.aux gawk.cp gawk.cps gawk.fn gawk.fns gawk.ky gawk.kys \
	   gawk.pg gawk.pgs gawk.toc gawk.tp gawk.tps gawk.vr gawk.vrs

ALLDOC= gawk.dvi $(TEXFILES) gawk.log awkcard.tr

CARDSRC = $(srcdir)/macros $(srcdir)/cardfonts $(srcdir)/colors awkcard.tr
CARDSRC_N = $(srcdir)/macros $(srcdir)/cardfonts $(srcdir)/no.colors awkcard.tr
CARDFILES= $(CARDSRC) ad.block awkcard.in setter.outline

# Use this if your troff can correctly handle macros from 'colors' file
AWKCARD = awkcard.ps

# Uncomment the following definition of AWKCARD if your troff can produce
# Postscript but still has troubles with macros from 'colors'.  As this
# is not groff you will have to change TROFF macro as well.  Do not forget
# to ensure that awkcard.tr is processed by tbl.
#AWKCARD = awkcard.nc

all: $(DOCS) info

install: $(mandir)/gawk$(manext) $(mandir)/igawk$(manext) $(infodir)/gawk.info

$(infodir)/gawk.info::
	-if test -f gawk.info; then d=.; \
	else d=$(srcdir); fi; \
	if    [ -f $(infodir)/dir -a -f $(infodir)/gawk.info ] \
	   && cmp $$d/gawk.info $(infodir)/gawk.info > /dev/null \
	   && grep '(gawk)' $(infodir)/dir  > /dev/null; then \
		exit 0; \
	fi; \
	$(INSTALL_DATA) $$d/gawk.info $(infodir)/gawk.info ; \
	if $(SHELL) -c 'install-info --version' > /dev/null 2>&1 ; \
	then install-info --info-dir=$(infodir) gawk.info ; \
	else true ; fi; exit 0

$(mandir)/gawk$(manext):: gawk.1
	$(INSTALL_DATA) $(srcdir)/gawk.1 $(mandir)/gawk$(manext)

$(mandir)/igawk$(manext):: igawk.1
	$(INSTALL_DATA) $(srcdir)/igawk.1 $(mandir)/igawk$(manext)

uninstall:
	rm -f $(mandir)/gawk$(manext) $(mandir)/igawk$(manext) $(infodir)/gawk.info*

dvi:	gawk.dvi

gawk.dvi: gawk.texi
	-TEXINPUTS=$(srcdir):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/gawk.texi

info:	gawk.info

gawk.info: gawk.texi
	$(MAKEINFO) $(srcdir)/gawk.texi

postscript: dvi gawk.1 igawk.1 $(AWKCARD)
	-groff -man $(srcdir)/gawk.1 > gawk.1.ps
	-groff -man $(srcdir)/igawk.1 > igawk.1.ps
	dvips -o gawk.ps gawk.dvi

awkcard.tr: awkcard.in
	sed 's:SRCDIR:$(srcdir):' < $(srcdir)/awkcard.in > awkcard.tr

awkcard.ps: $(CARDFILES)
	$(TROFF) $(CARDSRC) | $(SEDME) | cat $(srcdir)/setter.outline - > awkcard.ps

awkcard.nc: $(CARDFILES)
	$(TROFF) $(CARDSRC_N) | $(SEDME) | cat $(srcdir)/setter.outline - > awkcard.ps && touch awkcard.nc

clean:
	rm -f *.ps $(ALLDOC) *~ awkcard.nc

distclean: clean
	rm -f Makefile

maintainer-clean: distclean
	@echo "This command is intended for maintainers to use; it"
	@echo "deletes files that may require special tools to rebuild."
	rm -f gawk.info
OpenPOWER on IntegriCloud