bump product version to 5.0.4.1
[LibreOffice.git] / testtools / source / bridgetest / pyuno / makefile.mk
blob5dbd0038f009aff82c4ab8dc5573a81a7b4c4e9e
2 # This file is part of the LibreOffice project.
4 # This Source Code Form is subject to the terms of the Mozilla Public
5 # License, v. 2.0. If a copy of the MPL was not distributed with this
6 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 # This file incorporates work covered by the following license notice:
10 # Licensed to the Apache Software Foundation (ASF) under one or more
11 # contributor license agreements. See the NOTICE file distributed
12 # with this work for additional information regarding copyright
13 # ownership. The ASF licenses this file to you under the Apache
14 # License, Version 2.0 (the "License"); you may not use this file
15 # except in compliance with the License. You may obtain a copy of
16 # the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 PRJ=..$/..$/..
21 PRJNAME=pyuno
22 TARGET=test
23 LIBTARGET=NO
24 TARGETTYPE=CUI
25 ENABLE_EXCEPTIONS=TRUE
27 my_components = pythonloader
29 # --- Settings -----------------------------------------------------
31 .INCLUDE : settings.mk
33 .IF "$(CROSS_COMPILING)"=="YES"
35 all:
36 # nothing
38 .ENDIF
40 # --- Files --------------------------------------------------------
41 .IF "$(DISABLE_PYTHON)" != "TRUE"
42 .IF "$(L10N_framework)"==""
43 PYEXC=$(DLLDEST)$/python$(EXECPOST)
44 REGEXC=$(DLLDEST)$/regcomp$(EXECPOST)
46 .IF "$(SYSTEM_PYTHON)"!="YES"
47 PYTHON=$(AUGMENT_LIBRARY_PATH) $(WRAPCMD) $(SOLARBINDIR)/python
48 .ELSE # "$(SYSTEM_PYTHON)"!="YES"
49 PYTHON=$(AUGMENT_LIBRARY_PATH) $(WRAPCMD) python
50 .ENDIF # "$(SYSTEM_PYTHON)"!="YES"
51 .IF "$(OS)"=="WNT"
52 PYTHONPATH:=$(SOLARLIBDIR)$/pyuno;$(PWD);$(SOLARLIBDIR);$(SOLARLIBDIR)$/python;$(SOLARLIBDIR)$/python$/lib-dynload
53 .ELSE # "$(OS)"=="WNT"
54 PYTHONPATH:=$(SOLARLIBDIR)$/pyuno:$(PWD):$(SOLARLIBDIR):$(SOLARLIBDIR)$/python:$(SOLARLIBDIR)$/python$/lib-dynload
55 .ENDIF # "$(OS)"=="WNT"
56 .EXPORT: PYTHONPATH
58 .IF "$(OS)"!="WNT"
59 TEST_ENV=export FOO=file://$(shell @pwd)$/$(DLLDEST) \
60 UNO_TYPES=uno_types.rdb UNO_SERVICES=pyuno_services.rdb
61 .ELSE # "$(OS)" != "WNT"
62 # aaaaaa, how to get the current working directory on windows ???
63 CWD_TMP=$(strip $(shell @echo "import os;print os.getcwd()" | $(PYTHON)))
64 TEST_ENV=export FOO=file:///$(strip $(subst,\,/ $(CWD_TMP)$/$(DLLDEST))) && \
65 export UNO_TYPES=uno_types.rdb && export UNO_SERVICES=pyuno_services.rdb
66 .ENDIF # "$(OS)"!="WNT"
67 PYFILES = \
68 $(DLLDEST)$/core.py \
69 $(DLLDEST)$/importer.py \
70 $(DLLDEST)$/main.py \
71 $(DLLDEST)$/impl.py \
72 $(DLLDEST)$/samplecomponent.py \
73 $(DLLDEST)$/testcomp.py \
75 PYCOMPONENTS = \
76 samplecomponent
78 ALL : \
79 $(PYFILES) \
80 $(DLLDEST)/pyuno_services.rdb \
81 doc \
82 ALLTAR
83 .ENDIF # L10N_framework
84 .ENDIF # DISABLE_PYTHON
86 .INCLUDE : target.mk
88 .IF "$(DISABLE_PYTHON)" != "TRUE"
89 .IF "$(L10N_framework)"==""
90 $(DLLDEST)$/%.py: %.py
91 cp $? $@
93 $(DLLDEST)$/python$(EXECPOST) : $(SOLARBINDIR)$/python$(EXECPOST)
94 cp $? $@
96 $(DLLDEST)$/regcomp$(EXECPOST) : $(SOLARBINDIR)$/regcomp$(EXECPOST)
97 cp $? $@
99 $(DLLDEST)$/pyuno_services.rdb .ERRREMOVE : \
100 $(SOLARENV)/bin/packcomponents.xslt $(MISC)/pyuno_services.input \
101 $(my_components:^"$(SOLARXMLDIR)/":+".component")
102 $(XSLTPROC) --nonet --stringparam prefix $(SOLARXMLDIR)/ -o $@ \
103 $(SOLARENV)/bin/packcomponents.xslt $(MISC)/pyuno_services.input
105 $(MISC)/pyuno_services.input :
106 echo \
107 '<list>$(my_components:^"<filename>":+".component</filename>")</list>' \
108 > $@
110 doc .PHONY:
111 @echo start test with dmake runtest
113 runtest : ALL
114 cd $(DLLDEST) && $(TEST_ENV) && $(PYTHON) main.py
115 .ENDIF # L10N_framework
116 .ENDIF # DISABLE_PYTHON