xref: /aoo41x/main/pyuno/demo/makefile.mk (revision d71964d5)
1# *************************************************************
2#
3#  Licensed to the Apache Software Foundation (ASF) under one
4#  or more contributor license agreements.  See the NOTICE file
5#  distributed with this work for additional information
6#  regarding copyright ownership.  The ASF licenses this file
7#  to you under the Apache License, Version 2.0 (the
8#  "License"); you may not use this file except in compliance
9#  with the License.  You may obtain a copy of the License at
10#
11#    http://www.apache.org/licenses/LICENSE-2.0
12#
13#  Unless required by applicable law or agreed to in writing,
14#  software distributed under the License is distributed on an
15#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16#  KIND, either express or implied.  See the License for the
17#  specific language governing permissions and limitations
18#  under the License.
19#
20# *************************************************************
21PRJNAME=pyuno
22PRJ=..
23
24.INCLUDE : settings.mk
25.INCLUDE : pyversion.mk
26
27ROOT=$(MISC)$/pyuno-doc
28
29
30FILES=\
31	$(ROOT)$/python-bridge.html 		\
32	$(ROOT)$/customized_setup.png 		\
33	$(ROOT)$/mode_component.png 		\
34	$(ROOT)$/mode_ipc.png			\
35	$(ROOT)$/modes.sxd			\
36	$(ROOT)$/optional_components.png       	\
37	$(ROOT)$/samples$/swriter.py		\
38	$(ROOT)$/samples$/swritercomp.py	\
39	$(ROOT)$/samples$/ooextract.py		\
40	$(ROOT)$/samples$/biblioaccess.py	\
41	$(ROOT)$/samples$/swritercompclient.py	\
42	$(ROOT)$/samples$/hello_world_pyuno.zip
43
44
45
46$(MISC)$/pyuno-doc.zip : dirs $(FILES)
47	-rm -f $@
48	cd $(MISC) && zip -r pyuno-doc.zip pyuno-doc
49dirs .PHONY :
50	-mkdir $(ROOT)
51	-mkdir $(ROOT)$/samples
52
53
54$(ROOT)$/samples$/hello_world_pyuno.zip : hello_world_comp.py Addons.xcu
55	-rm -f $@
56	zip $@ hello_world_comp.py Addons.xcu
57
58$(ROOT)$/samples$/% : %
59	-rm -f $@
60	cat $? > $@
61
62$(ROOT)$/% : ..$/doc$/%
63	-rm -f $@
64	cat $? > $@
65
66#VERSION=0.9.4
67#PYDIRNAME=python-$(PYVERSION)
68#.IF "$(GUI)"=="WNT"
69#INISUFFIX=.ini
70#BATCHSUFFIX=.bat
71#ENVSUFFIX=.bat
72#PLATFORM=win32
73#EXESUFFIX=.exe
74#PACKSUFFIX=.zip
75#MYCOPY=copy
76#DOLLAR_SIGN=$$
77#.ELSE
78#DOLLAR_SIGN=\$$
79#PACKSUFFIX=.tar.gz
80#MYCOPY=cp
81#BATCHSUFFIX=.sh
82#ENVSUFFIX=.tcsh
83#INISUFFIX=rc
84#PYUNOMODULE=$(DESTROOT)$/program$/pyuno$(DLLPOST)
85#PYTHONLIBRARY=$(DESTROOT)$/program$/$(DLLPRE)python$(DLLPOST).$(PYVERSION)
86#PYRUNTIMELINK=$(DESTROOT)$/program$/python
87#PYRUNTIMELIBLINK1=$(DESTROOT)$/program$/libpython.so.2
88#PYRUNTIMELIBLINK2=$(DESTROOT)$/program$/libpython.so
89#
90#.IF "$(OS)$(CPU)"=="SOLARISS"
91#PLATFORM=solaris-sparc
92#.ELIF "$(OS)$(CPU)"=="SOLARISI"
93#PLATFORM=solaris-x86
94#.ELIF "$(OS)$(CPU)"=="LINUXI"
95#PLATFORM=linux-x86
96#.ELIF "$(OS)$(CPU)"=="LINUXP"
97#PLATFORM=linux-ppc
98#.ELSE
99#error please add your platform
100#.ENDIF
101#
102#.ENDIF
103#
104#DESTROOT=$(BIN)$/root
105#
106#FINDDIRS=$(subst,/,$/ $(shell +cd $(SOLARLIBDIR)$/python && $(FIND) . -type d))
107#FINDLIBFILES=$(subst,/,$/ $(shell +cd $(SOLARLIBDIR)$/python && $(FIND) . -type f))
108#
109#PYRUNTIME_DIRS=\
110#	$(DESTROOT)				\
111#	$(DESTROOT)$/program			\
112#	$(DESTROOT)$/program/pydemo		\
113#	$(DESTROOT)$/program$/$(PYDIRNAME) 	\
114#	$(DESTROOT)$/program$/$(PYDIRNAME)$/bin 	\
115#	$(DESTROOT)$/program$/$(PYDIRNAME)$/lib 	\
116#	$(foreach,i,$(FINDDIRS) $(DESTROOT)$/program$/$(PYDIRNAME)$/lib$/$(i))
117#
118#
119#FILES=\
120#	$(DESTROOT)$/program$/$(DLLPRE)pyuno$(DLLPOST) 		\
121#	$(DESTROOT)$/program$/pythonloader.uno$(DLLPOST)	\
122#	$(DESTROOT)$/program$/pyuno$(INISUFFIX)			\
123#	$(DESTROOT)$/program$/uno.py				\
124#	$(DESTROOT)$/program$/unohelper.py			\
125#	$(DESTROOT)$/program$/pythonloader.py			\
126#	$(DESTROOT)$/program$/pyuno_setup$(BATCHSUFFIX)		\
127#	$(DESTROOT)$/program$/regcomp$(EXESUFFIX)		\
128#	$(DESTROOT)$/program$/pyunoenv$(ENVSUFFIX)		\
129#	$(DESTROOT)$/program$/pydemo$/biblioaccess.py		\
130#	$(DESTROOT)$/program$/pydemo$/ooextract.py		\
131#	$(DESTROOT)$/program$/pydemo$/swriter.py		\
132#	$(DESTROOT)$/program$/pydemo$/swritercomp.py		\
133#	$(DESTROOT)$/program$/pydemo$/swritercompclient.py	\
134#	$(DESTROOT)$/program$/pydemo$/swritercompclient.py	\
135#	$(DESTROOT)$/program$/pydemo$/python-bridge.html	\
136#	$(PYUNOMODULE)						\
137#	$(PYTHONLIBRARY)					\
138#	$(DESTROOT)$/program$/$(PYDIRNAME)$/bin$/python$(EXESUFFIX)	\
139#	$(foreach,i,$(FINDLIBFILES) $(DESTROOT)$/program$/$(PYDIRNAME)$/lib$/$(i)) \
140#	$(PYRUNTIMELINK)					\
141#	$(PYRUNTIMELIBLINK1)					\
142#	$(PYRUNTIMELIBLINK2)
143#
144#
145#
146#$(BIN)$/pyuno-$(PLATFORM)-$(PYVERSION)$(PACKSUFFIX) : makefile.mk dirs $(FILES)
147#	-rm $@
148#.IF "$(GUI)"=="WNT"
149#	+cd $(DESTROOT) && zip -r ..$/pyuno-$(PLATFORM)-$(VERSION)$(PACKSUFFIX) program
150#.ELSE
151#	$(FIND) $(DESTROOT) -name '*.so' | xargs strip
152#	cd $(DESTROOT) && tar -cO program | gzip - > ..$/pyuno-$(PLATFORM)-$(VERSION)$(PACKSUFFIX)
153#.ENDIF
154#
155#
156#dirs .PHONY:
157#	-mkdir $(PYRUNTIME_DIRS)
158#
159## Some symbolic links for unix
160#.IF "$(GUI)" == "UNX"
161#$(PYRUNTIMELINK) : makefile.mk
162#	-rm -f $@
163#	cd $(DESTROOT)$/program && ln -s $(PYDIRNAME) python
164#
165#$(PYRUNTIMELIBLINK1) : makefile.mk
166#	-rm -f $@
167#	cd $(DESTROOT)$/program && ln -s $(DLLPRE)python$(DLLPOST).$(PYVERSION) $(DLLPRE)python$(DLLPOST).$(PYMAJOR)
168#
169#$(PYRUNTIMELIBLINK2) : makefile.mk
170#	-rm -f $@
171#	cd $(DESTROOT)$/program && ln -s $(DLLPRE)python$(DLLPOST).$(PYVERSION) $(DLLPRE)python$(DLLPOST)
172#.ENDIF
173#
174#$(DESTROOT)$/program$/regcomp$(EXESUFFIX) : $(SOLARBINDIR)$/regcomp$(EXESUFFIX)
175#	cp $? $@
176#.IF "$(GUI)" == "UNX"
177#	strip $@
178#	chmod +x $@
179#.ENDIF
180#
181#
182#$(DESTROOT)$/program$/pyunoenv$(ENVSUFFIX) : pyunoenv$(ENVSUFFIX)
183#	-rm -f $@
184#	cat $? > $@
185#
186#$(DESTROOT)$/program$/$(DLLPRE)pyuno$(DLLPOST) : $(DLLDEST)$/$(DLLPRE)pyuno$(DLLPOST)
187#	cp $? $@
188#
189#$(DESTROOT)$/program$/pyuno_setup$(BATCHSUFFIX) : makefile.mk
190#	-rm -f $@
191#.IF "$(GUI)"!="WNT"
192#	echo #\!/bin/sh >> $@
193#	chmod +x $@
194#.ENDIF
195#	echo regcomp -register -r services.rdb -c pythonloader.uno >>$@
196##	echo "$(MYCOPY) applicat.rdb pydemo$/applicat.rdb" >> $@
197#	echo regcomp -register -br types.rdb -br services.rdb -r services.rdb -c vnd.openoffice.pymodule:swritercomp -l com.sun.star.loader.Python >>$@
198#
199#$(DESTROOT)$/program$/$(DLLPRE)python$(DLLPOST).$(PYVERSION) : $(SOLARLIBDIR)$/$(DLLPRE)python$(DLLPOST).$(PYVERSION)
200#	cp $? $@
201#
202#$(DESTROOT)$/program$/pythonloader.uno$(DLLPOST) : $(DLLDEST)$/pythonloader.uno$(DLLPOST)
203#	cp $? $@
204#
205#$(DESTROOT)$/program$/%.py : $(DLLDEST)$/%.py
206#	cp $? $@
207#
208#.IF "$(GUI)" == "UNX"
209#$(DESTROOT)$/program$/pyuno$(DLLPOST) : $(DLLDEST)$/pyuno$(DLLPOST)
210#	cp $? $@
211#.ENDIF
212#
213#$(DESTROOT)$/program$/pydemo$/%.py : %.py
214#	-rm -f $@
215#	cat $? > $@
216#
217#$(DESTROOT)$/program$/pyuno$(INISUFFIX) : makefile.mk
218#	-rm -f $@ $(DESTROOT)$/program$/pyuno.tmp
219#	echo UNO_TYPES=$(DOLLAR_SIGN)PYUNOLIBDIR/types.rdb > $(DESTROOT)$/program$/pyuno.tmp
220#	echo UNO_SERVICES=$(DOLLAR_SIGN)PYUNOLIBDIR/services.rdb >> $(DESTROOT)$/program$/pyuno.tmp
221#	mv $(DESTROOT)$/program$/pyuno.tmp $@
222#
223#$(DESTROOT)$/program$/pydemo$/python-bridge.html : ..$/doc$/python-bridge.html
224#	-rm -f $@
225#	cat $? > $@
226#
227#
228# $(DESTROOT)$/program$/$(PYDIRNAME)$/lib$/%.so : $(SOLARLIBDIR)$/python$/%.so
229# 	-rm -f $@
230# 	cat $? > $@
231# 	strip $@
232#
233#$(DESTROOT)$/program$/$(PYDIRNAME)$/lib$/% : $(SOLARLIBDIR)$/python$/%
234#	-rm -f $@
235#	cat $? > $@
236#
237#
238#$(DESTROOT)$/program$/$(PYDIRNAME)$/bin$/python$(EXESUFFIX) : $(SOLARBINDIR)$/python$(EXESUFFIX)
239#	-rm -f $@
240#	cat $? > $@
241#.IF "$(GUI)" == "UNX"
242#	strip $@
243#	chmod +x $@
244#.ENDIF
245#
246#
247#
248#
249#
250