File: Jamrules-tex

package info (click to toggle)
ftjam 2.5.2-1.1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, lenny, squeeze, stretch, wheezy
  • size: 1,216 kB
  • ctags: 1,237
  • sloc: ansic: 7,226; sh: 2,751; yacc: 443; makefile: 121
file content (101 lines) | stat: -rw-r--r-- 1,398 bytes parent folder | download | duplicates (7)
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
# Jam rules for Tex and LaTeX

# Usage:

# include "Jamrules-tex" ;
# Latex foo.tex bar.tex ;
# Tex hello.tex ;

# Then call jam with one of "pdf", "ps", or "dvi" targets


NOTFILE dvi ps pdf ;

rule Latex
{
	LatexDvi $(<:S=.dvi) : $(<) ;
	DviPs $(<:S=.ps) : $(<:S=.dvi) ;
	Depends dvi : $(<:S=.dvi) ;

	LatexPdf $(<:S=.pdf) : $(<) ;
	Depends pdf : $(<:S=.pdf) ;
}

rule Tex
{
	TexDvi $(<:S=.dvi) : $(<) ;
	DviPs $(<:S=.ps) : $(<:S=.dvi) ;
	Depends dvi : $(<:S=.dvi) ;

	TexPdf $(<:S=.pdf) : $(<) ;
	Depends pdf : $(<:S=.pdf) ;
}

rule LatexDvi
{
	Depends $(<) : $(>) ;
	Clean clean : $(<) $(<:S=.log) $(<:S=.toc) $(<:S=.aux) ;
}

actions LatexDvi
{
	# FIXME: should use rlatex
	while latex $(>) |
		tee /dev/tty |
		fgrep "Label(s) may have changed." >/dev/null
	do :
	done
}

rule LatexPdf
{
	Depends $(<) : $(>) ;
	Clean clean : $(<) $(<:S=.log) $(<:S=.toc) $(<:S=.aux) ;
}

actions LatexPdf
{
	while pdflatex $(>) |
		tee /dev/tty |
		fgrep "Label(s) may have changed." >/dev/null
	do :
	done
}

rule TexDvi
{
	Depends $(<) : $(>) ;
	Clean clean : $(<) $(<:S=.log) ;
}

actions TexDvi
{
	tex $(>)
}

rule TexPdf
{
	Depends $(<) : $(>) ;
	Depends all : $(<) ;
	Depends pdf : $(<) ;
	Clean clean : $(<) $(<:S=.log) ;
}

actions TexPdf
{
	pdftex $(>)
}


rule DviPs
{
	Depends $(<) : $(>) ;
	Depends all : $(<) ;
	Depends ps : $(<) ;
	Clean clean : $(<) ;
}

actions DviPs
{
	dvips $(>) -o $(<)
}