merge the formfield patch from ooo-build
[ooovba.git] / testtools / source / bridgetest / pyuno / makefile.mk
blob44b9f98603b78fc19b41552ec39b08d2927418e1
1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: makefile.mk,v $
11 # $Revision: 1.9 $
13 # This file is part of OpenOffice.org.
15 # OpenOffice.org is free software: you can redistribute it and/or modify
16 # it under the terms of the GNU Lesser General Public License version 3
17 # only, as published by the Free Software Foundation.
19 # OpenOffice.org is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU Lesser General Public License version 3 for more details
23 # (a copy is included in the LICENSE file that accompanied this code).
25 # You should have received a copy of the GNU Lesser General Public License
26 # version 3 along with OpenOffice.org. If not, see
27 # <http://www.openoffice.org/license.html>
28 # for a copy of the LGPLv3 License.
30 #*************************************************************************
32 PRJ=..$/..$/..
34 PRJNAME=pyuno
35 TARGET=test
36 LIBTARGET=NO
37 TARGETTYPE=CUI
38 ENABLE_EXCEPTIONS=TRUE
40 # --- Settings -----------------------------------------------------
42 .INCLUDE : settings.mk
43 # --- Files --------------------------------------------------------
44 .IF "$(L10N_framework)"==""
45 PYEXC=$(DLLDEST)$/python$(EXECPOST)
46 REGEXC=$(DLLDEST)$/regcomp$(EXECPOST)
48 DOLLAR_SIGN=\$$
49 .IF "$(USE_SHELL)" != "tcsh"
50 DOLLAR_SIGN=$$
51 .ENDIF
53 #these are temporary
54 PYTHON=$(WRAPCMD) python
56 .IF "$(GUI)"!="WNT" && "$(GUI)"!="OS2"
57 .IF "$(USE_SHELL)"=="bash"
58 TEST_ENV=export FOO=file://$(shell @pwd)$/$(DLLDEST) \
59 UNO_TYPES=pyuno_regcomp.rdb UNO_SERVICES=pyuno_regcomp.rdb
60 .ELSE
61 TEST_ENV=\
62 setenv FOO file://$(shell @pwd)$/$(DLLDEST) && \
63 setenv UNO_TYPES pyuno_regcomp.rdb && setenv UNO_SERVICES pyuno_regcomp.rdb
64 .ENDIF
65 .ELSE # "$(GUI)" != "WNT"
66 # aaaaaa, how to get the current working directory on windows ???
67 CWD_TMP=$(strip $(shell @echo "import os;print os.getcwd()" | $(PYTHON)))
68 .IF "$(USE_SHELL)" == "tcsh"
69 TEST_ENV=setenv FOO file:///$(strip $(subst,\,/ $(CWD_TMP)/$(DLLDEST))) && \
70 setenv UNO_TYPES pyuno_regcomp.rdb && setenv UNO_SERVICES pyuno_regcomp.rdb
71 .ELSE
72 TEST_ENV=export FOO=file:///$(strip $(subst,\,/ $(CWD_TMP)$/$(DLLDEST))) && \
73 export UNO_TYPES=pyuno_regcomp.rdb && export UNO_SERVICES=pyuno_regcomp.rdb
74 .ENDIF "$(USE_SHELL)" == "tcsh"
76 .ENDIF # "$(GUI)"!="WNT"
77 PYFILES = \
78 $(DLLDEST)$/core.py \
79 $(DLLDEST)$/importer.py \
80 $(DLLDEST)$/main.py \
81 $(DLLDEST)$/impl.py \
82 $(DLLDEST)$/samplecomponent.py \
83 $(DLLDEST)$/testcomp.py \
85 PYCOMPONENTS = \
86 samplecomponent
88 ALL : \
89 $(PYFILES) \
90 $(DLLDEST)$/pyuno_regcomp.rdb \
91 doc \
92 ALLTAR
93 .ENDIF # L10N_framework
95 .INCLUDE : target.mk
96 .IF "$(L10N_framework)"==""
97 $(DLLDEST)$/%.py: %.py
98 cp $? $@
100 $(DLLDEST)$/python$(EXECPOST) : $(SOLARBINDIR)$/python$(EXECPOST)
101 cp $? $@
103 $(DLLDEST)$/regcomp$(EXECPOST) : $(SOLARBINDIR)$/regcomp$(EXECPOST)
104 cp $? $@
106 $(DLLDEST)$/pyuno_regcomp.rdb: $(DLLDEST)$/uno_types.rdb $(SOLARBINDIR)$/pyuno_services.rdb
107 -rm -f $@
108 $(WRAPCMD) $(REGMERGE) $(DLLDEST)$/pyuno_regcomp.rdb / $(DLLDEST)$/uno_types.rdb $(SOLARBINDIR)$/pyuno_services.rdb
110 doc .PHONY:
111 @echo start test with dmake runtest
113 runtest : ALL
114 cd $(DLLDEST) && $(TEST_ENV) && python main.py
115 cd $(DLLDEST) && $(TEST_ENV) && $(WRAPCMD) $(REGCOMP) -register -br pyuno_regcomp.rdb -r dummy.rdb \
116 -l com.sun.star.loader.Python $(foreach,i,$(PYCOMPONENTS) -c vnd.openoffice.pymodule:$(i))
117 cd $(DLLDEST) && $(TEST_ENV) && $(WRAPCMD) $(REGCOMP) -register -br pyuno_regcomp.rdb -r dummy2.rdb \
118 -l com.sun.star.loader.Python -c vnd.sun.star.expand:$(DOLLAR_SIGN)FOO/samplecomponent.py
119 .ENDIF # L10N_framework