1*7871dc3eSAndrew Rist#************************************************************** 2*7871dc3eSAndrew Rist# 3*7871dc3eSAndrew Rist# Licensed to the Apache Software Foundation (ASF) under one 4*7871dc3eSAndrew Rist# or more contributor license agreements. See the NOTICE file 5*7871dc3eSAndrew Rist# distributed with this work for additional information 6*7871dc3eSAndrew Rist# regarding copyright ownership. The ASF licenses this file 7*7871dc3eSAndrew Rist# to you under the Apache License, Version 2.0 (the 8*7871dc3eSAndrew Rist# "License"); you may not use this file except in compliance 9*7871dc3eSAndrew Rist# with the License. You may obtain a copy of the License at 10*7871dc3eSAndrew Rist# 11*7871dc3eSAndrew Rist# http://www.apache.org/licenses/LICENSE-2.0 12*7871dc3eSAndrew Rist# 13*7871dc3eSAndrew Rist# Unless required by applicable law or agreed to in writing, 14*7871dc3eSAndrew Rist# software distributed under the License is distributed on an 15*7871dc3eSAndrew Rist# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*7871dc3eSAndrew Rist# KIND, either express or implied. See the License for the 17*7871dc3eSAndrew Rist# specific language governing permissions and limitations 18*7871dc3eSAndrew Rist# under the License. 19*7871dc3eSAndrew Rist# 20*7871dc3eSAndrew Rist#************************************************************** 21*7871dc3eSAndrew Rist 22*7871dc3eSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweirPRJ=..$/..$/.. 25cdf0e10cSrcweir 26cdf0e10cSrcweirPRJNAME=pyuno 27cdf0e10cSrcweirTARGET=test 28cdf0e10cSrcweirLIBTARGET=NO 29cdf0e10cSrcweirTARGETTYPE=CUI 30cdf0e10cSrcweirENABLE_EXCEPTIONS=TRUE 31cdf0e10cSrcweir 32cdf0e10cSrcweirmy_components = pythonloader 33cdf0e10cSrcweir 34cdf0e10cSrcweir# --- Settings ----------------------------------------------------- 35cdf0e10cSrcweir 36cdf0e10cSrcweir.INCLUDE : settings.mk 37cdf0e10cSrcweir# --- Files -------------------------------------------------------- 38cdf0e10cSrcweir.IF "$(L10N_framework)"=="" 39cdf0e10cSrcweirPYEXC=$(DLLDEST)$/python$(EXECPOST) 40cdf0e10cSrcweirREGEXC=$(DLLDEST)$/regcomp$(EXECPOST) 41cdf0e10cSrcweir 42cdf0e10cSrcweir.IF "$(SYSTEM_PYTHON)"!="YES" 43cdf0e10cSrcweirPYTHON=$(AUGMENT_LIBRARY_PATH) $(WRAPCMD) $(SOLARBINDIR)/python 44cdf0e10cSrcweir.ELSE # "$(SYSTEM_PYTHON)"!="YES" 45cdf0e10cSrcweirPYTHON=$(AUGMENT_LIBRARY_PATH) $(WRAPCMD) python 46cdf0e10cSrcweir.ENDIF # "$(SYSTEM_PYTHON)"!="YES" 47cdf0e10cSrcweir.IF "$(GUI)"=="WNT" 48cdf0e10cSrcweirPYTHONPATH:=$(SOLARLIBDIR)$/pyuno;$(PWD);$(SOLARLIBDIR);$(SOLARLIBDIR)$/python;$(SOLARLIBDIR)$/python$/lib-dynload 49cdf0e10cSrcweir.ELSE # "$(GUI)"=="WNT" 50cdf0e10cSrcweirPYTHONPATH:=$(SOLARLIBDIR)$/pyuno:$(PWD):$(SOLARLIBDIR):$(SOLARLIBDIR)$/python:$(SOLARLIBDIR)$/python$/lib-dynload 51cdf0e10cSrcweir.ENDIF # "$(GUI)"=="WNT" 52cdf0e10cSrcweir.EXPORT: PYTHONPATH 53cdf0e10cSrcweir 54cdf0e10cSrcweir.IF "$(GUI)"!="WNT" && "$(GUI)"!="OS2" 55cdf0e10cSrcweirTEST_ENV=export FOO=file://$(shell @pwd)$/$(DLLDEST) \ 56cdf0e10cSrcweir UNO_TYPES=uno_types.rdb UNO_SERVICES=pyuno_services.rdb 57cdf0e10cSrcweir.ELSE # "$(GUI)" != "WNT" 58cdf0e10cSrcweir# aaaaaa, how to get the current working directory on windows ??? 59cdf0e10cSrcweirCWD_TMP=$(strip $(shell @echo "import os;print os.getcwd()" | $(PYTHON))) 60cdf0e10cSrcweirTEST_ENV=export FOO=file:///$(strip $(subst,\,/ $(CWD_TMP)$/$(DLLDEST))) && \ 61cdf0e10cSrcweir export UNO_TYPES=uno_types.rdb && export UNO_SERVICES=pyuno_services.rdb 62cdf0e10cSrcweir.ENDIF # "$(GUI)"!="WNT" 63cdf0e10cSrcweirPYFILES = \ 64cdf0e10cSrcweir $(DLLDEST)$/core.py \ 65cdf0e10cSrcweir $(DLLDEST)$/importer.py \ 66cdf0e10cSrcweir $(DLLDEST)$/main.py \ 67cdf0e10cSrcweir $(DLLDEST)$/impl.py \ 68cdf0e10cSrcweir $(DLLDEST)$/samplecomponent.py \ 69cdf0e10cSrcweir $(DLLDEST)$/testcomp.py \ 70cdf0e10cSrcweir 71cdf0e10cSrcweirPYCOMPONENTS = \ 72cdf0e10cSrcweir samplecomponent 73cdf0e10cSrcweir 74cdf0e10cSrcweirALL : \ 75cdf0e10cSrcweir $(PYFILES) \ 76cdf0e10cSrcweir $(DLLDEST)/pyuno_services.rdb \ 77cdf0e10cSrcweir doc \ 78cdf0e10cSrcweir ALLTAR 79cdf0e10cSrcweir.ENDIF # L10N_framework 80cdf0e10cSrcweir 81cdf0e10cSrcweir.INCLUDE : target.mk 82cdf0e10cSrcweir.IF "$(L10N_framework)"=="" 83cdf0e10cSrcweir$(DLLDEST)$/%.py: %.py 84cdf0e10cSrcweir cp $? $@ 85cdf0e10cSrcweir 86cdf0e10cSrcweir$(DLLDEST)$/python$(EXECPOST) : $(SOLARBINDIR)$/python$(EXECPOST) 87cdf0e10cSrcweir cp $? $@ 88cdf0e10cSrcweir 89cdf0e10cSrcweir$(DLLDEST)$/regcomp$(EXECPOST) : $(SOLARBINDIR)$/regcomp$(EXECPOST) 90cdf0e10cSrcweir cp $? $@ 91cdf0e10cSrcweir 92cdf0e10cSrcweir$(DLLDEST)$/pyuno_services.rdb .ERRREMOVE : \ 93cdf0e10cSrcweir $(SOLARENV)/bin/packcomponents.xslt $(MISC)/pyuno_services.input \ 94cdf0e10cSrcweir $(my_components:^"$(SOLARXMLDIR)/":+".component") 95cdf0e10cSrcweir $(XSLTPROC) --nonet --stringparam prefix $(SOLARXMLDIR)/ -o $@ \ 96cdf0e10cSrcweir $(SOLARENV)/bin/packcomponents.xslt $(MISC)/pyuno_services.input 97cdf0e10cSrcweir 98cdf0e10cSrcweir$(MISC)/pyuno_services.input : 99cdf0e10cSrcweir echo \ 100cdf0e10cSrcweir '<list>$(my_components:^"<filename>":+".component</filename>")</list>' \ 101cdf0e10cSrcweir > $@ 102cdf0e10cSrcweir 103cdf0e10cSrcweirdoc .PHONY: 104cdf0e10cSrcweir @echo start test with dmake runtest 105cdf0e10cSrcweir 106cdf0e10cSrcweirruntest : ALL 107cdf0e10cSrcweir cd $(DLLDEST) && $(TEST_ENV) && $(PYTHON) main.py 108cdf0e10cSrcweir.ENDIF # L10N_framework 109cdf0e10cSrcweir 110