File: Makefile

package info (click to toggle)
bibtool 2.68%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,668 kB
  • sloc: ansic: 11,808; perl: 8,145; makefile: 550; sh: 307; tcl: 51
file content (153 lines) | stat: -rw-r--r-- 3,852 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
##*** Makefile ****************************************************************
## 
## This file is part of BibTool.
## It is distributed under the GNU General Public License.
## See the file COPYING for details.
## 
## (c) 1997-2020 Gerd Neugebauer
## 
## Net: gene@gerd-neugebauer.de
## 
##*****************************************************************************

LATEX     = latex -no-shell-escape -interaction=batchmode
LUALATEX  = lualatex -no-shell-escape -interaction=batchmode
BIBTEX    = bibtex -terse
MAKEINDEX = makeindex -q

LATEX_DMFLAG = -draftmode
LUALATEX_DMFLAG = -draftmode

LATEX_FMFLAG =
LUALATEX_FMFLAG =

DIR_SEP   = /

BIBTOOL_IST = bibtool.ist

.SUFFIXES: .dvi .pdf $(SUFFIXES)

PDFTARGETS = bibtool.pdf ref_card.pdf #c_lib.pdf
DVITARGETS = $(PDFTARGETS:%.pdf=%.dvi)

##-----------------------------------------------------------------------------

all: $(PDFTARGETS)

##-----------------------------------------------------------------------------

bibtool.dvi: bibtool.tex config.tex
	$(LATEX) $(LATEX_DMFLAG) $<
	$(BIBTEX) $*
	$(MAKEINDEX) -s $(BIBTOOL_IST) $*.idx
	$(LATEX) $(LATEX_DMFLAG) $<
	$(LATEX) $(LATEX_FMFLAG) $<

bibtool.pdf: bibtool.tex config.tex
	$(LUALATEX) $(LUALATEX_DMFLAG) $<
	$(BIBTEX) $*
	$(MAKEINDEX) -s $(BIBTOOL_IST) $*.idx
	$(LUALATEX) $(LUALATEX_DMFLAG) $<
	$(LUALATEX) $(LUALATEX_FMFLAG) $<

bibtool.ind ind index: bibtool.idx
	$(MAKEINDEX) -s $(BIBTOOL_IST) $<

##-----------------------------------------------------------------------------

config.tex: ..$(DIR_SEP)version.c
	.$(DIR_SEP)make_version.pl $< > $@

##-----------------------------------------------------------------------------

ref_card.dvi: ref_card.tex config.tex
	$(LATEX) $(LATEX_FMFLAG) $<

ref_card.pdf: ref_card.tex config.tex
	$(LUALATEX) $(LUALATEX_FMFLAG) $<

##-----------------------------------------------------------------------------

CDIR	= ..$(DIR_SEP)
HDIR	= ..$(DIR_SEP)include$(DIR_SEP)bibtool$(DIR_SEP)
CFILES	= $(HDIR)bibtool.h	\
	  $(HDIR)check.h	\
	  $(CDIR)check.c	\
	  $(HDIR)crossref.h	\
	  $(CDIR)crossref.c	\
	  $(HDIR)database.h	\
	  $(CDIR)database.c	\
	  $(HDIR)entry.h	\
	  $(CDIR)entry.c	\
	  $(HDIR)error.h	\
	  $(CDIR)error.c	\
	  $(HDIR)expand.h	\
	  $(CDIR)expand.c	\
	  $(HDIR)init.h		\
	  $(CDIR)init.c		\
	  $(HDIR)keynode.h	\
	  $(HDIR)key.h		\
	  $(CDIR)key.c		\
	  $(HDIR)macros.h	\
	  $(CDIR)macros.c	\
	  $(HDIR)names.h	\
	  $(CDIR)names.c	\
	  $(HDIR)parse.h	\
	  $(CDIR)parse.c	\
	  $(HDIR)print.h	\
	  $(CDIR)print.c	\
	  $(HDIR)pxfile.h	\
	  $(CDIR)pxfile.c	\
	  $(HDIR)record.h	\
	  $(CDIR)record.c	\
	  $(HDIR)rewrite.h	\
	  $(CDIR)rewrite.c	\
	  $(HDIR)resource.h	\
	  $(HDIR)rsc.h		\
	  $(CDIR)rsc.c		\
	  $(HDIR)s_parse.h	\
	  $(CDIR)s_parse.c	\
	  $(HDIR)stack.h	\
	  $(CDIR)stack.c	\
	  $(HDIR)sbuffer.h	\
	  $(CDIR)sbuffer.c	\
	  $(HDIR)symbols.h	\
	  $(CDIR)symbols.c	\
	  $(HDIR)tex_aux.h	\
	  $(CDIR)tex_aux.c	\
	  $(HDIR)tex_read.h	\
	  $(CDIR)tex_read.c	\
	  $(HDIR)type.h		\
	  $(CDIR)type.c		\
	  $(HDIR)version.h	\
	  $(CDIR)version.c	\
	  $(HDIR)wordlist.h	\
	  $(CDIR)wordlist.c

c_lib.dvi: c_lib.tex c_main.tex c.tex config.tex
	$(LATEX) $(LATEX_DMFLAG) $<
	$(MAKEINDEX) -s $(BIBTOOL_IST) $*.idx
	$(LATEX) $(LATEX_FMFLAG) $<

c_lib.pdf: c_lib.tex c_main.tex c.tex config.tex
	$(LUALATEX) $(LUALATEX_DMFLAG) $<
	$(MAKEINDEX) -s $(BIBTOOL_IST) $*.idx
	$(LUALATEX) $(LUALATEX_FMFLAG) $<

c_main.tex: $(CDIR)main.c c_get.pl
	perl c_get.pl $< > $@
c.tex: $(CFILES) c_get.pl
	perl c_get.pl $(CFILES) > $@

##-----------------------------------------------------------------------------

clean:
	$(RM) *.bak *.BAK *~ *.log *.ilg *.blg *.toc *.out *.aux *.idx *.ind *.bbl

veryclean: clean
	$(RM) c.tex c_main.tex config.tex

distclean: veryclean
	$(RM) $(PDFTARGETS) $(DVITARGETS)

##-----------------------------------------------------------------------------