Debian Codegraph @

texk/bibtex-x/unix.mak

raw
1 #############################################################################*
2 ##############################################################################
3 ##
4 ## MODULE
5 ##
6 ## $RCSfile: unix.mak,v $
7 ## $Revision: 3.71 $
8 ## $Date: 1996/08/18 20:37:06 $
9 ##
10 ## DESCRIPTION
11 ##
12 ## A 32-bit implementation of BibTeX v0.99c for MS-DOS, OS/2 2.x,
13 ## Unix and VMS. This C language implementation is based on the
14 ## original WEB source but it has been enhanced to support 8-bit input
15 ## characters and a very large processing capacity.
16 ##
17 ## For documentation describing how to use and build this program,
18 ## see the 00README.TXT file that accompanies this distribution.
19 ##
20 ## MODULE CONTENTS
21 ##
22 ## This is the BibTeX makefile to build a Unix implementation. This
23 ## file should be called "unix.mak" and used with a command like:
24 ##
25 ## % make -f unix.mak bibtex
26 ##
27 ## If you omit the "bibtex" argument, the Makefile will display list
28 ## of the supported targets.
29 ##
30 ## Below is a list of the Unix environments on which BibTeX has been
31 ## built and tested. The appropriate Make command to build BibTeX
32 ## is also given for each of the environments. Each entry is preceded
33 ## by a status character:
34 ##
35 ## + tested and believed to work
36 ## ? not tested but should work
37 ## X believed not to work.
38 ##
39 ## The environments and Make targets are:
40 ##
41 ## + Linux, GNU cc: "linux-gcc"
42 ## + SUN, SunOS 3.x & 4.1.x, GNU cc: "sunos-gcc"
43 ## + SUN, Solaris 2.x, GNU cc: "sysv-gcc"
44 ##
45 ## ? BSD generic, GNU cc: "bsd-gcc"
46 ## ? System V generic, GNU cc: "sysv-gcc"
47 ##
48 ## For example, if you want to build BibTeX for a SunOS system running
49 ## SunOS 4.1.3 and using the GNU compiler, you should issue the
50 ## command:
51 ##
52 ## make -f unix.mak sunos-gcc
53 ##
54 ## If you port BibTeX to a new environment or find that it works
55 ## unchanged in a new environment, please report back to the author so
56 ## that this file can be updated for everyone else.
57 ##
58 ## AUTHORS
59 ##
60 ## Original WEB translation and porting by:
61 ##
62 ## Niel Kempson,
63 ## Snowy Owl Systems Limited, Cheltenham, England
64 ## E-mail: [email protected]
65 ##
66 ## 8 bit support extensions by:
67 ##
68 ## Alejandro Aguilar-Sierra
69 ## E-mail: [email protected]
70 ##
71 ## COPYRIGHT
72 ##
73 ## This implementation copyright (c) 1991-1995 by Niel Kempson
74 ## and copyright (c) 1995 by Alejandro Aguilar-Sierra.
75 ##
76 ## This program is free software; you can redistribute it and/or
77 ## modify it under the terms of the GNU General Public License as
78 ## published by the Free Software Foundation; either version 1, or
79 ## (at your option) any later version.
80 ##
81 ## This program is distributed in the hope that it will be useful,
82 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
83 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
84 ## General Public License for more details.
85 ##
86 ## You should have received a copy of the GNU General Public License
87 ## along with this program; if not, write to the Free Software
88 ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
89 ##
90 ## In other words, you are welcome to use, share and improve this
91 ## program. You are forbidden to forbid anyone else to use, share
92 ## and improve what you give them. Help stamp out software-hoarding!
93 ##
94 ## ACKNOWLEDGEMENT
95 ##
96 ## The original BibTeX was written by Oren Patashnik using Donald
97 ## Knuth's WEB system. This format produces a PASCAL program for
98 ## execution and a TeX documented version of the source code. This
99 ## program is a (hand) translation of the WEB source into C.
100 ##
101 ## CHANGE LOG
102 ##
103 ## $Log: unix.mak,v $
104 ## Revision 3.71 1996/08/18 20:37:06 kempson
105 ## Official release 3.71 (see HISTORY file for details).
106 ##
107 ## Revision 3.70 1996/04/08 10:17:58 kempson
108 ## Final documentation & cosmetic changes for official release 3.70.
109 ##
110 ## Revision 1.0 1995/10/21 21:52:44 kempson
111 ## Placed under RCS control
112 ##
113 ##############################################################################
114 ##############################################################################
115
116
117
118 ##############################################################################
119 ##############################################################################
120 #
121 # Start of local definitions for file types and compilation / linking. There
122 # are three small sections to customise:
123 #
124 # BibTeX File Searching
125 # - specifies the names of environment variables and paths to be used when
126 # searching for input files
127 #
128 # Utility Programs
129 # - specifies the names of programs to be used for simple functions
130 #
131 # Compiler/Linker
132 # - specifies compiler/linker command lines
133 #
134 # If your system is already supported it should not be necessary to modify
135 # any part of the Makefile except these three sections.
136 #
137 ##############################################################################
138 ##############################################################################
139
140 #-----------------------------------------------------------------------------
141 # BIBTEX FILE SEARCHING
142 #
143 # The macros in this section define the environment variables and default
144 # search paths that will be used by BibTeX. 8-bit BibTeX looks for input
145 # files in three different steps as summarised below. As soon as 8-bit
146 # BibTeX finds a matching file, it stops looking (i.e. only the first
147 # matching file is used). In order, the three steps are:
148 #
149 # - look for the file in the current working directory.
150 #
151 # - if the appropriate environment variable has been set (e.g. BSTINPUT),
152 # treat its value as a list of directories to be searched. Look for the
153 # file in each of the directories in the list.
154 #
155 # - if the appropriate environment variable (e.g. BSTINPUT) has not been
156 # set, use a predefined "fallback" path as a list of directories to be
157 # searched.
158 #
159 # A search list consists of a number of directories separated by colons.
160 #
161 # The following entries must be defined:
162 #
163 # AUX_ENVVAR the name of the environment variable defining the path
164 # to be searched for .aux files.
165 #
166 # AUX_INPUT_PATH the fallback path to be searched for .aux files.
167 #
168 # BIB_ENVVAR the name of the environment variable defining the path
169 # to be searched for .bib files (e.g. BIBINPUT).
170 #
171 # BIB_INPUT_PATH the fallback path to be searched for .bib files
172 # (e.g. /u/kempson/bibtex:/usr/local/lib/bibtex/bib).
173 #
174 # BST_ENVVAR the name of the environment variable defining the path
175 # to be searched for .bst files (e.g. BSTINPUT).
176 #
177 # BST_INPUT_PATH the fallback path to be searched for .bst files
178 # (e.g. /u/kempson/bibtex:/usr/local/lib/bibtex/bst).
179 #
180 # CSF_ENVVAR the name of the environment variable defining the path
181 # to be searched for .csf files (e.g. CSFINPUT).
182 #
183 # CSF_INPUT_PATH the fallback path to be searched for .csf files
184 # (e.g. /u/kempson/bibtex:/usr/local/lib/bibtex/csf).
185 #
186 # CSF_FILE_ENVVAR the name of the environment variable defining the
187 # fallback CS file (e.g. BIBTEX_CSFILE).
188 #
189 # CSF_FILE_NAME the name of the fallback CS file to be used if one is
190 # not specified on the command line and the above-named
191 # environment variable is not defined (e.g. cp850lat.csf).
192 #-----------------------------------------------------------------------------
193 AUX_INPUT_ENVVAR =
194 AUX_INPUT_PATH =
195
196 BIB_INPUT_ENVVAR = BIBINPUT
197 BIB_INPUT_PATH = /usr/local/lib/bibtex/bib
198
199 BST_INPUT_ENVVAR = BSTINPUT
200 BST_INPUT_PATH = /usr/local/lib/bibtex/bst
201
202 CSF_INPUT_ENVVAR = CSFINPUT
203 CSF_INPUT_PATH = /usr/local/lib/bibtex/csf
204
205 CSF_FILE_ENVVAR = BIBTEX_CSFILE
206 CSF_FILE_NAME = cp850lat.csf
207
208
209 #-----------------------------------------------------------------------------
210 # UTILITY PROGRAMS
211 #
212 # MAKE the command used to invoke Make to process this file.
213 # As distributed, it is defined as "make -f os2.mak"
214 #
215 # RM rm program that won't complain (e.g. /bin/rm -f) if a
216 # file is missing
217 #-----------------------------------------------------------------------------
218 MAKE = make -f unix.mak
219 RM = rm -f
220
221
222 #-----------------------------------------------------------------------------
223 #
224 # COMPILER/LINKER
225 #
226 # CC the command used to invoke the C compiler
227 # CFLAGS compiler command line flags to be used
228 #
229 # LD the command used to invoke the linker
230 # LDFLAGS linker command line flags to be used
231 # LDLIBS linker command line option to search the specified
232 # library files
233 #
234 # The definitions are used to compile and link as shown below:
235 #
236 # Compiling C programs (e.g. xx.c)
237 #
238 # $(CC) -c $(CFLAGS) xx.c
239 #
240 # Linking object files (e.g. xx.o, yy.o & zz.o)
241 #
242 # $(LD) -o $@ $(LDFLAGS) xx.o yy.o zz.o $(LDLIBS)
243 #
244 # The 'vanilla' settings should usually be:
245 #
246 # CC = cc
247 # CFLAGS = -O -DUNIX
248 # LD = cc
249 # LDFLAGS =
250 # LDLIBS =
251 #
252 # For GNU C, the following settings are recommended:
253 #
254 # CC = gcc
255 # CFLAGS = -O -DUNIX -O -Wall -Wno-char-subscripts -funsigned-char
256 # LD = gcc
257 # LDFLAGS =
258 # LDLIBS =
259 #-----------------------------------------------------------------------------
260 CC = cc
261 CFLAGS =
262
263 LD = cc
264 LDFLAGS =
265 LDLIBS =
266
267 ##############################################################################
268 ##############################################################################
269 #
270 # End of local definitions. You shouldn't need to change anything below.
271 #
272 ##############################################################################
273 ##############################################################################
274
275
276 ##############################################################################
277 # File types and default rule for compilation
278 ##############################################################################
279 BIBTEX_DEFINES = -DSUPPORT_8BIT \
280 -DAUX_INPUT_ENVVAR=\"$(AUX_INPUT_ENVVAR)\" \
281 -DAUX_INPUT_PATH=\"$(AUX_INPUT_PATH)\" \
282 -DBIB_INPUT_ENVVAR=\"$(BIB_INPUT_ENVVAR)\" \
283 -DBIB_INPUT_PATH=\"$(BIB_INPUT_PATH)\" \
284 -DBST_INPUT_ENVVAR=\"$(BST_INPUT_ENVVAR)\" \
285 -DBST_INPUT_PATH=\"$(BST_INPUT_PATH)\" \
286 -DCSF_INPUT_ENVVAR=\"$(CSF_INPUT_ENVVAR)\" \
287 -DCSF_INPUT_PATH=\"$(CSF_INPUT_PATH)\" \
288 -DCSF_FILE_ENVVAR=\"$(CSF_FILE_ENVVAR)\" \
289 -DCSF_FILE_NAME=\"$(CSF_FILE_NAME)\"
290
291 EXE =
292 O = .o
293
294 .SUFFIXES: .c .h $(O)
295
296 .c.o:
297 $(CC) -c $(BIBTEX_DEFINES) -DUNIX $(CFLAGS) $*.c
298
299
300
301 ##############################################################################
302 # Target Groupings
303 ##############################################################################
304 HDRFILES = bibtex.h datatype.h gblprocs.h gblvars.h sysdep.h \
305 getopt.h utils.h version.h
306
307 OBJFILES = bibtex$(O) \
308 bibtex-1$(O) bibtex-2$(O) bibtex-3$(O) bibtex-4$(O) \
309 getopt$(O) getopt1$(O) utils$(O)
310
311 EXEFILES = bibtex$(EXE)
312
313
314
315 ##############################################################################
316 # Top level targets
317 ##############################################################################
318 make:
319 @ echo 'You must specify the system for which BibTeX should be made.'
320 @ echo ''
321 @ echo 'For example: $(MAKE) sunos-gcc'
322 @ echo ''
323 @ echo 'Valid system targets are:'
324 @ echo ''
325 @ echo ' clean, veryclean'
326 @ echo ''
327 @ echo ' bsd-gcc, linux-gcc, sunos-gcc, sysv-gcc'
328
329 bibtex-exe: $(EXEFILES)
330
331 clean:
332 @ echo 'Cleaning up ... '
333 $(RM) $(OBJFILES)
334
335 veryclean:
336 @ echo 'Really cleaning up ... '
337 $(RM) $(OBJFILES)
338 $(RM) $(EXEFILES)
339
340
341
342 #-----------------------------------------------------------------------------
343 # Dependencies for executables
344 #-----------------------------------------------------------------------------
345 bibtex$(EXE): $(OBJFILES)
346 $(LD) -o $@ $(LDFLAGS) $(OBJFILES) $(LDLIBS)
347
348
349 #-----------------------------------------------------------------------------
350 # Dependencies for object files
351 #-----------------------------------------------------------------------------
352 bibtex$(O): bibtex.c $(HDRFILES)
353
354 bibtex-1$(O): bibtex-1.c $(HDRFILES)
355
356 bibtex-2$(O): bibtex-2.c $(HDRFILES)
357
358 bibtex-3$(O): bibtex-3.c $(HDRFILES)
359
360 bibtex-4$(O): bibtex-4.c $(HDRFILES)
361
362 getopt$(O): getopt.c getopt.h
363
364 getopt1$(O): getopt1.c getopt.h
365
366 utils$(O): utils.c $(HDRFILES)
367
368
369
370 ##############################################################################
371 ##############################################################################
372 ##
373 ## OPERATING SYSTEM ENVIRONMENT SPECIFIC TARGETS
374 ##
375 ## The following symbols may be defined using "-D" to affect the
376 ## compilation:
377 ##
378 ## HAS_STRINGS_H - The header file for string functions is
379 ## <strings.h> rather than <string.h>
380 ##############################################################################
381 ##############################################################################
382
383
384 #-----------------------------------------------------------------------------
385 # BSD generic environment, GNU cc
386 #-----------------------------------------------------------------------------
387 bsd-gcc:
388 @ echo 'Making BibTeX for BSD using GNU cc ... '
389 $(MAKE) bibtex-exe CC=gcc \
390 CFLAGS="-Wall -Wno-char-subscripts -funsigned-char" \
391 LD=gcc
392
393 #-----------------------------------------------------------------------------
394 # Linux, GNU cc
395 #-----------------------------------------------------------------------------
396 linux-gcc:
397 @ echo 'Making BibTeX for Linux using GNU cc ... '
398 $(MAKE) bibtex-exe CC=gcc \
399 CFLAGS="-Wall -Wno-char-subscripts -funsigned-char" \
400 LD=gcc
401
402 #-----------------------------------------------------------------------------
403 # SunOS 4.1.x Unix BSD environment, GNU cc
404 #-----------------------------------------------------------------------------
405 sunos-gcc:
406 @ echo 'Making BibTeX for SunOS 4.1.x using GNU cc ... '
407 $(MAKE) bibtex-exe CC=gcc \
408 CFLAGS="-Wall -Wno-char-subscripts -funsigned-char" \
409 LD=gcc
410
411 #-----------------------------------------------------------------------------
412 # System V generic environment, GNU cc
413 #-----------------------------------------------------------------------------
414 sysv-gcc:
415 @ echo 'Making BibTeX for System V using GNU cc ... '
416 $(MAKE) bibtex-exe CC=gcc \
417 CFLAGS="-Wall -Wno-char-subscripts -funsigned-char" \
418 LD=gcc