1 # Makefile for GNU Awk documentation.
3 # Copyright (C) 1993-2000 the Free Software Foundation, Inc.
5 # This file is part of GAWK, the GNU implementation of the
6 # AWK Programming Language.
8 # GAWK is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
13 # GAWK is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
28 INSTALL_PROGRAM = @INSTALL_PROGRAM@
29 INSTALL_DATA = @INSTALL_DATA@
32 exec_prefix = @exec_prefix@
38 mandir = @mandir@/man1
41 datadir = @datadir@/awk
45 MAKEINFO = makeinfo --no-split
47 SEDME = sed -e "s/^level0 restore/level0 restore flashme 100 72 moveto (Copyright `date '+%m-%d-%y %T'`, FSF, Inc. (all)) show/" \
48 -e "s/^\/level0 save def/\/level0 save def 30 -48 translate/"
50 DOCS= gawk.1 igawk.1 gawk.texi
52 TEXFILES= gawk.aux gawk.cp gawk.cps gawk.fn gawk.fns gawk.ky gawk.kys \
53 gawk.pg gawk.pgs gawk.toc gawk.tp gawk.tps gawk.vr gawk.vrs
55 ALLDOC= gawk.dvi $(TEXFILES) gawk.log awkcard.tr
57 CARDSRC = $(srcdir)/macros $(srcdir)/cardfonts $(srcdir)/colors awkcard.tr
58 CARDSRC_N = $(srcdir)/macros $(srcdir)/cardfonts $(srcdir)/no.colors awkcard.tr
59 CARDFILES= $(CARDSRC) ad.block awkcard.in setter.outline
61 # Use this if your troff can correctly handle macros from 'colors' file
64 # Uncomment the following definition of AWKCARD if your troff can produce
65 # Postscript but still has troubles with macros from 'colors'. As this
66 # is not groff you will have to change TROFF macro as well. Do not forget
67 # to ensure that awkcard.tr is processed by tbl.
72 install: $(mandir)/gawk$(manext) $(mandir)/igawk$(manext) $(infodir)/gawk.info
74 $(infodir)/gawk.info::
75 -if test -f gawk.info; then d=.; \
76 else d=$(srcdir); fi; \
77 if [ -f $(infodir)/dir -a -f $(infodir)/gawk.info ] \
78 && cmp $$d/gawk.info $(infodir)/gawk.info > /dev/null \
79 && grep '(gawk)' $(infodir)/dir > /dev/null; then \
82 $(INSTALL_DATA) $$d/gawk.info $(infodir)/gawk.info ; \
83 if $(SHELL) -c 'install-info --version' > /dev/null 2>&1 ; \
84 then install-info --info-dir=$(infodir) gawk.info ; \
85 else true ; fi; exit 0
87 $(mandir)/gawk$(manext):: gawk.1
88 $(INSTALL_DATA) $(srcdir)/gawk.1 $(mandir)/gawk$(manext)
90 $(mandir)/igawk$(manext):: igawk.1
91 $(INSTALL_DATA) $(srcdir)/igawk.1 $(mandir)/igawk$(manext)
94 rm -f $(mandir)/gawk$(manext) $(mandir)/igawk$(manext) $(infodir)/gawk.info*
99 -TEXINPUTS=$(srcdir):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/gawk.texi
104 $(MAKEINFO) $(srcdir)/gawk.texi
106 postscript: dvi gawk.1 igawk.1 $(AWKCARD)
107 -groff -man $(srcdir)/gawk.1 > gawk.1.ps
108 -groff -man $(srcdir)/igawk.1 > igawk.1.ps
109 dvips -o gawk.ps gawk.dvi
111 awkcard.tr: awkcard.in
112 sed 's:SRCDIR:$(srcdir):' < $(srcdir)/awkcard.in > awkcard.tr
114 awkcard.ps: $(CARDFILES)
115 $(TROFF) $(CARDSRC) | $(SEDME) | cat $(srcdir)/setter.outline - > awkcard.ps
117 awkcard.nc: $(CARDFILES)
118 $(TROFF) $(CARDSRC_N) | $(SEDME) | cat $(srcdir)/setter.outline - > awkcard.ps && touch awkcard.nc
121 rm -f *.ps $(ALLDOC) *~ awkcard.nc
126 maintainer-clean: distclean
127 @echo "This command is intended for maintainers to use; it"
128 @echo "deletes files that may require special tools to rebuild."