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 .
25 ENABLE_EXCEPTIONS
=TRUE
27 my_components
= pythonloader
29 # --- Settings -----------------------------------------------------
31 .INCLUDE
: settings.mk
33 .IF
"$(CROSS_COMPILING)"=="YES"
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"
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"
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"
69 $(DLLDEST
)$/importer.py \
72 $(DLLDEST
)$/samplecomponent.py \
73 $(DLLDEST
)$/testcomp.py \
80 $(DLLDEST
)/pyuno_services.rdb \
83 .ENDIF
# L10N_framework
84 .ENDIF
# DISABLE_PYTHON
88 .IF
"$(DISABLE_PYTHON)" != "TRUE"
89 .IF
"$(L10N_framework)"==""
90 $(DLLDEST
)$/%.py
: %.py
93 $(DLLDEST
)$/python
$(EXECPOST
) : $(SOLARBINDIR
)$/python
$(EXECPOST
)
96 $(DLLDEST
)$/regcomp
$(EXECPOST
) : $(SOLARBINDIR
)$/regcomp
$(EXECPOST
)
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
:
107 '<list>$(my_components:^"<filename>":+".component</filename>")</list>' \
111 @echo start
test with dmake runtest
114 cd
$(DLLDEST
) && $(TEST_ENV
) && $(PYTHON
) main.py
115 .ENDIF
# L10N_framework
116 .ENDIF
# DISABLE_PYTHON