summaryrefslogtreecommitdiff
path: root/indexing/makeindex/doc/Makefile
blob: 4a6cf8dd1da22b3eb032197a5577b57cdd6b2f3c (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
#=======================================================================
# Make auxiliary documentation using nroff and LaTeX.  makeindex.l is
# the nroff/troff input file for the UNIX manual pages.  From it, we
# produce:
#	makeindex.hlp (printable ASCII help file),
#	makeindex.info (GNU Emacs INFO node file),
#	makeindex.ps (PostScript version of typeset manual pages), and
#	makeindex.vms (VAX VMS hierarchical help file),
#	manpages.dvi (.dvi file of manual pages)
#
# Targets:
#	all
#	clean
#	clobber
#	distclean
#	install
#	makeindex.dvi
#	makeindex.hlp
#	makeindex.ps
#	makeindex.info
#	makeindex.vms
#	manpages.dvi
#	mostlyclean
#	realclean
#	reallyclean
#	uninstall
#
# [26-May-1993] -- update for 2.12beta release (add GNU Project
# 		   standard targets)
# [15-Aug-1991]
#=======================================================================

CATDIR	=	$(MANTOP)/cat1
CP	=	cp
LATEX	=	latex
MANTOP	=	/usr/local/man
MANDIR	=	$(MANTOP)/man1
MANEXT	=	1
RM	=	/bin/rm -f
SHELL	=	/bin/sh

all:	makeindex.dvi makeindex.hlp makeindex.info makeindex.ps \
	makeindex.vms manpages.dvi

clean mostlyclean:
	$(RM) *~
	$(RM) \#*
	$(RM) core
	$(RM) makeindex.aux
	$(RM) makeindex.dvi
	$(RM) makeindex.log

clobber distclean realclean reallyclean:	clean
	$(RM) makeindex.hlp
	$(RM) makeindex.info
	$(RM) makeindex.ps
	$(RM) makeindex.vms
	$(RM) manpages.dvi

install:	uninstall
	$(CP) makeindex.l $(MANDIR)/makeindex.$(MANEXT)
	chmod 774 $(MANDIR)/makeindex.$(MANEXT)

makeindex.dvi:	makeindex.tex
	$(LATEX) makeindex.tex
	$(LATEX) makeindex.tex

makeindex.hlp:	makeindex.l
	nroff -man makeindex.l | col -b >makeindex.hlp

# ======================================================================
# NB: The vmshelp* and uhelp* convertors are available for anonymous ftp
# on math.utah.edu from ~ftp/pub/tex/pub/info or via e-mail from the
# tuglib server with requests "help" and "send index from
# ftp/pub/tex/pub/info"
# ======================================================================
makeindex.info:	makeindex.vms
	vmshelp2 makeindex.vms >makeindex.info

makeindex.ps:	makeindex.l
# To convert a manual page to PostScript:
#	on BSD: tbl | eqn | ditroff -man | psdit | psrev
#	on AIX: tbl | eqn | psroff -t -man | psrev
# Omit psrev if your printer stacks pages face down.
# tbl and eqn are not required for makeindex.l.
# This pipeline is hidden in a private script:
	man2ps <makeindex.l >makeindex.ps

# Reduce makeindex.hlp to makeindex.vms with the help of sed and awk.
# Alas, the output of nroff recorded in makeindex.hlp is somewhat
# system dependent.  The sed patterns here suffice for SunOS 4.1.1
# and IBM RS/6000 AIX 3.1, but may require modifications on other
# UNIX systems.

makeindex.vms:	makeindex.hlp
	echo '1 MAKEINDEX' >makeindex.vms
	expand < makeindex.hlp | \
	sed	-e '/^ *MAKEINDEX(1L).*MAKEINDEX(1L)/d' \
		-e '/^ *Page.*(printed.*)/d' \
		-e '/^Sun Release [0-9]/d' \
		-e 's/^ *INPUT STYLE SPECIFIERS/3 INPUT STYLE SPECIFIERS/' \
		-e 's/^ *OUTPUT STYLE SPECIFIERS/3 OUTPUT STYLE SPECIFIERS/' \
		-e 's/^ *TeX EXAMPLE/3 TeX EXAMPLE/' \
		-e 's/^ *TROFF EXAMPLE/3 TROFF EXAMPLE/' \
		-e 's/^ *CREATING THE INDEX FILE/3 CREATING THE INDEX FILE/' \
		-e 's/^ *COMPLETING THE INDEX/3 COMPLETING THE INDEX/' \
		-e 's/^     / /' \
		-e 's/^ \([A-Z][A-Z /]*\)$$/2 \1/' \
		-e 's/^\([A-Z][A-Z /]*\)$$/2 \1/' |\
	awk -f deblank.awk >> makeindex.vms

# We create a .dvi file for the manual pages under a different name to
# avoid a collision with makeindex.dvi.  GNU groff works quite nicely,
# and gives us a .dvi file that anyone can process, even if they do not
# have a PostScript printer.  groff's font selection is a bit unusual;
# it wants a few Computer Modern fonts in magnifications 0.8 and 0.9.
# For manpages.dvi, it needs these additional font files: cmbx10.240pk
# cmbx10.270pk cmcsc10.240pk cmcsc10.270pk cmr10.240pk cmr10.270pk
# cmti10.240pk cmti10.270pk.  If your DVI driver can substitute a nearby
# size, you should be able to manage without them.
manpages.dvi:	makeindex.l
	groff -Tdvi -man makeindex.l >manpages.dvi

uninstall:
	if [ -f $(CATDIR)/makeindex.1 ] ; then $(RM) $(CATDIR)/makeindex.1 ; fi
	if [ -f $(MANDIR)/makeindex.1 ] ; then $(RM) $(MANDIR)/makeindex.1 ; fi