Debian Codegraph @

install.tex

raw
1 %%*** install.tex **************************************************************
2 %%
3 %% This file is part of BibTool.
4 %% It is distributed under the Creative Commons Attribution-Share
5 %% Alike 3.0 License.
6 %%
7 %% (c) 2010-2020 Gerd Neugebauer
8 %%
9 %% Net: [email protected]
10 %%
11 %%*****************************************************************************
12 \documentclass[11pt,a4paper]{scrartcl}
13
14 \usepackage{hyperref}
15
16 \newcommand\code[1]{\texttt{#1}}
17 \newcommand\file[1]{\textsf{#1}}
18
19 \newcommand\BS{\(\backslash\)}
20
21 \newcommand\BibTool{\textsc{Bib\hskip-.1em\-%
22 \mbox{T\hskip-.15emo\hskip-.05emo\hskip-.05eml}}}
23 \newcommand\BibTeX{\textrm{B\kern-.05em{\textsc{i\kern-.025em b}}\kern-.08em
24 T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
25
26 \date{}
27
28 \begin{document}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
29
30 \title{\BibTool{} Installation}
31 \author{Gerd Neugebauer}
32 \maketitle
33
34 \BibTeX{} provides an easy to use means to integrate citations and
35 bibliographies into \LaTeX{} documents. But the user is left alone
36 with the management of the \BibTeX{} files. The program BibTool is
37 intended to fill this gap. \BibTool{} allows the manipulation of
38 \BibTeX{} files which goes beyond the possibilities -- and intentions
39 --- of \BibTeX. The possibilities of \BibTool{} include
40
41 \begin{itemize}
42
43 \item Pretty-printing \BibTeX{} data bases adjustable by lots of
44 parameters.
45
46 \item Syntactic checks with error recovery superior to \BibTeX{} and
47 helpful error messages.
48
49 \item Semantic checks can be specified by the user.
50
51 \item Sorting and merging of \BibTeX{} data bases according to a free
52 definable sort key.
53
54 \item Generation of uniform reference keys according to predefined
55 rules or according to an own specification.
56
57 \item Selecting references used in one publication which are found by
58 analyzing an .aux file.
59
60 \item Selecting references by a set of criteria (regular expressions).
61
62 \item Controlled rewriting of fields utilizing regular expressions to
63 specify the rewriting rules.
64
65 \item Macro (String) expansion to eliminate the need of extra string
66 definitions.
67
68 \item Collecting statistics about one or more \BibTeX{} data bases.
69 \end{itemize}
70
71 \BibTool{} contains a documentation written in \LaTeX{} of more than
72 75 pages (and still growing).
73
74 \BibTool{} is written in C and has been compiled on various operating
75 systems like flavors of UN*X and MSDOG machines. It is distributed in
76 source code. No compiled versions are available from the author
77 (Useless to ask!).
78
79 \BibTool{} can be obtained from the CTAN archives:
80
81 \begin{itemize}
82 \item
83 \url{http://www.ctan.org/tex-archive/biblio/bibtex/utils/bibtool}
84 \end{itemize}
85
86 Get the file BibTool-x.xx.tar.gz where x.xx is the version number.
87 Unpack it with the command (on UN*X)
88
89 \begin{verbatim}
90 gunzip < BibTool-x.xx.tar.gz | tar -xvf -
91 \end{verbatim}
92
93 It will create a directory named BibTool which contains this
94 installation instructions in the file \file{install.tex}. So just read
95 on.
96
97 %This file contains instructions and hints for the compilation of \BibTool{}.
98 \newpage
99 \tableofcontents
100 \newpage
101
102 \section{Introduction}
103
104 \BibTool{} is known to work on the following operating systems/C
105 compilers: (At least an earlier version has been compiled successfully
106 on them.)
107
108 \begin{description}
109 \item[Debian] gcc
110 \item[CentOS] gcc
111 \item[Ubuntu] gcc
112 \item[SuSE] gcc
113 \item[Windows XP/Cygwin] gcc
114 \item[Windows 7/Cygwin 1.7] gcc
115 \item[SparcStation/Solaris2.4] gcc
116 \item[Sun4/SunOS4.1.*] cc, gcc
117 \item[Sun3/SunOS4.1.1] cc
118 \item[HP 9000/4??/HP UX ??] cc
119 \item[Atari ST/TOS 1.2] Laser C, Pure C
120 \end{description}
121
122 I have been informed that \BibTool{} has been compiled on the
123 following machines/operating systems (and maybe some more that I have
124 forgotten to add to this list;-):
125
126 \begin{description}
127 \item[gentoo] gcc
128 \item[OS X Mavericks]
129 \item[OS X Sierra version 10.12.5]
130 \item[AIX 3.2.5] gcc
131 \item[AIX 4.1.4]
132 \item[Amiga] SAS/C
133 \item[DEC Alpha/OSF/1]
134 \item[HP 9000/778/HP-UX 10.20] gcc 2.7.2.3
135 \item[MIPS/Ultrix4.4] gcc 2.4.5
136 \item[MIPS/RISCos 4.52] gcc
137 \item[MSDOS,OS/2,Win32,WinNT] emx, dj, Watcom C, MSC
138 \item[MS-Windows 4.0, Sp 6] Cygwin
139 \item[IBM PC] 486DX2-66, OS/2 Merlin 4.0 FixPack \#5. EMX v.0.9c+GCC+dmake 4.0
140 \item[NeXT]
141 \item[SGI Indigo2/IRIX 6.2] cc
142 \item[Windows XP 32 bits] MinGW with GCC 4.6.1
143 \item[Windows 7] Cygwin 1.7 with gcc
144 \item[Windows 7] MinGW with gcc 4.8.1
145 \end{description}
146
147 If you compile \BibTool{} on other systems drop me a mail. I'm
148 interested to support a broad variety of systems/compilers.
149
150 \begin{quote}
151 Gerd Neugebauer\\
152 Im Lerchelsb\"ohl 5\\
153 64521 Gro\ss-Gerau (Germany)
154
155 Net: \url{mailt:[email protected]}
156 \end{quote}
157
158 You can also send me a mail if you encounter problems in compiling
159 \BibTool{}, or crashes, or shows unexpected (contradicting the
160 documentation) behavior of the final program.
161
162 Please enclose a precise description what went wrong. Include the
163 version numbers of \BibTool{}, your computer, your operating system,
164 and your C compiler.
165
166 If you encounter unexpected behavior of \BibTool{} enclose your
167 resource file(s) and a \emph{small} \BibTeX{} file demonstrating the
168 problem. Describe how you have invoked \BibTool{} (arguments) and
169 justify why you think that there is a problem.
170
171 I know that this sounds like work. But otherwise I will not be able
172 to give you proper advice or find a bug in the sources.
173
174
175
176 \section{Binary Distributions}
177
178
179 There exist binary distributions of \BibTool{} for several operating
180 systems. For instance users of Debian based Linux systems can access
181 \BibTool{} via their native package manager.
182
183 Before installing from the sources you might want to check whether the
184 package manager of your system provides a sufficiently recent version
185 of \BibTool.
186
187
188 \section{Prerequisites}
189
190 To install \BibTool{} you need:
191
192 \begin{itemize}
193 \item A C compiler. ANSI-C is not required but highly recommended.
194 Several library functions are expected. You will see if your linker
195 complains.
196 \item A running version of make is recommended.
197 \end{itemize}
198
199
200 \section{Generic Installation Procedure}\label{generic}
201
202 See if there is a special section for your computer/C compiler and
203 follow the instructions given there. Most probably you will be
204 directed back into this section after some initial actions.
205
206 See section~\ref{kpathsea} and see if it applies to your setting.
207
208 To install \BibTool{} you can try to apply the following instructions:
209
210 \begin{enumerate}
211 \item Copy one of the prepared makefiles to \file{makefile} and adjust
212 it according to your C compiler. The following makefiles should be
213 present in the distribution:
214
215 \begin{description}
216 \item[makefile.unx] This is the generic makefile. Especially it is
217 for all UN*X systems and may provide a basis for compilation on
218 systems not explicitly mentioned here.
219 \item[makefile.dos] This is the makefile for MSDOS based machines.
220 \item[makefile.ata] This is the makefile for Atari ST/TT
221 computers.
222 \item[makefile.ami] This is the makefile for Amiga computers (with
223 SAS/C).
224 \end{description}
225
226 Edit the \file{makefile} and adjust the settings in the
227 configuration section according to your needs.
228
229 Maybe you have to adapt the name and options for your C compiler.
230 (Most of the time I prefer the GNU C compiler)
231
232 Maybe you want to change the location for the installation target,
233 even though reasonable defaults are provided.
234
235 \item Look into the file \file{include/bibtool/config.h} to see if it
236 fits your operating system and C compiler. Adjust things as
237 required. Most probably you do not have to change anything in this
238 file. This file is mainly for those with an old C compiler
239 (non-ANSI).
240
241 \item If you want to configure some of the internals of \BibTool{} you
242 can have a look into \file{include/bibtool/bibtool.h.} It contains
243 the internal configuration options which used to be in
244 \file{config.h } prior to release 2.39. Most probably there is no
245 need to change the defaults given there. One exception is the
246 support for another language by specifying additional words to be
247 ignored. (Maybe I could include them into the distribution; thus
248 drop me a mail if you do so)
249
250 \item If you have a working makedepend command run
251 \begin{verbatim}
252 make depend
253 \end{verbatim}
254
255 Otherwise just skip this step. It is only helpful if you compile
256 \BibTool{} more than once.
257
258 This might cause problems if the makedepend command does not fit the
259 C compiler used (e.g. proprietary makedpend together with gcc).
260 This results in unknown files to show up. In this case also skip
261 this step and revert to the original makefile.
262
263 \item Afterwards run
264
265 \begin{verbatim}
266 make
267 \end{verbatim}
268
269 Most probably this should produce the executable \file{bibtool} (or
270 \file{bibtool.exe}, or \file{bibtool.ttp}, or \ldots) in the current
271 directory.
272
273 \item If you have tried the command bibtool in the current directory
274 you can install it with
275
276 \begin{verbatim}
277 make install
278 \end{verbatim}
279
280 to install the executable and the libraries and
281
282 \begin{verbatim}
283 make install.man
284 \end{verbatim}
285
286 to install the UN*X man pages. This is only useful if you can make
287 use of them, i.e. on a UN*X-like system.
288
289 \item To get rid of all intermediate files run
290
291 \begin{verbatim}
292 make clean
293 \end{verbatim}
294
295 \item To prepare the documentation contained in the sub-directory
296 \file{doc} go into the \file{doc} subdirectory and run
297
298 \begin{verbatim}
299 latex bibtool
300 latex bibtool
301 bibtex bibtool
302 makeidx bibtool
303 latex bibtool
304 latex bibtool
305 \end{verbatim}
306
307 \begin{verbatim}
308 latex ref_card
309 latex ref_card
310 bibtex ref_card
311 makeidx ref_card
312 latex ref_card
313 latex ref_card
314 \end{verbatim}
315
316 The makeidx program may be named differently on your system or
317 missing at all. In this case you can omit this step and do without
318 the index.
319
320 On UN*X you can try
321
322 \begin{verbatim}
323 make doc
324 \end{verbatim}
325
326 in the main directory or
327
328 \begin{verbatim}
329 make
330 \end{verbatim}
331
332 in the \file{doc} directory which tries to perform the steps given
333 above.
334
335 The documentation is written in a way that either \LaTeX{} or
336 \LaTeX2.09 can be used to compile it. I had a bug report about a
337 real ancient \LaTeX2.09 and I am not sure I have completely fixed
338 it. Thus the best is to use an up-to-date \LaTeX.
339
340 There might be problems when files produced by \LaTeX2.09 should be
341 read by \LaTeXe{} and vice versa. In this case you can try to
342 remove the intermediate files
343
344 \begin{verbatim}
345 bibtool.toc
346 bibtool.ind
347 \end{verbatim}
348
349 and follow the instruction for making the documentation from the
350 beginning.
351
352 \end{enumerate}
353
354
355 \section{Installation on UNIX}
356
357 Some special preparations have been made for UNIX systems. autoconf scripts
358 are provided which try to find out the characteristics of the system
359 automatically.
360
361 General instructions:
362
363 \begin{enumerate}
364 \item
365 Run the configure script with the command:
366
367 \begin{verbatim}
368 ./configure
369 \end{verbatim}
370
371 The following options are useful for configure:
372
373 \begin{description}
374 \item [--with-kpathsea] try to find the kpathsea library
375 either in the current directory or in the previous directory.
376 Thus you can place the \BibTool{} directory in the same
377 directory where the directory kpathsea resides or you can put
378 the kpathsea directory in in the \BibTool{} directory.
379 (default) (See also section~\ref{kpathsea})
380 \item [--without-kpathsea] disable the search for the kpathsea
381 library.
382 \item [--prefix=PREFIX] install architecture-independent files in
383 PREFIX [/usr/local]
384 \item [--exec-prefix=EPREFIX] install architecture-dependent files
385 in EPREFIX [same as prefix]
386 \item [--bindir=DIR] the bibtool executable is stored in DIR
387 [EPREFIX/bin]
388 \item [--libdir=DIR] the \BibTool{} directory containing certain
389 resource files are stored in DIR [EPREFIX/lib]
390 \item [--mandir=DIR] the manual pages bibtool.1 is stored in DIR
391 [PREFIX/man]
392 \end{description}
393
394 \item
395 Continue with the item C in section \ref{generic}.
396 \end{enumerate}
397
398
399 \section{Installation on MSDOS-like Computers}
400
401 This section some hints on the compilation of \BibTool{} on MSDOS computers.
402 These adaptions are mainly due to the efforts of Josef Spangler
403 ([email protected]). All credits go to him. Any remaining
404 problems should be blamed on my ignorance.
405
406 General instructions:
407
408 \begin{enumerate}
409 \item Copy \file{makefile.dos} to \file{makefile} and adjust it
410 according to your C compiler.
411
412 \item Edit \file{include/bibtool/config.h} and
413 \file{include/bibtool/bibtool.h} to adjust it to your needs.
414 Normally you should be interested only in the support of em\TeX{} at
415 the end of \file{include/bibtool/bibtool.h}.
416
417 \item Copy MSDOS\BS link.* to the source directory.
418
419 \item Depending on the C compiler do the following:
420
421 \begin{itemize}
422 \item dj (GNU C port)
423
424 \begin{verbatim}
425 make dj
426 \end{verbatim}
427
428 \item emx (GNU C port)
429
430 \begin{verbatim}
431 make emx
432 \end{verbatim}
433
434 Maybe you have to set the environment variable EMX to point to the
435 installed EMX directory.
436
437 \item Watcom C 386 (32 Bit Compiler for Dos, OS/2 2.x, Win32 and WinNT)
438
439 \begin{verbatim}
440 make wat
441 \end{verbatim}
442
443 \item Microsoft C 6.00A (16 Bit Dos and OS/2 1.x)
444
445 \begin{verbatim}
446 make msc
447 \end{verbatim}
448
449 \item Borland C++ 3.1 (16 Bit Dos)
450
451 Go and get another compiler.
452 Or, even better do the port and send me the diffs :-)
453 \end{itemize}
454
455 \item
456 If you have tried the command bibtool in the current directory
457 you can install it with
458
459 \begin{verbatim}
460 make install
461 \end{verbatim}
462
463 \item
464 Make the documentation according to step H in section \ref{generic}.
465 \end{enumerate}
466
467
468 \section{Installation on Amiga}
469
470 This section contains some hints on the compilation of \BibTool{} on
471 Amiga computers. These adaptions are mainly due to the efforts of
472 Andreas Scherer ([email protected]). All
473 credits go to him. Any remaining problems should be blamed on my
474 ignorance.
475
476 This section describes the installation procedure if you are using the
477 SAS/C compiler on Amiga.
478
479 General instructions:
480
481 \begin{enumerate}
482 \item Copy \file{makefile.ami} to \file{SMakefile} and adjust it
483 accordingly.
484
485 \item Edit the file \file{include/bibtool/config.h} and
486 \file{include/bibtool/bibtool.h} and adjust it to your needs. There
487 should not be much for you to change.
488
489 \item
490 \begin{verbatim}
491 make
492 \end{verbatim}
493
494 \item
495 If you have tried the command bibtool in the current directory
496 you can install it with
497
498 \begin{verbatim}
499 make install
500 \end{verbatim}
501
502 \item
503 Make the documentation according to step H in section \ref{generic}.
504 \end{enumerate}
505
506
507 \section{Installation without make}
508
509 \begin{enumerate}
510 \item Adjust the settings in the files \file{include/bibtool/config.h}
511 and \file{include/bibtool/bibtool.h} to fit your C compiler and
512 operating system.
513
514 \item Compile all .c files in the base directory. The macros REGEX
515 and maybe MSDOS should be defined. The subdirectory
516 \file{regex-0.12} should be included in the include search path. A
517 typical compile command looks like
518
519 \begin{verbatim}
520 cc main.c -c -o main.o -DREGEX -DMSDOS -Iregex-0.12 -I.
521 \end{verbatim}
522
523 \item Compile \file{regex.c} in the regex-0.12 subdirectory and move
524 the object file into the base directory (The one containing this
525 file).
526
527 \item Link together all object files to get the executable bibtool.
528 (maybe include the kpathsea library; see section \ref{kpathsea})
529
530 \item Run \LaTeX{} on \file{bibtool.tex} in the \file{doc}
531 sub-directory to produce the documentation. (see step H in section
532 \ref{generic} for details)
533 \end{enumerate}
534
535
536 \section{Using the kpathsea library}\label{kpathsea}
537
538 The kpathsea library provides a very flexible way to specify the
539 search path for files. This library is already used by the web2c
540 distribution of Karl Berry and the te\TeX{} distribution. To achieve
541 compatibility with those \TeX{} systems you can try to make \BibTool{}
542 use the same library.
543
544
545 The kpathsea library is currently NOT CONTAINED in the distribution of
546 \BibTool{} since this is an experimental feature. You can get
547 kpathsea from the same location where you got \BibTool{}. Fetch the
548 file \file{kpse2-6.tar.gz} or \file{kpse2-6.zip}.
549
550 Unpack this file. Enter the directory kpse2-6 and use the commands
551 `./configure' and `make' to create the library. This works at least on
552 Unix platforms. For porting to other platforms I would like to get
553 some feedback.
554
555 ATTENTION: The kpathsea library has to exists before \BibTool{} is
556 made!
557
558 If you are using configure then the option \texttt{--with-kpathsea}
559 enables the inclusion of the kpathsea routines if the library is
560 found.
561
562 To use the library you can just provide three definitions in the
563 makefile. See the section about kpathsea in \file{makefile} for
564 explanations. Alternatively you have to provide the appropriate
565 options to the C compiler yourself.
566
567 Note: the searching for \BibTeX{} files with the kpathsea library is
568 different from the \BibTool{} built-in searching. Some resources are
569 no longer taken into account when this library is used.
570
571 Note: kpathsea is only used to search for \BibTeX{} files. All other
572 files are still searched with the traditional \BibTool{} searching
573 mechanism. This might change soon.
574
575
576 \section{Problems and Porting}
577
578 Well, if the procedures described above don't work I have some hints.
579 These hints may also be useful if you plan to port \BibTool{} to other
580 operating systems or C compilers.
581
582 First of all a small list of assumptions that I use.
583
584 \begin{itemize}
585 \item On ANSI systems there should be no problem at all. There is some
586 support for non-ANSI systems. This support can be improved. (I
587 don't know if it's worthwhile to do so).
588
589 \item \BibTool{} has been developed on UN*X (SunOS) and UN*X-like
590 systems (Atari). Such file/directory naming conventions found their
591 way into the code. Single character delimiters between directories
592 and files can be modified in a resource file.
593
594 \item ASCII encoding is assumed. I role my own \file{type.h} instead
595 of using \file{ctypes.h}. This has mainly historical reasons. Maybe
596 this code should be rewritten to be adapted at make time.
597
598 If you port \BibTool{} to a non-ASCII machine the table of
599 characters (allowed[]) in \file{type.h} has to be adapted -- at
600 least (please send me the diffs).
601
602 \item Maybe some BSD-isms found their way into the code even if I am
603 not aware of it.
604 \end{itemize}
605
606
607 \section{The C Interface}
608
609 The C interface to \BibTool{} is described in the document
610 \file{doc/c\_lib.dvi}. To create this document run \LaTeX{} and
611 makeindex on the file \file{c\_lib.tex} in the \file{doca}
612 sub-directory:
613
614 \begin{verbatim}
615 latex c_lib
616 makeindex c_lib
617 latex c_lib
618 latex c_lib
619 \end{verbatim}
620
621 Read this document. I would like some kind of feedback for this attempt.
622
623 Attention: This documentation is experimental. Some things are likely to be
624 changed soon.
625
626
627 \section{ The Tcl/Tk Interface}
628
629 The Tcl/Tk interface is called BibTcl. It is contained in the BibTcl
630 subdirectory. See the file \file{README} in this directory for
631 details.
632
633
634
635 \end{document}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
636 %
637 % Local Variables:
638 % mode: latex
639 % TeX-master: nil
640 % End: