-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
76 lines (63 loc) · 2.46 KB
/
Makefile
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
PYQWT5_CVS := $(HOME)/CVS/PyQwt/pyqwt5
PYQWT4_CVS := $(HOME)/CVS/PyQwt/pyqwt4
PYQWT3D_CVS := $(HOME)/CVS/pyqwt3d
EXAMPLES := BarPlotDemo BodeDemo
EXAMPLES += CartesianDemo CliDemo DataDemo ErrorBarDemo
EXAMPLES += ImagePlotDemo
EXAMPLES += MaskedDataDemo
EXAMPLES_PNG := $(EXAMPLES:%=$(PYQWT5_CVS)/qt4examples/%*.png)
EXAMPLES_HTML := $(EXAMPLES:%=$(PYQWT5_CVS)/qt4examples/%.py.html)
EXAMPLES_3D := TestNumPy
EXAMPLES_3D_IMG := $(EXAMPLES_3D:%=$(PYQWT3D_CVS)/qt4examples/%.svg)
EXAMPLES_3D_IMG += $(EXAMPLES_3D:%=$(PYQWT3D_CVS)/qt4examples/%.ps)
EXAMPLES_3D += ParametricSurfaceDemo SimplePlot EnrichmentDemo
EXAMPLES_3D_IMG += $(EXAMPLES_3D:%=$(PYQWT3D_CVS)/qt4examples/%*.png)
EXAMPLES_3D += Grab
EXAMPLES_3D_HTML := $(EXAMPLES_3D:%=$(PYQWT3D_CVS)/qt4examples/%.py.html)
SOURCES := $(shell echo *.ht)
TARGETS := $(filter-out *.html,$(SOURCES:%.ht=%.html))
GENERATED_HTML := $(SOURCES:.ht=.html)
HTROOT := .
HT2HTML := python ht2html-2.0/ht2html.py
HTSTYLE := PyQwtGenerator
HTALLFLAGS := -f -s $(HTSTYLE)
HTFLAGS := $(HTALLFLAGS) -r $(HTROOT)
DEST := gvermeul,[email protected]:htdocs
EXCLUDES := --exclude CVS
EXCLUDES += --exclude ht2html-2.0
EXCLUDES += --exclude *.pyc
EXCLUDES += --exclude *~
ARGS := --rsh=ssh -v -r -l -t --update --delete $(EXCLUDES)
# pattern rules
%.html: %.ht links.h PyQwtGenerator.py
touch $<
$(HT2HTML) $(HTFLAGS) $<
perl -pi -e 's|</head>|<link rel="SHORTCUT ICON" href="doc/pyfav.png">\n</head>|g' $@
# targets
all: $(TARGETS)
mkdir -p doc5
(cd $(PYQWT5_CVS)/sphinx; make clean; make; make latex)
(cd $(PYQWT5_CVS)/sphinx/build/latex; make all-pdf)
cp -vpr $(PYQWT5_CVS)/sphinx/build/html/* doc5
cp -vpr $(PYQWT5_CVS)/sphinx/build/latex/PyQwt.pdf doc5
mkdir -p doc4
(cd $(PYQWT4_CVS)/Doc; make htdoc)
cp -vpr $(PYQWT4_CVS)/Doc/html/htdoc/* doc4
(cd $(PYQWT3D_CVS)/Doc; make htdoc)
mkdir -p doc3d
cp -vpr $(PYQWT3D_CVS)/Doc/html/htdoc/* doc3d
cp -vp home.html index.html
cp -vp patent-protest strike.html
.PHONY: examples examples3d
examples: $(EXAMPLES_PNG) $(EXAMPLES_HTML)
cp -pv $^ examples
examples3d: $(EXAMPLES_3D_IMG) $(EXAMPLES_3D_HTML)
cp -pv $^ examples3d
clean:
rm -f *~
rm -f $(GENERATED_HTML)
install: clean all
rsync $(ARGS) . $(DEST)
snarf:
rsync --rsh=ssh -avut $(DEST)/snapshot .
rsync --rsh=ssh -avut $(DEST)/support .