File: Makefile

package info (click to toggle)
synopsis 0.12-8
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 38,112 kB
  • ctags: 18,122
  • sloc: ansic: 41,842; cpp: 39,920; xml: 17,704; python: 13,545; sh: 10,045; yacc: 1,271; makefile: 1,242; lex: 684; asm: 361
file content (44 lines) | stat: -rw-r--r-- 807 bytes parent folder | download | duplicates (6)
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
prefix:= 
synopsis:= python synopsis.py
xsltproc:= xsltproc --novalid --path $(shell pwd) --xinclude
fop	:= fop#xmlroff --backend=cairo
src	:= math.h
syn	:= $(patsubst %.h, %.syn, $(src))

all: math

math: math.xml Reference.xml
	mkdir -p $@
	cp synopsis.css $@
	$(xsltproc) -o $@/ html.xsl Reference.xml

%.pdf: %.fo
	$(fop) -o $@ $<

math.fo: math.xml Reference.xml
	$(xsltproc) -o $@ fo.xsl Reference.xml

%.xml: %.syn
	$(synopsis) docbook --title='math reference' --output=$@ $<

%.syn: %.h
	$(synopsis) parse --output=$@ $<

install-html: all
ifdef prefix
	mkdir -p $(prefix)
	cp -r math/* $(prefix)
	if test -f math.pdf; then cp math.pdf $(prefix); fi
endif

install-print: math.pdf
ifdef prefix
	mkdir -p $(prefix)
	cp $< $(prefix)
endif

clean:
	rm -rf *.syn

distclean: clean
	rm -rf math math.xml