summaryrefslogtreecommitdiff
path: root/biblio/bibtex/utils/bibindex/Makefile
blob: 619c92a0af5031431fe62a6df23b503f979fc65f (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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
#=======================================================================
# Makefile for bibindex and biblook.
#
# These programs are written in ISO/ANSI Standard C.  They must be
# compiled with a Standard C compiler, or with a C++ compiler.
#
# Current target list:
#	all 			make bibindex and biblook
#	bibindex.txt 		ascii text file from UNIX man pages
#	bibindex 		make indexing program
#	bibindex.tar		UNIX tar archive file for bibindex
#				distribution
#	bibindex.tar.z		compressed UNIX tar archive file for bibindex
#	bibindex.uue		uuencoded bibindex.tar.z archive
#	bibindex.zip		InfoZip archive file for bibindex
#				distribution
#	bibindex.zoo		zoo archive file for bibindex distribution
#	bibindex.tar-lst	listing of UNIX tar archive file
#	bibindex.zip-lst	listing of InfoZip archive file
#	bibindex.zoo-lst	listing of zoo archive file
#	biblook.txt 		ascii text file from UNIX man pages
#	biblook 		make lookup program
#	clean 			remove all recreatable files, except
#				executables
#	clobber 		remove all recreatable files
#	install 		install executables and manual pages
#	uninstall 		uninstall executables and manual pages
#
# [01-Jun-1993]
#=======================================================================

DEST		= /usr/local

BINDIR		= $(DEST)/bin

CATDIR		= $(DEST)/man/cat1

# Compilation with a C++ compiler is preferable.  SunOS 4.1 CC cannot be
# used, however, because of its erroneous function prototypes in stdlib.h
# which use char* instead of void* in many places.  There is no such
# problem with Sun Solaris 2.1 CC, which works fine.
CC		= CC			## some UNIX C++ compilers
CC		= CC -I/usr/CC/incl	## C++ on SunOS 4.1.1
CC		= acc -Dsun		## SunOS Standard C compiler
CC		= c89 -D_POSIX_SOURCE	## HP 9000/850 HP-UX A.08.00 D
CC		= c89 -D_POSIX_SOURCE	## IBM RS/6000 Standard C
CC		= xlC			## IBM RS/6000 C++
CC		= cc			## many UNIX systems
CC		= cc $(GCCFLAGS)	## NeXT
CC		= lcc -A -A -n		## Princeton/AT&T Standard C compiler
CC		= g++ $(GCCFLAGS)	## UNIX systems with GNU C++
CC              = gcc $(GCCFLAGS)	## GNU C
CC		= g++ $(GCCFLAGS)	## UNIX systems with GNU C++
CC		= g++ $(GCCFLAGS) -Dtemplate=Template ## NeXT systems with GNU C++
CC		= cc -ObjC		## NeXT systems with Objective C
CC              = gcc $(GCCFLAGS)	## GNU C

CFLAGS		= $(OPT)		## most cases

GCCFLAGS	= -Wall -Wshadow -Wcast-qual -Wpointer-arith \
		  -Wwrite-strings

COL		= col -b

COMPRESS	= compress

CP		= /bin/cp

FTPDIR		= /usr/spool/ftp/pub/tex/bib

LDFLAGS		=

# Use /usr/lib/debug/malloc.o on Sun systems for malloc debugging
# with acc, gcc, or CC
LIBS		= /usr/lib/debug/malloc.o
LIBS		=

MANDIR		= $(DEST)/man/man1

MANEXT		= 1

NROFF		= nroff -man

# Define DEBUG_MALLOC on Sun systems for debugging memory allocation
OPT		= -g -DDEBUG_MALLOC
OPT		= -g

RM		= /bin/rm -f

SHELL		= /bin/sh

TAR		= tar

TARFILES	= README Makefile bibindex.c bibindex.man bibindex.txt \
		biblook.c biblook.h biblook.man biblook.txt

UNZIP		= unzip

UUENCODE	= uuencode

ZIP		= zip

ZOO		= zoo

#=======================================================================

all:	bibindex biblook bibindex.txt biblook.txt

bibindex:	bibindex.o
	$(CC) $(CFLAGS) -o bibindex bibindex.o $(LDFLAGS) $(LIBS)

bibindex.txt:	bibindex.man
	$(NROFF) $? | $(COL) >$@

bibindex.tar:	$(TARFILES)
	$(TAR) cf $@ $(TARFILES)

bibindex.tar-lst:	bibindex.tar
	$(TAR) tvf $? >$@

bibindex.tar.z:	bibindex.tar
	$(COMPRESS) <$? >$@

bibindex.uue:	bibindex.tar.z
	$(UUENCODE) $? $? >$@

bibindex.zip:	$(TARFILES)
	-$(RM) $@
	$(ZIP) $@ $(TARFILES)

bibindex.zip-lst:	bibindex.zip
	$(UNZIP) -v $? >$@

bibindex.zoo:	$(TARFILES)
	-$(RM) $@
	$(ZOO) a $@ $(TARFILES)

bibindex.zoo-lst:	bibindex.zoo
	$(ZOO) v $? >$@

biblook:	biblook.o
	$(CC) $(CFLAGS) -o biblook biblook.o $(LDFLAGS) $(LIBS)

biblook.txt:	biblook.man
	$(NROFF) $? | $(COL) >$@

bibindex.o biblook.o: biblook.h

clean mostlyclean:
	-$(RM) \#*
	-$(RM) *~
	-$(RM) core
	-$(RM) *.o
	-$(RM) bibindex.tar bibindex.tar.z bibindex.tar-lst
	-$(RM) bibindex.uue
	-$(RM) bibindex.zip bibindex.zip-lst
	-$(RM) bibindex.zoo bibindex.zoo-lst

clobber distclean realclean reallyclean:	clean
	-$(RM) biblook bibindex
	-$(RM) biblook.txt bibindex.txt

install:	bibindex biblook
	-$(CP) bibindex $(BINDIR)
	-chmod 775 $(BINDIR)/bibindex
	-$(CP) biblook $(BINDIR)
	-chmod 775 $(BINDIR)/biblook
	-$(CP) bibindex.man $(MANDIR)/bibindex.$(MANEXT)
	-chmod 774 $(MANDIR)/bibindex.$(MANEXT)
	-$(CP) biblook.man $(MANDIR)/biblook.$(MANEXT)
	-chmod 774 $(MANDIR)/biblook.$(MANEXT)

install-ftp:	bibindex.tar.z bibindex.zip bibindex.zoo \
		bibindex.tar-lst bibindex.zip-lst bibindex.zoo-lst
	-for f in $? ; \
	do \
		$(CP) $$f $(FTPDIR) ; \
		chmod 774 $(FTPDIR)/$$f ; \
	done

uninstall:
	-$(RM) $(BINDIR)/bibindex
	-$(RM) $(BINDIR)/biblook
	-$(RM) $(MANDIR)/bibindex.$(MANEXT)
	-$(RM) $(MANDIR)/biblook.$(MANEXT)
	-$(RM) $(CATDIR)/bibindex.$(MANEXT)
	-$(RM) $(CATDIR)/biblook.$(MANEXT)

#=======================================================================