File: OMakefile

package info (click to toggle)
context-modules 20140528-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 15,744 kB
  • ctags: 444
  • sloc: xml: 1,501; makefile: 51; sh: 31
file content (41 lines) | stat: -rw-r--r-- 1,383 bytes parent folder | download | duplicates (5)
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
## Subdirectory omake makefile for the reStructuredText module
## for Context. See the root OMakefile for details.
## https://bitbucket.org/phg/context-rst/src/tip/OMakefile
.PHONY: manual clean nuke

name		= manual

manual_src	= $(name).tex
manual_rst	= documentation.rst
manual_pdf	= $(name).pdf
manual_tmp	= doc.tex
manual_junk[]	= $(addprefix $(name), .tuc .log)
manual_spam	= $(name)-termout.log

## The manual is itself written in reStructuredText. This leads to
## a precarious situation: the module is required to be present in
## order for the manual to be built. We’re going to have to find
## some solution for smooth bootstrapping, but at the moment that’s
## a low priority goal.
$(manual_pdf): :effects: $(manual_tmp) $(manual_junk) $(manual_spam)
	rm -rf -- $(manual_spam)
	echo ":: creating $(manual_tmp) from $(manual_rst)"
	mtxrun --script rst 			\
		--if=$(file $(manual_rst)) 	\
		--of=$(manual_tmp) 		\
		&> $(manual_spam)
	echo ":: creating $@ from $(manual_src) and $(manual_tmp)"
	context --nonstopmode $(file $(manual_src)) &>> $(manual_spam)

manual: $(manual_pdf)

clean:
	rm -rf -- $(manual_junk) $(manual_tmp) $(manual_spam)

nuke: clean
	rm -rf -- $(manual_pdf)

## note to self: default targets in subdirectories will
## lead to those targets being built whenever omake is
## invoked without arguments from the root tree as well.
#.DEFAULT: manual