summaryrefslogtreecommitdiffstats
path: root/python/Makefile.am
blob: dfb84740e77f5b97ef0710854282b535f62b401f (plain)
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
#
# Simon Edwards <simon@simonzone.com>
#

site_packages = @PYTHONMODDIR@/site-packages
sip_dir = @datadir@/sip/
qt_includes = @qt_includes@
qt_dir = $(dir @qt_includes@)

python_inc_dir = `echo @PYTHONINC@ | sed s/-I//`

# qassistantclient.h
# qlist.h

noinst_DATA = build_pyqt_pykde
EXTRA_DIST = sip pyqt pykde
DISTCLEANFILES = sipdone prepqt prepkde

build_pyqt_pykde: prepkde
	@(cd pyqt && $(MAKE))
	@(cd pykde && $(MAKE))

sipdone:
	-mkdir sip
	export builddir=`pwd` ; \
	cd $(srcdir)/sip ; \
	export QTDIR=${qt_dir} ; \
	export PYTHONPATH=$$builddir/sip:$$PYTHONPATH ; \
	@PYTHON@ configure.py -b @bindir@ -d ${site_packages} -e ${python_inc_dir} -v ${sip_dir} 
	@(cd sip ; $(MAKE))
	echo "" > sipdone

prepqt: sipdone
	@# A quick hack to make sure that the configure.py programs from PyQt/PyKDE both get the correct sip config.
	-mkdir pyqt
	export builddir=`pwd` ; \
	export abssrcdir=`cd $(srcdir) && pwd` ; \
	sed "s#sip_bin':.*\$$#sip_bin': '$$builddir/sip/sipgen/sip',#g;s#sip_inc_dir':.*\$$#sip_inc_dir': '$$abssrcdir/sip/siplib',#g" sip/sipconfig.py > pyqt/sipconfig.py
	export builddir=`pwd` ; \
	export PYTHONPATH=$$builddir/pyqt:$$PYTHONPATH ; \
	cd $(srcdir)/pyqt ; \
	export QTDIR=${qt_dir} ; \
	echo "yes" | @PYTHON@ configure.py -i -b @bindir@ -d ${site_packages} -v ${sip_dir} 
	echo "" > prepqt

prepkde: prepqt
	-mkdir pykde
	@# PyKDE's configure needs to pick up the correct pyqtconfig.py
	export builddir=`pwd` ; \
	export abssrcdir=`cd $(srcdir) && pwd` ; \
	sed "s#sip_bin':.*\$$#sip_bin': '$$builddir/sip/sipgen/sip',#g;s#sip_inc_dir':.*\$$#sip_inc_dir': '$$abssrcdir/sip/siplib',#g" sip/sipconfig.py > pykde/sipconfig.py ; \
	sed "s#pyqt_sip_dir':.*\$$#pyqt_sip_dir': '$$abssrcdir/pyqt/sip',#g" pyqt/pyqtconfig.py > pykde/pyqtconfig.py
	export builddir=`pwd` ; \
	export PYTHONPATH=$$builddir/pykde:$$PYTHONPATH ; \
	cd $(srcdir)/pykde ; \
	export QTDIR=${qt_dir} ; \
	@PYTHON@ configure.py -i -k @prefix@ -d ${site_packages} -v ${sip_dir}
	echo "" > prepkde

install:
	@(cd sip && $(MAKE) install)
	@(cd pyqt && $(MAKE) install)
	@(cd pykde && $(MAKE) install)

uninstall:
	@(cd pykde && $(MAKE) uninstall)
	@(cd pyqt && $(MAKE) uninstall)
	@(cd sip && $(MAKE) uninstall)

clean:
	-(cd sip && $(MAKE) clean)
	-(cd pyqt && $(MAKE) clean)
	-(cd pykde && $(MAKE) clean)
	-rm sipdone
	-rm prepqt
	-rm prepkde

