File: Jamrules-fweb

package info (click to toggle)
jam 2.6.1-2.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,220 kB
  • sloc: ansic: 9,035; yacc: 443; sh: 121; makefile: 45
file content (44 lines) | stat: -rw-r--r-- 1,006 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
# Jam rules for Fweb

# Usage:

# include "Jamrules-fweb" ;
# FwebProducts main.c util.c : foo.fweb ;


#  Ideally we should not have to explicitely to use the *Products rules,
# but I don't know yet how to autocompute files to be produced.  Could this
# be a Jam limitation ?
#  For now the *Products rules are used to trigger the weave process.  They
# should be invoked by the same wrappers that should invoke *Products.

NOTFILE tex ;

# FIXME: something should be done to mark MODULES.tex and INDEX.tex
#  as side-products of the fweb run.

rule FwebProducts
{
	# tangle
	Depends $(<) : $(>) ;
	Depends all : $(<) ;
	Clean clean : $(<) ;

	# weave
	FwebLatex $(>:S=.tex) : $(>) ;
	Depends tex : $(>:S=.tex) ;
}

actions FwebProducts { ftangle $(>) }

rule FwebLatex
{
	Depends $(<) : $(>) ;
	Clean clean : $(<) MODULES.tex INDEX.tex ;
	# FIXME: the following should be autodetected by LatexDvi instead
	Depends $(<:S=.dvi) : MODULES.tex INDEX.tex ;

	Latex $(<) ;
}

actions FwebLatex { fweave $(>) }