Codebase list bsdowl / ed5d14d
Add support for bibtex Michael Grünewald 9 years ago
8 changed file(s) with 185 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
1818 SUBDIR+= test_graphicx
1919 SUBDIR+= test_metapost
2020 SUBDIR+= test_complex
21 SUBDIR+= test_bibtex
2122
2223 .include "subdir.mk"
2324
0 ### Makefile -- Test bibtex support
1
2 # Author: Michael Grünewald
3 # Date: Thu Nov 27 09:33:31 CET 2014
4
5 # BSD Owl Scripts (https://github.com/michipili/bsdowl)
6 # This file is part of BSD Owl Scripts
7 #
8 # Copyright © 2005–2014 Michael Grünewald
9 #
10 # This file must be used under the terms of the CeCILL-B.
11 # This source file is licensed as described in the file COPYING, which
12 # you should have received as part of this distribution. The terms
13 # are also available at
14 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt
15
16 TEST= TestBibtex
17
18 .include "test.mk"
19
20 ### End of file `Makefile'
0 ### TestBibtex.mk -- Test bibtex support
1
2 # Author: Michael Grünewald
3 # Date: Thu Nov 27 09:34:30 CET 2014
4
5 # BSD Owl Scripts (https://github.com/michipili/bsdowl)
6 # This file is part of BSD Owl Scripts
7 #
8 # Copyright © 2005–2014 Michael Grünewald
9 #
10 # This file must be used under the terms of the CeCILL-B.
11 # This source file is licensed as described in the file COPYING, which
12 # you should have received as part of this distribution. The terms
13 # are also available at
14 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt
15
16 DOCUMENT= withbibtex.tex
17 TEXDEVICE= pdf
18 USES+= bibtex
19
20 test:
21 test -f ${DESTDIR}${DOCDIR}/withbibtex.pdf
22
23 .include "latex.doc.mk"
24
25 ### End of file `TestBibtex.mk'
0 %%% references.bib -- A short bibliographic database
1
2 % Author: Michael Grünewald
3 % Date: Thu Nov 27 10:11:37 CET 2014
4
5 % BSD Owl Scripts (https://github.com/michipili/bsdowl)
6 % This file is part of BSD Owl Scripts
7 %
8 % Copyright © 2005–2014 Michael Grünewald
9 %
10 % This file must be used under the terms of the CeCILL-B.
11 % This source file is licensed as described in the file COPYING, which
12 % you should have received as part of this distribution. The terms
13 % are also available at
14 % http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt
15
16 @book {TEXBOOK,
17 AUTHOR = {Knuth, Donald E.},
18 TITLE = {The {\TeX book}},
19 PUBLISHER = {Addison-Wesley},
20 YEAR = {1984}
21 }
22
23 %%% End of file `references.bib'
0 %%% withbibtex.tex -- A LaTeX document using bibtex
1
2 % Author: Michael Grünewald
3 % Date: Thu Nov 27 09:35:52 CET 2014
4
5 % BSD Owl Scripts (https://github.com/michipili/bsdowl)
6 % This file is part of BSD Owl Scripts
7 %
8 % Copyright © 2005–2014 Michael Grünewald
9 %
10 % This file must be used under the terms of the CeCILL-B.
11 % This source file is licensed as described in the file COPYING, which
12 % you should have received as part of this distribution. The terms
13 % are also available at
14 % http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt
15
16 \documentclass{amsbook}
17 \begin{document}
18 A {\LaTeX} document using {bib\TeX} and using a reference to the
19 \emph{\TeX book}~\cite{TEXBOOK}.
20 \backmatter
21 \bibliographystyle{plain}
22 \bibliography{references}
23 \end{document}
24
25 %%% End of file `withbibtex.tex'
2222 FILES+= texmf.build.mk
2323 FILES+= texmf.mpost.mk
2424 FILES+= texmf.draft.mk
25 FILES+= texmf.bibtex.mk
2526
2627 FILES+= tex.doc.mk
2728 FILES+= latex.doc.mk
2930
3031 OBSOLETE+= tex.files.mk
3132 OBSOLETE+= tex.files.main.mk
32 OBSOLETE+= latex.bibtex.mk
3333
3434 .include "project.mk"
3535
4747 ) && ${ECHO} 'Everything seems in order'
4848
4949 .include "texmf.build.mk"
50 .include "texmf.bibtex.mk"
5051 .include "texmf.mpost.mk"
5152 .include "texmf.depend.mk"
5253 .include "texmf.clean.mk"
0 ### texmf.bibtex.mk -- Support BibTeX
1
2 # Author: Michael Grünewald
3 # Date: Thu Nov 27 09:18:45 CET 2014
4
5 # BSD Owl Scripts (https://github.com/michipili/bsdowl)
6 # This file is part of BSD Owl Scripts
7 #
8 # Copyright © 2005–2014 Michael Grünewald
9 #
10 # This file must be used under the terms of the CeCILL-B.
11 # This source file is licensed as described in the file COPYING, which
12 # you should have received as part of this distribution. The terms
13 # are also available at
14 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt
15
16 # Variables:
17 #
18 #
19 # BSTINPUTS
20 # Lookup path for bibiliography styles
21 #
22 #
23 # BIBINPUTS
24 # Lookup path for bibliography databases
25 #
26 #
27 # BIBTEX
28 # Our bibtex command
29
30 # Uses:
31 #
32 #
33 # bibtex: no argument
34 # Require the use of bibtex
35
36 .if !defined(THISMODULE)
37 .error texmf.bibtex.mk cannot be included directly.
38 .endif
39
40
41 .if !target(__<texmf.bibtex.mk>__)
42 __<texmf.bibtex.mk>__:
43
44 BIBTEX?= bibtex
45
46 .if "${.OBJDIR}" != "${.CURDIR}"
47 BSTINPUTS+= ${.CURDIR}
48 BIBINPUTS+= ${.CURDIR}
49 .endif
50
51
52 .if defined(BSTINPUTS)
53 _BIBTEX_ENV+= BSTINPUTS='.:${BSTINPUTS:tW:S@ @:@g}:'
54 .endif
55
56 .if defined(BIBINPUTS)
57 _BIBTEX_ENV+= BIBINPUTS='.:${BIBINPUTS:tW:S@ @:@g}:'
58 .endif
59
60 .if !empty(_BIBTEX_ENV)
61 _BIBTEX_TOOL= ${ENVTOOL} ${_BIBTEX_ENV} ${BIBTEX}
62 .else
63 _BIBTEX_TOOL= ${BIBTEX}
64 .endif
65
66
67 .if !empty(_USES_OPTIONS:Mbibtex)
68 .for document in ${_TEX_DOCUMENT}
69 .for device in dvi pdf
70 ${COOKIEPREFIX}${document:T}.${device}.toc: ${COOKIEPREFIX}${document:T}.${device}.bib
71 ${COOKIEPREFIX}${document:T}.${device}.bib: ${COOKIEPREFIX}${document:T}.${device}.aux ${SRCS.${document:T}}
72 ${INFO} 'Processing bibliography database information for ${document:T}'
73 ${_BIBTEX_TOOL} ${document:T:R}
74 @${TOUCH} ${.TARGET}
75 HARDCOOKIEFILES+= ${COOKIEPREFIX}${document:T}.${device}.bib
76 REALCLEANFILES+= ${document:R}.bbl
77 CLEANFILES+= ${document:R}.blg
78 .endfor
79 .endfor
80 .endif
81
82 .endif # !target(__<texmf.bibtex.mk>__)
83
84 ### End of file `texmf.bibtex.mk'