Debian Codegraph @

texk/bibtex-x/dos-dj.mak

raw
1 #############################################################################*
2 ##############################################################################
3 ##
4 ## MODULE
5 ##
6 ## $RCSfile: dos-dj.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 an MS-DOS 32-bit executable
23 ## using the DJGPP GNU C compiler. DJGPP V2 provides a clean DPMI
24 ## implementation. This file should be called "dos-dj.mak" and
25 ## used with a command like:
26 ##
27 ## [C:\] make -f dos-dj.mak bibtex
28 ##
29 ## If you omit the "bibtex" argument, the Makefile will display list
30 ## of the supported targets.
31 ##
32 ## If you port BibTeX to a new environment or find that it works
33 ## unchanged in a new environment, please report back to the author so
34 ## that this file can be updated for everyone else.
35 ##
36 ## AUTHORS
37 ##
38 ## Original WEB translation to C, conversion to "big" (32-bit) capacity,
39 ## addition of run-time selectable capacity and 8-bit support extensions
40 ## by:
41 ##
42 ## Niel Kempson
43 ## Snowy Owl Systems Limited, Cheltenham, England
44 ## E-mail: [email protected]
45 ##
46 ## 8-bit support extensions also by:
47 ##
48 ## Alejandro Aguilar-Sierra
49 ## Centro de Ciencias de la Atm\'osfera,
50 ## Universidad Nacional Autonoma de M\'exico, M\'exico
51 ## E-mail: [email protected]
52 ##
53 ## COPYRIGHT
54 ##
55 ## This implementation copyright (c) 1991-1995 by Niel Kempson
56 ## and copyright (c) 1995 by Alejandro Aguilar-Sierra.
57 ##
58 ## This program is free software; you can redistribute it and/or
59 ## modify it under the terms of the GNU General Public License as
60 ## published by the Free Software Foundation; either version 1, or
61 ## (at your option) any later version.
62 ##
63 ## This program is distributed in the hope that it will be useful,
64 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
65 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
66 ## General Public License for more details.
67 ##
68 ## You should have received a copy of the GNU General Public License
69 ## along with this program; if not, write to the Free Software
70 ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
71 ##
72 ## In other words, you are welcome to use, share and improve this
73 ## program. You are forbidden to forbid anyone else to use, share
74 ## and improve what you give them. Help stamp out software-hoarding!
75 ##
76 ## ACKNOWLEDGEMENT
77 ##
78 ## The original BibTeX was written by Oren Patashnik using Donald
79 ## Knuth's WEB system. This format produces a PASCAL program for
80 ## execution and a TeX documented version of the source code. This
81 ## program started as a (manual) translation of the WEB source into C.
82 ##
83 ## CHANGE LOG
84 ##
85 ## $Log: dos-dj.mak,v $
86 ## Revision 3.71 1996/08/18 20:37:06 kempson
87 ## Official release 3.71 (see HISTORY file for details).
88 ##
89 ## Revision 3.70 1996/04/08 10:17:58 kempson
90 ## Final documentation & cosmetic changes for official release 3.70.
91 ##
92 ## Revision 1.0 1995/10/21 21:52:42 kempson
93 ## Placed under RCS control
94 ##
95 ##############################################################################
96 ##############################################################################
97
98
99 ##############################################################################
100 ##############################################################################
101 #
102 # Start of local definitions for file types and compilation / linking. There
103 # are three small sections to customise:
104 #
105 # BibTeX File Searching
106 # - specifies the names of environment variables and paths to be used when
107 # searching for input files
108 #
109 # Utility Programs
110 # - specifies the names of programs to be used for simple functions
111 #
112 # Compiler/Linker
113 # - specifies compiler/linker command lines
114 #
115 # If your system is already supported it should not be necessary to modify
116 # any part of the Makefile except these three sections.
117 #
118 ##############################################################################
119 ##############################################################################
120
121 #-----------------------------------------------------------------------------
122 # BIBTEX FILE SEARCHING
123 #
124 # The macros in this section define the environment variables and default
125 # search paths that will be used by BibTeX. 8-bit BibTeX looks for input
126 # files in three different steps as summarised below. As soon as 8-bit
127 # BibTeX finds a matching file, it stops looking (i.e. only the first
128 # matching file is used). In order, the three steps are:
129 #
130 # - look for the file in the current working directory.
131 #
132 # - if the appropriate environment variable has been set (e.g. BSTINPUT),
133 # treat its value as a list of directories to be searched. Look for the
134 # file in each of the directories in the list.
135 #
136 # - if the appropriate environment variable (e.g. BSTINPUT) has not been
137 # set, use a predefined "fallback" path as a list of directories to be
138 # searched.
139 #
140 # A search list consists of a number of directories separated by semicolons.
141 #
142 # The following entries must be defined:
143 #
144 # AUX_ENVVAR the name of the environment variable defining the path
145 # to be searched for .aux files.
146 #
147 # AUX_INPUT_PATH the fallback path to be searched for .aux files.
148 #
149 # BIB_ENVVAR the name of the environment variable defining the path
150 # to be searched for .bib files (e.g. BIBINPUT).
151 #
152 # BIB_INPUT_PATH the fallback path to be searched for .bib files
153 # (e.g. e:/usr/latex/bibtex;e:/emtex/bibtex/bib).
154 #
155 # BST_ENVVAR the name of the environment variable defining the path
156 # to be searched for .bst files (e.g. BSTINPUT).
157 #
158 # BST_INPUT_PATH the fallback path to be searched for .bst files
159 # (e.g. e:/usr/latex/bibtex;e:/emtex/bibtex/bst).
160 #
161 # CSF_ENVVAR the name of the environment variable defining the path
162 # to be searched for .csf files (e.g. CSFINPUT).
163 #
164 # CSF_INPUT_PATH the fallback path to be searched for .csf files
165 # (e.g. e:/usr/latex/bibtex;e:/emtex/bibtex/csf).
166 #
167 # CSF_FILE_ENVVAR the name of the environment variable defining the
168 # fallback CS file (e.g. BIBTEX_CSFILE).
169 #
170 # CSF_FILE_NAME the name of the fallback CS file to be used if one is
171 # not specified on the command line and the above-named
172 # environment variable is not defined (e.g. cp850lat.csf).
173 #-----------------------------------------------------------------------------
174 AUX_INPUT_ENVVAR =
175 AUX_INPUT_PATH =
176
177 BIB_INPUT_ENVVAR = BIBINPUT
178 BIB_INPUT_PATH = c:/emtex/bibtex/bib
179
180 BST_INPUT_ENVVAR = BSTINPUT
181 BST_INPUT_PATH = c:/emtex/bibtex/bst
182
183 CSF_INPUT_ENVVAR = CSFINPUT
184 CSF_INPUT_PATH = c:/emtex/bibtex/csf
185
186 CSF_FILE_ENVVAR = BIBTEX_CSFILE
187 CSF_FILE_NAME = cp850lat.csf
188
189
190 #-----------------------------------------------------------------------------
191 # UTILITY PROGRAMS
192 #
193 # MAKE the command used to invoke Make to process this file.
194 # As distributed, it is defined as "make -f os2.mak"
195 #
196 # RM rm program that won't complain (e.g. /bin/rm -f) if a
197 # file is missing
198 #-----------------------------------------------------------------------------
199 MAKE = make -f os2.mak
200 RM = -DEL
201
202
203 #-----------------------------------------------------------------------------
204 # COMPILER/LINKER
205 #
206 # CC the command used to invoke the C compiler
207 # CFLAGS compiler command line flags to be used
208 # CCDEFINES symbols to be #defined when compiling
209 #
210 # LD the command used to invoke the linker
211 # LDFLAGS linker command line flags to be used
212 # LDLIBS linker command line option to search the specified
213 # library files
214 #
215 # DJGPP/GNU C compiler
216 #
217 # Compiling: gcc -DMSDOS -Wall -Wconversion -Wno-char-subscripts
218 # -funsigned-char -c BIBTEX.C
219 #
220 # -DMSDOS we're building for MSDOS
221 # -Wall generate lots of warnings
222 # -Wconversion warn about suspicious type conversions
223 # -Wno-char-subscripts don't moan about character type subscripts
224 # -funsigned-char unsigned chars
225 # -c compile only
226 #
227 # Linking: gcc BIBTEX.O BIBTEX-1.O -o BIBTEX.EXE
228 #
229 # -o BIBTEX.EXE produce executable BIBTEX.EXE
230 #
231 #-----------------------------------------------------------------------------
232 CC = gcc
233 CFLAGS = -c -DMSDOS -Wall -Wno-char-subscripts -funsigned-char
234 CCDEFINES =
235 LD = gcc
236 LDFLAGS = -o $@
237 LDLIBS =
238
239 ##############################################################################
240 ##############################################################################
241 #
242 # End of local definitions. You shouldn't need to change anything below.
243 #
244 ##############################################################################
245 ##############################################################################
246
247
248 ##############################################################################
249 # File types and default rule for compilation
250 ##############################################################################
251 BIBTEX_DEFINES = -DSUPPORT_8BIT \
252 -DAUX_INPUT_ENVVAR=\"$(AUX_INPUT_ENVVAR)\" \
253 -DAUX_INPUT_PATH=\"$(AUX_INPUT_PATH)\" \
254 -DBIB_INPUT_ENVVAR=\"$(BIB_INPUT_ENVVAR)\" \
255 -DBIB_INPUT_PATH=\"$(BIB_INPUT_PATH)\" \
256 -DBST_INPUT_ENVVAR=\"$(BST_INPUT_ENVVAR)\" \
257 -DBST_INPUT_PATH=\"$(BST_INPUT_PATH)\" \
258 -DCSF_INPUT_ENVVAR=\"$(CSF_INPUT_ENVVAR)\" \
259 -DCSF_INPUT_PATH=\"$(CSF_INPUT_PATH)\" \
260 -DCSF_FILE_ENVVAR=\"$(CSF_FILE_ENVVAR)\" \
261 -DCSF_FILE_NAME=\"$(CSF_FILE_NAME)\"
262
263 EXE = .exe
264 O = .o
265 OUT = .out
266
267 .SUFFIXES: .c .h $(O) $(OUT) $(EXE)
268
269 .c.o:
270 $(CC) $(CFLAGS) $(BIBTEX_DEFINES) $*.c
271
272
273 ##############################################################################
274 # Target Groupings
275 ##############################################################################
276 HDRFILES = bibtex.h datatype.h gblprocs.h gblvars.h sysdep.h \
277 getopt.h utils.h version.h
278
279 OBJFILES = bibtex$(O) \
280 bibtex-1$(O) bibtex-2$(O) bibtex-3$(O) bibtex-4$(O) \
281 getopt$(O) getopt1$(O) utils$(O)
282
283 EXEFILES = bibtex$(EXE)
284
285
286 ##############################################################################
287 # Top level targets
288 ##############################################################################
289 make:
290 @ echo You must specify what to make.
291 @ echo .
292 @ echo For example: $(MAKE) bibtex
293 @ echo .
294 @ echo Valid system targets are:
295 @ echo .
296 @ echo clean - delete $(O) files
297 @ echo veryclean - delete $(O) and $(EXE) files
298 @ echo .
299 @ echo bibtex - DJGPP/GNU C for DOS
300
301 clean:
302 @ echo Cleaning up ...
303 $(RM) bibtex$(O)
304 $(RM) bibtex-1$(O)
305 $(RM) bibtex-2$(O)
306 $(RM) bibtex-3$(O)
307 $(RM) bibtex-4$(O)
308 $(RM) getopt$(O)
309 $(RM) getopt1$(O)
310 $(RM) utils$(O)
311 $(RM) bibtex$(OUT)
312
313 veryclean: clean
314 @ echo Really cleaning up ...
315 $(RM) bibtex$(EXE)
316
317 bibtex: $(EXEFILES)
318 @ echo BibTeX built
319
320
321 ##############################################################################
322 # Dependencies for executables.
323 ##############################################################################
324 bibtex$(EXE): bibtex$(OUT)
325 strip bibtex$(OUT)
326 coff2exe bibtex$(OUT)
327
328 bibtex$(OUT): $(OBJFILES)
329 $(LD) $(OBJFILES) $(LDFLAGS)
330
331
332 ##############################################################################
333 # Dependencies for object files
334 ##############################################################################
335 bibtex$(O): bibtex.c $(HDRFILES)
336
337 bibtex-1$(O): bibtex-1.c $(HDRFILES)
338
339 bibtex-2$(O): bibtex-2.c $(HDRFILES)
340
341 bibtex-3$(O): bibtex-3.c $(HDRFILES)
342
343 bibtex-4$(O): bibtex-4.c $(HDRFILES)
344
345 getopt$(O): getopt.c getopt.h
346
347 getopt1$(O): getopt1.c getopt.h
348
349 utils$(O): utils.c $(HDRFILES)