Debian Codegraph @

AutoConf/makefile.in

raw ◀ ▶
Source reconstructed at patch state 0 of 4 — not the installed (fully patched) source.
4 Debian patches touch this file
1 # *** makefile ****************************************************************
2 #
3 # This file is part of BibTool.
4 # It is distributed under the GNU General Public License.
5 # See the file COPYING for details.
6 #
7 # (c) 1996-2020 Gerd Neugebauer
8 #
9 # Net: [email protected]
10 #
11 # This program is free software; you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License as published by
13 # the Free Software Foundation; either version 2, or (at your option)
14 # any later version.
15 #
16 # This program is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 # GNU General Public License for more details.
20 #
21 # You should have received a copy of the GNU General Public License
22 # along with this program; if not, write to the Free Software
23 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 #
25 # *****************************************************************************
26
27 # Look also in the file include/bibtool/config.h for additional
28 # configuration parameters.
29 # Read the file INSTALL for explanation.
30 # =============================================================================
31
32 # This is the generic makefile for BibTool.
33 # Especially it can be used on Unix systems and as a basis for
34 # systems not directly mentioned in the distribution.
35
36 # =============================================================================
37 # Configuration Section
38 # =============================================================================
39 #
40 prefix = @prefix@
41 exec_prefix = @exec_prefix@
42 datadir = @datadir@
43 datarootdir = @datarootdir@
44
45 # -------------------------------------------------------
46 # Prefix to be prepended to all installation directories.
47 # Thus it is possible to install in a different location
48 # as the final location. This seems useful for building
49 # RPMs on Linux.
50
51 INSTALLPREFIX =
52
53 # -------------------------------------------------------
54 # Destination directory for make install
55 # This is usually a directory where public executables
56 # are installed.
57
58 BINDIR = @bindir@
59
60 # -------------------------------------------------------
61 # Destination directory for make install.man
62 # This is usually a directory where public man pages
63 # are installed.
64 # Additionally name the section of the man pages to use.
65 # This should be 1 (user commands), l (local), or n (new)
66 #
67 MANDIR = @mandir@
68 MANSECT = 1
69
70 # -------------------------------------------------------
71 # Destination directory for make install.lib
72 # This is usually a directory where public shared files
73 # are installed plus a final BibTool.
74 #
75
76 LIBDIR = @libdir@/BibTool
77
78 #-------------------------------------------------------
79 # Destination directory for make install.include
80 # This is usually a directory where public include files
81 # are installed plus a final `bibtool'.
82 # Note: The include files may contain system specific
83 # code and may not be shared amoung architectures.
84 #
85
86 INCLUDEDIR = @includedir@/bibtool
87
88 # -------------------------------------------------------
89 # Name the C compiler
90 #
91
92 CC = @CC@
93
94 # -------------------------------------------------------
95 # CFLAGS are the flags for the C compiler.
96 # For debugging it should be -g.
97 # For final version you can try to activate
98 # the optimizer with -O or -O2 or whatever
99 # BEWARE: Some C compiler produce erroneous code if the
100 # optimizer is turned on.
101 #
102
103 CFLAGS = @CFLAGS@
104 # CFLAGS = -O
105 # GNU C
106 # CFLAGS = -g -Wall
107 # CFLAGS = -g -Wall -pedantic -Wpointer-arith -Wshadow -Wcast-align
108
109 ##-------------------------------------------------------
110 ## C_INCLUDE are the flags for the C compiler pointing it
111 ## to the location of the header files. Usually this
112 ## does not need any modifications.
113 ##
114
115 C_INCLUDE = -Iinclude
116
117 # -------------------------------------------------------
118 # EXT is the optional extension of the final executable.
119 # Various operating systems have their own ideas about
120 # that.
121 #
122
123 EXT =
124
125 # -------------------------------------------------------
126 # Extension of object files
127 #
128
129 OBJ = .o
130
131 # -------------------------------------------------------
132 # Name some programs
133 #
134 # -------------------------------------------------------
135 # MV is a command to move certain files maybe to other
136 # directories or drives. Only plain files are moved.
137 #
138
139 MV = mv
140
141 # -------------------------------------------------------
142 # RM is a command to remove certain files. It should not
143 # be confused when trying to remove non-existent files.
144 # Only plain files are removed this way.
145 #
146
147 RM = rm -rf
148
149 # -------------------------------------------------------
150 # MAKEDEPEND is a program to find dependencies for
151 # .c and .h files.
152 # Not present on MS-DOS, Atari, Amiga, Next
153
154 MAKEDEPEND = makedepend
155 # MAKEDPEND = gcc -MM
156
157 # -------------------------------------------------------
158 # INSTALL is a program to properly install some files.
159 # Maybe cp should also do this job (on UNIX)
160
161 INSTALL = @INSTALL@
162
163 # -------------------------------------------------------
164 # INSTALL_DATA is a command to install some data files.
165 #
166
167 INSTALL_DATA = @INSTALL_DATA@
168
169 # -------------------------------------------------------
170 # INSTALL_DIR is a command to create a directory if not
171 # already existent. If your install does not support the
172 # -d option you can try to use mkdir instead.
173
174 INSTALL_DIR = ./mkdirchain
175
176 # -------------------------------------------------------
177 # The ranlib program or : for nothing.
178 #
179 RANLIB = @RANLIB@
180
181 # -------------------------------------------------------
182 # The ar program invocation to add files to the archive.
183 #
184 AR = ar r
185
186 # -------------------------------------------------------
187 # PERL is the complete path to an existing perl executable.
188 # Perl 4.* and Perl 5.* are both ok.
189 #
190 PERL = @PERL@
191
192 # -------------------------------------------------------
193 # LINT is a program to check the C source for problems.
194 #
195
196 LINT = lint
197
198 # -------------------------------------------------------
199 # CXREF is a C cross reference program.
200 #
201
202 CXREF = cxref
203
204 # -------------------------------------------------------
205 # Defines to support (non-ANSI) C compilers.
206 # For Solaris 2 you may have to define HAVE_STRING_H
207 # For some versions of Cygwin you may have to define
208 # STD_HEADERS.
209 # For ANSI C compilers they should be empty.
210 # Mostly needed for the GNU regex library.
211 # Include
212 # -DHAVE_STRING_H if your C compiler has string.h
213 # (e.g. on Solaris 2)
214 # Maybe you have to enlarge the
215 # include search path.
216 # -DREGEX_MALLOC if you have NO alloca() library
217 # function
218 # -DHAVE_ALLOCA_H if you need alloca.h for alloca()
219 # -DSTDC_HEADERS if gcc reports conflicting types
220 # for malloc (on Linux?)
221 #
222
223 NON_ANSI_DEFS = @DEFS@
224
225 # -------------------------------------------------------
226 # GNU Regular Expression Library support.
227 # First of all the (sub)directory containing the
228 # necessary files (excluding trailing slash).
229 #
230 # This directory is contained in the BibTool distribution.
231 # I have tried newer versions of this library without
232 # positive results. (Try it if you don't believe me:-)
233 #
234 REGEX_DIR = regex-0.12
235 #
236
237 REGEX_DEF = -DREGEX -I$(REGEX_DIR) -I..
238
239 REGEX = regex$(OBJ)
240
241 # -------------------------------------------------------
242 # Kpathsea Library support.
243 # This library provides means to specify a search path
244 # with recursive search in subdirectories.
245 # The library is NOT contained in the BibTool distribution.
246 # This routines are expected to work with Kpathsea-2.6 or
247 # above.
248 #
249 # See the file INSTALL for details.
250 #
251 # Kpathsea is not known to work yet on anything else but
252 # Unix platforms.
253 # This item is purely experimental.
254 # Maybe you are better off not trying it!
255 #
256 # The value of KPATHSEA_DIR is the directory containing
257 # the distribution of kpathsea. I.e. the directory
258 # containing the subdirectory kpathsea.
259 # The value of KPATHSEA is the name of the kpathsea library.
260 # if kpathsea should not be used then it has to be empty.
261 # The value of KPATHSEA_DEF are the additional flags for the
262 # C compiler. It should arrange things that the macro
263 # KPATHSEA is defined and the directory beneath kpathsea
264 # is in the include search path.
265
266 KPATHSEA_DIR = @kpathsea_dir@
267 KPATHSEA = @kpathsea_lib@
268 KPATHSEA_STATIC = @kpathsea_lib_static@
269 KPATHSEA_DEF = @kpathsea_def@
270
271 # -------------------------------------------------------
272 # Default search paths
273 # The values are NULL or a string containing a colon
274 # separated list of directories.
275 # DON'T FORGET THE CURRENT DIRECTORY!
276 #
277 # The character ENV_SEP separates the directories in
278 # environment search paths.
279 #
280
281 BIBINPUTS_DEFAULT = NULL
282 BIBTOOL_DEFAULT = \".:$(LIBDIR)\"
283 ENV_SEP = \":\"
284
285 # -------------------------------------------------------
286 # Declare the file naming conventions.
287 # FILE_TYPES contains optionally a macro definition
288 # determining the file naming conventions.
289 # -DMS-DOS denotes MSDOG-like file names. (Also for Atari)
290 # -DAMIGA denotes the Amiga file names.
291 # The default (empty) are UN*X-like file names.
292 #
293 # DIR_SEP is the directory-file separator.
294
295 FILE_TYPES =
296 DIR_SEP = /
297
298 # =============================================================================
299 # End of Configuration Section
300 # =============================================================================
301
302 MAKEFILE = makefile
303
304 SHELL = /bin/sh
305
306 RSC_DEF = -DRSC_BIBINPUTS_DEFAULT=$(BIBINPUTS_DEFAULT) \
307 -DRSC_BIBTOOL_DEFAULT=$(BIBTOOL_DEFAULT) \
308 -DENV_SEP=$(ENV_SEP)
309
310 DONT_LINK = -c
311 LINK_TO = -o
312 STANDALONE = -DSTANDALONE
313
314 C_FLAGS = $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) $(C_INCLUDE) $(FILE_TYPES)
315 LD_FLAGS = $(LDFLAGS)
316
317 CFILES = main.c \
318 $(CLIBFILES)
319 CLIBFILES = check.c \
320 crossref.c \
321 database.c \
322 entry.c \
323 error.c \
324 expand.c \
325 init.c \
326 io.c \
327 key.c \
328 macros.c \
329 names.c \
330 parse.c \
331 print.c \
332 pxfile.c \
333 record.c \
334 rewrite.c \
335 rsc.c \
336 s_parse.c \
337 symbols.c \
338 stack.c \
339 sbuffer.c \
340 tex_aux.c \
341 tex_read.c \
342 type.c \
343 version.c \
344 wordlist.c
345
346 HPATH = include${DIR_SEP}bibtool${DIR_SEP}
347 HFILES = config.h \
348 ${HPATH}check.h \
349 ${HPATH}crossref.h \
350 ${HPATH}database.h \
351 ${HPATH}bibtool.h \
352 ${HPATH}config.h \
353 ${HPATH}entry.h \
354 ${HPATH}error.h \
355 ${HPATH}expand.h \
356 ${HPATH}general.h \
357 ${HPATH}init.h \
358 ${HPATH}io.h \
359 ${HPATH}key.h \
360 ${HPATH}keynode.h \
361 ${HPATH}macros.h \
362 ${HPATH}names.h \
363 ${HPATH}parse.h \
364 ${HPATH}print.h \
365 ${HPATH}pxfile.h \
366 ${HPATH}regex.h \
367 ${HPATH}record.h \
368 ${HPATH}resource.h \
369 ${HPATH}rewrite.h \
370 ${HPATH}rsc.h \
371 ${HPATH}s_parse.h \
372 ${HPATH}sbuffer.h \
373 ${HPATH}stack.h \
374 ${HPATH}symbols.h \
375 ${HPATH}tex_aux.h \
376 ${HPATH}tex_read.h \
377 ${HPATH}type.h \
378 ${HPATH}version.h \
379 ${HPATH}wordlist.h
380
381 OFILES = main$(OBJ) \
382 $(OLIBFILES)
383 OLIBFILES = check$(OBJ) \
384 crossref$(OBJ) \
385 database$(OBJ) \
386 entry$(OBJ) \
387 error$(OBJ) \
388 expand$(OBJ) \
389 init$(OBJ) \
390 io$(OBJ) \
391 key$(OBJ) \
392 macros$(OBJ) \
393 names$(OBJ) \
394 parse$(OBJ) \
395 print$(OBJ) \
396 pxfile$(OBJ) \
397 record$(OBJ) \
398 rewrite$(OBJ) \
399 rsc$(OBJ) \
400 s_parse$(OBJ) \
401 symbols$(OBJ) \
402 stack$(OBJ) \
403 sbuffer$(OBJ) \
404 tex_aux$(OBJ) \
405 tex_read$(OBJ) \
406 type$(OBJ) \
407 version$(OBJ) \
408 wordlist$(OBJ)
409
410 DOCFILES = doc$(DIR_SEP)bibtool.1 \
411 doc$(DIR_SEP)bibtool.tex \
412 doc$(DIR_SEP)bibtool.bib \
413 doc$(DIR_SEP)bibtool.ist \
414 doc$(DIR_SEP)bibtool-doc.sty \
415 doc$(DIR_SEP)ref_card.tex \
416 doc$(DIR_SEP)Makefile \
417 doc$(DIR_SEP)config.tex \
418 doc$(DIR_SEP)c_main.tex \
419 doc$(DIR_SEP)c_lib.tex \
420 doc$(DIR_SEP)c.tex \
421 doc$(DIR_SEP)c_get.pl \
422 doc$(DIR_SEP)make_version.pl
423
424 LIBFILES = lib$(DIR_SEP)biblatex.rsc \
425 lib$(DIR_SEP)braces.rsc \
426 lib$(DIR_SEP)check_y.rsc \
427 lib$(DIR_SEP)default.rsc \
428 lib$(DIR_SEP)field.rsc \
429 lib$(DIR_SEP)improve.rsc \
430 lib$(DIR_SEP)iso2tex.rsc \
431 lib$(DIR_SEP)keep_bibtex.rsc \
432 lib$(DIR_SEP)keep_biblatex.rsc \
433 lib$(DIR_SEP)month.rsc \
434 lib$(DIR_SEP)opt.rsc \
435 lib$(DIR_SEP)sort_fld.rsc \
436 lib$(DIR_SEP)tex_def.rsc
437
438 PROGFILES = Perl$(DIR_SEP)bibtool.pl \
439 Tcl$(DIR_SEP)bibtool.tcl
440 ETCFILES = README.md \
441 install.tex \
442 COPYING \
443 Changes.tex \
444 makefile.unx \
445 makefile.dos \
446 makefile.ata \
447 makefile.ami \
448 ToDo \
449 THANKS \
450 pxfile.man \
451 sbuffer.man \
452 $(MSDOS_targets) \
453 $(PROGFILES)
454
455 DISTFILES = $(ETCFILES) \
456 $(CFILES) \
457 $(HFILES) \
458 $(LIBFILES) \
459 $(DOCFILES) \
460 $(REGEX_DIR)
461 # -----------------------------------------------------------------------------
462 # The main target
463 # -----------------------------------------------------------------------------
464
465 default all: bibtool$(EXT)
466
467 bibtool$(EXT): $(OFILES) $(REGEX) $(KPATHSEA_STATIC)
468 $(CC) $(LD_FLAGS) $(C_FLAGS) $(LINK_TO) $@ $(OFILES) $(REGEX) $(KPATHSEA) $(KPATHSEA_STATIC)
469
470 tex_read$(EXT): tex_read.c
471 $(CC) $(LD_FLAGS) $(C_FLAGS) $(STANDALONE) tex_read.c $(LINK_TO) tex_read$(EXT)
472
473 tex_aux$(OBJ): tex_aux.c
474 $(CC) $(C_FLAGS) $(REGEX_DEF) $(DONT_LINK) tex_aux.c -o tex_aux$(OBJ)
475
476 main$(OBJ): main.c
477 $(CC) $(C_FLAGS) $(REGEX_DEF) $(KPATHSEA_DEF) $(DONT_LINK) main.c
478
479 init$(OBJ): init.c
480 $(CC) $(C_FLAGS) $(KPATHSEA_DEF) $(DONT_LINK) init.c
481
482 parse$(OBJ): parse.c
483 $(CC) $(C_FLAGS) $(KPATHSEA_DEF) $(DONT_LINK) parse.c -o parse$(OBJ)
484
485 rewrite$(OBJ): rewrite.c
486 $(CC) $(C_FLAGS) $(REGEX_DEF) $(DONT_LINK) rewrite.c -o rewrite$(OBJ)
487
488 rsc$(OBJ): rsc.c
489 $(CC) $(C_FLAGS) $(RSC_DEF) $(DONT_LINK) rsc.c -o rsc$(OBJ)
490
491 .c$(OBJ):
492 $(CC) $(C_FLAGS) $(DONT_LINK) -c $< -o $@
493
494 # __________________________________________________________________
495 # Include the makefile into the dependencies to force updates
496 # when the makefile is modified.
497
498 $(OFILES): $(MAKEFILE)
499
500 # __________________________________________________________________
501 # Targets from the GNU Regular Expression Library.
502
503 regex$(OBJ): $(REGEX_DIR)$(DIR_SEP)regex.c $(MAKEFILE)
504 $(CC) $(C_FLAGS) -I$(REGEX_DIR) -I.. $(NON_ANSI_DEFS) $(REGEX_DIR)$(DIR_SEP)regex.c $(DONT_LINK) -o $@
505
506
507 bibtcl:
508 cd BibTcl && $(MAKE) $(MFLAGS)
509
510 # -----------------------------------------------------------------------------
511 # General development targets
512 # -----------------------------------------------------------------------------
513
514 CLEAN_TARGETS = *$(OBJ) xref *.bak core #* *~
515
516 clean mostlyclean:
517 -cd doc && $(MAKE) $(MFLAGS) clean
518 -cd test && $(MAKE) $(MFLAGS) clean
519 -cd BibTcl && $(MAKE) $(MFLAGS) clean
520 -$(RM) $(CLEAN_TARGETS)
521
522 veryclean distclean realclean extraclean: clean
523 -cd doc && $(MAKE) $(MFLAGS) distclean
524 -cd test && $(MAKE) $(MFLAGS) distclean
525 -$(RM) bibtool config.cache config.status config.log makefile
526
527 doc: d-o-c
528 d-o-c:
529 cd doc; $(MAKE) $(MFLAGS) DIR_SEP=$(DIR_SEP)
530
531 info:
532
533 test check: Test
534 Test:
535 (cd test; $(MAKE))
536
537 libbibtool.a: $(OLIBFILES)
538 $(AR) $@ $(OLIBFILES) regex.o
539 $(RANLIB) $@
540
541 depend:
542 -$(MAKEDEPEND) -fmakefile -DMAKEDEPEND -Iinclude $(CFILES)
543
544 install: install.bin install.lib
545
546 install.bin install-exec: bibtool$(EXT)
547 -$(INSTALL_DIR) $(INSTALLPREFIX)$(BINDIR)
548 $(INSTALL) bibtool$(EXT) $(INSTALLPREFIX)$(BINDIR)
549
550 INSTALL_LIB_FILES = lib$(DIR_SEP)*.*
551
552 install.lib install-data:
553 -$(INSTALL_DIR) $(INSTALLPREFIX)$(LIBDIR)
554 for lib in $(INSTALL_LIB_FILES); do \
555 $(INSTALL_DATA) $$lib $(INSTALLPREFIX)$(LIBDIR); \
556 done
557
558 INSTALL_INCLUDE_FILES = $(HFILES)
559
560 install.include install-include:
561 -$(INSTALL_DIR) $(INSTALLPREFIX)$(INCLUDEDIR)
562 for inc in $(INSTALL_INCLUDE_FILES); do \
563 $(INSTALL_DATA) $$inc $(INSTALLPREFIX)$(INCLUDEDIR); \
564 done
565
566 install.man install-man:
567 -$(INSTALL_DIR) $(INSTALLPREFIX)$(MANDIR)$(DIR_SEP)man$(MANSECT)
568 $(INSTALL) doc$(DIR_SEP)bibtool.1 \
569 $(INSTALLPREFIX)$(MANDIR)$(DIR_SEP)man$(MANSECT)$(DIR_SEP)bibtool.$(MANSECT)
570
571 uninstall: uninstall.bin uninstall.lib
572
573 uninstall.bin uninstall-exec:
574 -$(RM) $(INSTALLPREFIX)$(BINDIR)$(DIR_SEP)bibtool$(EXT)
575
576 uninstall.lib uninstall-data:
577 -$(RM) $(INSTALLPREFIX)$(LIBDIR)
578
579 uninstall.include uninstall-include:
580 -$(RM) $(INSTALLPREFIX)$(INCLUDEDIR)
581
582 uninstall.man uninstall-man:
583 -$(RM) $(INSTALLPREFIX)$(MANDIR)$(DIR_SEP)man$(MANSECT)$(DIR_SEP)bibtool.$(MANSECT)
584
585 status:
586 @echo $(LIBDIR)
587
588 # =============================================================================
589 # DO NOT DELETE THIS LINE -- make depend depends on it.