1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: makefile.mk,v $
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 #*************************************************************************
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
)
49 .IF
"$(USE_SHELL)" != "tcsh"
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
62 setenv FOO file
://$(shell @pwd
)$/$(DLLDEST
) && \
63 setenv UNO_TYPES pyuno_regcomp.rdb
&& setenv UNO_SERVICES pyuno_regcomp.rdb
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
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"
79 $(DLLDEST
)$/importer.py \
82 $(DLLDEST
)$/samplecomponent.py \
83 $(DLLDEST
)$/testcomp.py \
90 $(DLLDEST
)$/pyuno_regcomp.rdb \
93 .ENDIF
# L10N_framework
96 .IF
"$(L10N_framework)"==""
97 $(DLLDEST
)$/%.py
: %.py
100 $(DLLDEST
)$/python
$(EXECPOST
) : $(SOLARBINDIR
)$/python
$(EXECPOST
)
103 $(DLLDEST
)$/regcomp
$(EXECPOST
) : $(SOLARBINDIR
)$/regcomp
$(EXECPOST
)
106 $(DLLDEST
)$/pyuno_regcomp.rdb
: $(DLLDEST
)$/uno_types.rdb
$(SOLARBINDIR
)$/pyuno_services.rdb
108 $(WRAPCMD
) $(REGMERGE
) $(DLLDEST
)$/pyuno_regcomp.rdb
/ $(DLLDEST
)$/uno_types.rdb
$(SOLARBINDIR
)$/pyuno_services.rdb
111 @echo start
test with dmake runtest
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