dist-hook:
	-rm -rf `find $(distdir) -name CVS`
	-rm -rf `find $(distdir) -name Makefile`
	-rm -rf `find $(distdir) -name "*.pyc"`
	-rm -rf `find $(distdir) -name "*.o"`
	-rm -rf `find $(distdir) -name "*.so"`
	-rm -rf $(distdir)/sipdone
	-rm -rf $(distdir)/prepqt
	-rm -rf $(distdir)/prepkde
	-rm -rf $(distdir)/sip/sipgen/sip
	-rm -rf $(distdir)/pyqt/cfgtest
	-rm -rf $(distdir)/pyqt/mkfeatures
	-rm -rf $(distdir)/pyqt/sipconfig.py
	-rm -rf $(distdir)/pyqt/pyqtconfig.py
	-rm -rf $(distdir)/pyqt/qt
	-rm -rf $(distdir)/pyqt/qtcanvas
	-rm -rf $(distdir)/pyqt/qtext
	-rm -rf $(distdir)/pyqt/qtgl
	-rm -rf $(distdir)/pyqt/qtnetwork
	-rm -rf $(distdir)/pyqt/qtsql
	-rm -rf $(distdir)/pyqt/qttable
	-rm -rf $(distdir)/pyqt/qtui
	-rm -rf $(distdir)/pyqt/qtxml
	-rm -rf $(distdir)/pykde/sipconfig.py
	-rm -rf $(distdir)/pykde/pyqtconfig.py
	-rm -rf $(distdir)/pykde/pykdeconfig.py
	-rm -rf $(distdir)/pykde/dcop
	-rm -rf $(distdir)/pykde/kdecore
	-rm -rf $(distdir)/pykde/kdefx
	-rm -rf $(distdir)/pykde/kdeprint
	-rm -rf $(distdir)/pykde/kdesu
	-rm -rf $(distdir)/pykde/kdeui
	-rm -rf $(distdir)/pykde/kfile
	-rm -rf $(distdir)/pykde/khtml
	-rm -rf $(distdir)/pykde/kio
	-rm -rf $(distdir)/pykde/kmdi
	-rm -rf $(distdir)/pykde/kparts
	-rm -rf $(distdir)/pykde/kspell

distclean-local:
	-(cd sip && $(MAKE) distclean)
	-(cd pyqt && $(MAKE) distclean)
	-(cd pykde && $(MAKE) distclean)
	-rm -rf sip/sipgen/sip
	-rm -rf sip/sipconfig.py
	-rm -rf pyqt/cfgtest
	-rm -rf pyqt/cfgtest.cpp
	-rm -rf pyqt/features
	-rm -rf pyqt/mkfeatures
	-rm -rf pyqt/mkfeatures.cpp
	-rm -rf pyqt/sipconfig.py
	-rm -rf pyqt/pyqtconfig.py
	-rm -rf pyqt/qt
	-rm -rf pyqt/qtcanvas
	-rm -rf pyqt/qtext
	-rm -rf pyqt/qtgl
	-rm -rf pyqt/qtnetwork
	-rm -rf pyqt/qtsql
	-rm -rf pyqt/qttable
	-rm -rf pyqt/qtui
	-rm -rf pyqt/qtxml
	-rm -rf pykde/sipconfig.py
	-rm -rf pykde/pyqtconfig.py
	-rm -rf pykde/pykdeconfig.py
	-rm -rf pykde/dcop
	-rm -rf pykde/kdecore
	-rm -rf pykde/kdefx
	-rm -rf pykde/kdeprint
	-rm -rf pykde/kdesu
	-rm -rf pykde/kdeui
	-rm -rf pykde/kfile
	-rm -rf pykde/khtml
	-rm -rf pykde/kio
	-rm -rf pykde/kmdi
	-rm -rf pykde/kparts
	-rm -rf pykde/kspell
	-rm -rf pykde/sip/kspell/kspellmod.sip
	-rm -rf pykde/sip/khtml/khtmlmod.sip
	-rm -rf pykde/sip/kdecore/kdecoremod.sip
	-rm -rf pykde/sip/kdeui/kdeuimod.sip