Makefile 900 Bytes
Newer Older
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
DOC	  := sac
SOURCES	  := sac.texi macros.texi breaks.texi optimizations.texi

TEXI2PDF  := texi2pdf
TEXI2POD  := perl texi2pod.pl
POD2MAN	  := pod2man --center "SaC" \
		     --release="sac-1.0"\
		     --date=$(shell date +%F)
TEXI2HTML := makeinfo --html --no-split \
		      --no-number-section \
		      --css-ref=sac.css
CPP	  := cpp -P -I${SAC2CBASE}/src/libsac2c/global \
		    -I${SAC2CBASE}/src/libsac2c/stdopt



all:
	cp *.texi *.texi.in *.js texi2pod.pl sac.css  Makefile ./build
	cd ./build && make doc

doc: pdf-docs man-docs html-docs

pdf-docs: $(SOURCES)
	$(TEXI2PDF) $(DOC).texi

man-docs: $(SOURCES)
	$(TEXI2POD) $< > $(DOC).pod
	$(POD2MAN) sac.pod > $(DOC).1

html-docs: $(SOURCES)
	$(TEXI2HTML) $(DOC).texi


%.texi: %.texi.in
	$(CPP) $< \
	| sed -e 's/"\([^"]*\)"/\1/g'\
	| sed -e s'/<br>/\n/g' > $@

clean:
	if [ -d build ]; then  \
		rm -rf build;  \
		mkdir build;   \
	fi;