File: Makefile

package info (click to toggle)
bibtool 2.55%2Bds-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 2,376 kB
  • sloc: ansic: 10,685; perl: 6,205; makefile: 477; sh: 351; tcl: 51
file content (151 lines) | stat: -rw-r--r-- 3,822 bytes parent folder | download
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
##*****************************************************************************
## $Id: Makefile,v 1.14 2012-02-12 06:16:08 gene Exp $
##=============================================================================
## 
## This file is part of BibTool.
## It is distributed under the GNU General Public License.
## See the file COPYING for details.
## 
## (c) 1997-2011 Gerd Neugebauer
## 
## Net: gene@gerd-neugebauer.de
## 
##*****************************************************************************

LATEX     = latex -no-shell-escape -interaction=batchmode
PDFLATEX  = pdflatex -no-shell-escape -interaction=batchmode
BIBTEX    = bibtex -terse
MAKEINDEX = makeindex -q

LATEX_DMFLAG = -draftmode
PDFLATEX_DMFLAG = -draftmode

LATEX_FMFLAG =
PDFLATEX_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
	$(PDFLATEX) $(PDFLATEX_DMFLAG) $<
	$(BIBTEX) $*
	$(MAKEINDEX) -s $(BIBTOOL_IST) $*.idx
	$(PDFLATEX) $(PDFLATEX_DMFLAG) $<
	$(PDFLATEX) $(PDFLATEX_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
	$(PDFLATEX) $(PDFLATEX_FMFLAG) $<

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

CDIR	= ..$(DIR_SEP)
HDIR	= ..$(DIR_SEP)include$(DIR_SEP)bibtool$(DIR_SEP)
CFILES	= $(HDIR)bibtool.h	\
	  $(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
	$(PDFLATEX) $(PDFLATEX_DMFLAG) $<
	$(MAKEINDEX) -s $(BIBTOOL_IST) $*.idx
	$(PDFLATEX) $(PDFLATEX_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)