File: Makefile

package info (click to toggle)
cvsbook 1.21-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 664 kB
  • ctags: 25
  • sloc: makefile: 108; python: 52; lisp: 24
file content (94 lines) | stat: -rw-r--r-- 2,627 bytes parent folder | download | duplicates (2)
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
### Convert cvsbook texinfo files to Info, HTML, PostScript, etc.


VERSION = 1.21
NAME = cvsbook
DISTFILES = README Makefile ChangeLog cvsbook.el TODO

all: version ps pdf info html

version:
	echo "@set VERSION ${VERSION}" > version.texi

info: version
	makeinfo main.texi

html: version html-monolithic html-distributed
	./fix-anchors.py cvsbook.html cvsbook-fixed.html
	mv cvsbook-fixed.html cvsbook.html

html-monolithic: version
	ln -sf main.texi cvsbook.texi
	texi2html -split_chapter cvsbook.texi
	rm -f cvsbook.texi

html-distributed: version
	@echo Non-monolithic HTML is not supported by makeinfo yet.

dvi: version
	tex main.texi
	tex main.texi

ps: dvi
	dvips main.dvi -o cvsbook.ps

pdf: ps
	ps2pdf cvsbook.ps cvsbook.pdf

log:
	cvs2cl.pl -r -t

dist: log info-dist html-dist ps-dist pdf-dist texi-dist big-dist

html-dist: 
	cp cvsbook.html ${NAME}-${VERSION}.html
	gzip -c --best ${NAME}-${VERSION}.html > ${NAME}-${VERSION}.html.gz
	zip ${NAME}-${VERSION}.html.zip ${NAME}-${VERSION}.html

ps-dist: 
	cp cvsbook.ps ${NAME}-${VERSION}.ps
	gzip -c --best ${NAME}-${VERSION}.ps > ${NAME}-${VERSION}.ps.gz
	zip ${NAME}-${VERSION}.ps.zip ${NAME}-${VERSION}.ps

pdf-dist: 
	cp cvsbook.pdf ${NAME}-${VERSION}.pdf
	gzip -c --best ${NAME}-${VERSION}.pdf > ${NAME}-${VERSION}.pdf.gz
	zip ${NAME}-${VERSION}.pdf.zip ${NAME}-${VERSION}.pdf

info-dist: 
	mkdir ${NAME}-${VERSION}
	cp *.info* ${DISTFILES} ${NAME}-${VERSION}
	tar cvf ${NAME}-${VERSION}-info.tar ${NAME}-${VERSION}
	gzip --best ${NAME}-${VERSION}-info.tar
	zip ${NAME}-${VERSION}-info.zip ${NAME}-${VERSION}/*
	rm -rf ${NAME}-${VERSION}

texi-dist: 
	mkdir ${NAME}-${VERSION}
	cp *.texi ${DISTFILES} ${NAME}-${VERSION}
	tar cvf ${NAME}-${VERSION}-texi.tar ${NAME}-${VERSION}
	gzip --best ${NAME}-${VERSION}-texi.tar
	zip ${NAME}-${VERSION}-texi.zip ${NAME}-${VERSION}/*
	rm -rf ${NAME}-${VERSION}

big-dist: 
	mkdir ${NAME}-${VERSION}
	cp ${DISTFILES} *.texi *.info* *.html *.ps *.pdf *.sh \
           ${NAME}-${VERSION}
	if [ -f ${NAME}-${VERSION}/${NAME}.html ]; then        \
             rm -f ${NAME}-${VERSION}/${NAME}-${VERSION}.html; \
        fi
	if [ -f ${NAME}-${VERSION}/${NAME}.ps ]; then          \
             rm -f ${NAME}-${VERSION}/${NAME}-${VERSION}.ps;   \
        fi
	tar cvf ${NAME}-${VERSION}-all.tar ${NAME}-${VERSION}
	gzip --best ${NAME}-${VERSION}-all.tar
	zip ${NAME}-${VERSION}-all.zip ${NAME}-${VERSION}/*
	rm -rf ${NAME}-${VERSION}

texclean: 
	rm -f *~ *.aux *.cp *.cps *.dvi *.fn *.ky *.log *.pg *.toc *.tp *.vr *.html

clean: texclean
	rm -f cvsbook.info* cvsbook.html cvsbook.ps *.tar.gz *.zip
	rm -rf ${NAME}-${VERSION}