File: Makefile

package info (click to toggle)
albatross 1.35-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,328 kB
  • ctags: 1,702
  • sloc: python: 6,964; makefile: 139; sh: 123
file content (91 lines) | stat: -rw-r--r-- 3,087 bytes parent folder | download | duplicates (4)
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
PYTHON = python

MKHOWTO = /usr/lib/python2.3/doc/tools/mkhowto
PYDIR=$(shell $(PYTHON) -c 'import os; print os.path.dirname(os.__file__)')

DOC_ROOT = $(PYDIR)/doc
MKHOWTO = $(DOC_ROOT)/tools/mkhowto
ICONS = $(DOC_ROOT)/html/icons

.PHONY: html

PAPER = a4

DOCFILES = albatross.tex copyright.tex installation.tex introduction.tex \
	tempuser.tex tags.tex customtags.tex mixins.tex packaged.tex

METHODFILES = SimpleContext-methods.tex AppContext-methods.tex \
	SimpleAppContext-methods.tex SessionAppContext-methods.tex \
	SessionFileAppContext-methods.tex Application-methods.tex \
	SimpleApp-methods.tex SimpleSessionApp-methods.tex \
	SimpleSessionFileApp-methods.tex ModularApp-methods.tex \
	ModularSessionApp-methods.tex ModularSessionFileApp-methods.tex \
	RandomModularApp-methods.tex RandomModularSessionApp-methods.tex \
	RandomModularSessionFileApp-methods.tex \
	BranchingSessionContext-methods.tex

FIGURES = simplecontext.pdf simpleappcontext.pdf simpleapp.pdf \
	twolayer.pdf twolayerctx.pdf mvc.pdf albmvc.pdf pagemap.pdf \
	toolkit.pdf appcontext.pdf application.pdf sessionappcontext.pdf \
	sessionfileappcontext.pdf simplesessapp.pdf simplesessfileapp.pdf \
	modularapp.pdf modularsessapp.pdf modularsessfileapp.pdf \
	dataflow.pdf AlbatrossObjects.pdf randmodapp.pdf randmodsessapp.pdf \
	randmodsessfileapp.pdf branchingsessioncontext.pdf

ALLFILES = $(DOCFILES) $(METHODFILES) $(FIGURES)

all:	pdf

test:
	PYTHONPATH=.. $(PYTHON) test_examples.py

pdf:	$(ALLFILES) version
	$(MKHOWTO) --pdf --$(PAPER) albatross.tex

html:	$(ALLFILES) version
	$(MKHOWTO) --image-type png --html albatross.tex
	mkdir -p albatross/icons
	cp $(ICONS)/* albatross/icons/
# the iconserver option of mkhowto is broken since it writes
# it to the end of the init_file where they aren't useful anymore,
# so we work around it:
	for f in `find albatross -type f`; do \
	  cat $$f | sed s/\.\.\\/icons/icons/g > $${f}2; \
	  mv $${f}2 $$f; \
	done
	-rm albatross/albatross2
	-rm albatross/icons/icons2
	-rm -f albatross/images.*
	-rm -f albatross/*.old

world:	pdf html

pdf-$(PAPER).tar.gz: pdf
	tar cf - *.pdf | gzip -9 >$@

html.tar.gz:	html
	tar cf - albatross | gzip -9 >$@

# build method files
$(METHODFILES):
	$(PYTHON) doc_methods.py -o $@ albatross.$(subst -methods.tex,,$@)

# convert .obj images to .eps and then to .pdf
# Some versions of dia require --export-to-format=eps-builtin, rather than
# --filter=eps-builtin.
# In the Debian package, we use the short options.
%.pdf: %.dia
	DISPLAY="" dia -e $(subst .dia,.eps,$<) -t eps-builtin -n -l $<
	epstopdf $(subst .dia,.eps,$<)

clean:
	rm -f *~ *.aux *.idx *.ilg *.ind *.log *.toc *.bkm *.syn \
	*.pla *.eps *.pdf *.lof *.l2h *.tex2 *.html *.pyc $(METHODFILES)

# Version substitution
version: ../albatross/__init__.py
	DATE="`date +'%B %d, %Y'`"; \
	VERSION="`awk '/__version__/ {print $$3}' ../albatross/__init__.py`"; \
	VERSION="`echo $$VERSION | sed s/\\'//g`"; \
	cat albatross.tex | sed s/\\release.*/\\release\{$$VERSION\}/ >albatross.tex2; \
	cat albatross.tex2 | sed s/\\date.*/\\date\{"$$DATE"\}/ >albatross.tex