-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathGNUmakefile
184 lines (143 loc) · 4.46 KB
/
GNUmakefile
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
# GNUmakefile for PyQwt
#
# There are at least two options to log the output of make:
#
# (1) Invoke make and tie stderr to stdout and redirect stdout to log.txt:
# make all 2&>1 >log.txt
# However, you do not see what is going on.
#
# (2) Use script to capture all screen output of make to log.txt:
# script -c 'make all' log.txt
# The script command appeared in 3.0BSD and is part of util-linux.
# To compile and link the Qwt sources statically into Pyqwt.
QWT := ../qwt-5.2
JOBS := 1
UNAME := $(shell uname)
REVISION := 859
ifeq ($(UNAME),Linux)
JOBS := $(shell getconf _NPROCESSORS_ONLN)
endif
ifeq ($(UNAME),Darwin)
JOBS := $(shell sysctl -n hw.ncpu)
endif
.PHONY: dist qwt-5.0 qwt-5.1 qwt-5.2
%.tar.bz2:
wget http://prdownloads.sf.net/qwt/$@
all: 3 4
debug: 3d 4d
trace: 3t 4t
3:
cd configure \
&& python configure.py -3 -Q $(QWT) -j $(JOBS) \
&& $(MAKE) -j $(JOBS)
4:
cd configure \
&& python configure.py -4 -Q $(QWT) -j $(JOBS) \
&& $(MAKE) -j $(JOBS)
3d:
cd configure \
&& python configure.py -3 --debug -Q $(QWT) -j $(JOBS) \
&& $(MAKE) -j $(JOBS)
4d:
cd configure \
&& python configure.py -4 --debug -Q $(QWT) -j $(JOBS) \
&& $(MAKE) -j $(JOBS)
3t:
cd configure \
&& python configure.py --debug --trace -3 -Q $(QWT) \
&& $(MAKE)
4t:
cd configure \
&& python configure.py --debug --trace -4 -Q $(QWT) \
&& $(MAKE)
# Installation
install-3: 3
make -C configure install
install-4: 4
make -C configure install
install: install-3 install-4
install-3d: 3d
make -C configure install
install-4d: 4d
make -C configure install
install-debug: install-3d install-4d
install-3t: 3t
make -C configure install
install-4t: 4t
make -C configure install
install-trace: install-3t install-4t
# Releases
qwt-5.0.0: qwt-5.0.0.tar.bz2
tar xvfj [email protected]
qwt-5.0.1: qwt-5.0.1.tar.bz2
tar xvfj [email protected]
qwt-5.0.2: qwt-5.0.2.tar.bz2
tar xvfj [email protected]
qwt-5.1.0: qwt-5.1.0.tar.bz2
tar xvfj [email protected]
qwt-5.1.1: qwt-5.1.1.tar.bz2
tar xvfj [email protected]
qwt-5.1.2: qwt-5.1.2.tar.bz2
tar xvfj [email protected]
qwt-5.2.0: qwt-5.2.0.tar.bz2
tar xvfj [email protected]
patch -p0 --fuzz=10 -b -z .pyqwt <pyqwt-5.2.0.patch
qwt-5.2.1: qwt-5.2.1.tar.bz2
tar xvfj [email protected]
# SVN
qwt-5.0:
(if [ ! -d tmp ]; then mkdir tmp ; fi)
(cd tmp; svn co https://qwt.svn.sourceforge.net/svnroot/qwt/branches/qwt-5.0 -r $(REVISION))
(if [ -d old-5.0 ]; then rm -rf old-5.0 ; fi)
(if [ -d qwt-5.0 ]; then mv qwt-5.0 old-5.0 ; fi)
(if [ -d qwt-5.0 ]; then rm -rf qwt-5.0; fi)
cp -pr tmp/qwt-5.0 qwt-5.0
python untabify.py -t 4 qwt-5.0 .cpp .h .pro
patch -p0 --fuzz=10 -b -z .pyqwt <pyqwt-5.0.patch
(cd qwt-5.0/doc; cp ../COPYING .; cp ../INSTALL .)
(cd qwt-5.0/doc; doxygen -u Doxyfile; doxygen Doxyfile)
(cd qwt-5.0; rm -rf admin doc/images doc/latex doc/man)
find qwt-5.0 -name .svn \
-o -name '*.map' \
-o -name '*.md5' | xargs rm -rf
qwt-5.1:
(if [ ! -d tmp ]; then mkdir tmp ; fi)
(cd tmp; svn co https://qwt.svn.sourceforge.net/svnroot/qwt/branches/qwt-5.1 -r $(REVISION))
(if [ -d old-5.1 ]; then rm -rf old-5.1 ; fi)
(if [ -d qwt-5.1 ]; then mv qwt-5.1 old-5.1 ; fi)
(if [ -d qwt-5.1 ]; then rm -rf qwt-5.1; fi)
cp -pr tmp/qwt-5.1 qwt-5.1
python untabify.py -t 4 qwt-5.1 .cpp .h .pro
patch -p0 --fuzz=10 -b -z .pyqwt <pyqwt-5.1.patch
(cd qwt-5.1/doc; cp ../COPYING .; cp ../INSTALL .)
(cd qwt-5.1/doc; doxygen -u Doxyfile; doxygen Doxyfile)
(cd qwt-5.1; rm -rf admin doc/images doc/latex doc/man)
find qwt-5.1 -name .svn \
-o -name '*.map' \
-o -name '*.md5' | xargs rm -rf
qwt-5.2:
(if [ ! -d tmp ]; then mkdir tmp ; fi)
(cd tmp; svn co https://qwt.svn.sourceforge.net/svnroot/qwt/branches/qwt-5.2 -r $(REVISION))
(if [ -d old-5.2 ]; then rm -rf old-5.2 ; fi)
(if [ -d qwt-5.2 ]; then mv qwt-5.2 old-5.2 ; fi)
(if [ -d qwt-5.2 ]; then rm -rf qwt-5.2; fi)
cp -pr tmp/qwt-5.2 qwt-5.2
python untabify.py -t 4 qwt-5.2 .cpp .h .pro
patch -p0 --fuzz=10 -b -z .pyqwt <pyqwt-5.2.patch
(cd qwt-5.2/doc; cp ../COPYING .; cp ../INSTALL .)
(cd qwt-5.2/doc; doxygen -u Doxyfile; doxygen Doxyfile)
(cd qwt-5.2; rm -rf admin doc/images doc/latex doc/man)
find qwt-5.2 -name .svn \
-o -name '*.map' \
-o -name '*.md5' | xargs rm -rf
# build a distribution tarball
dist: distclean install
(cd sphinx; make clean; make; make latex)
(cd sphinx/build/latex; make all-pdf)
python setup.py sdist --formats=gztar
clean:
find . -name '*~' | xargs rm -f
distclean: clean
find . -name '.#*' -o -name '*.pyc' | xargs rm -f
rm -rf configure/*qt{3,4} configure/qwt_* configure/*.cpp
# EOF