1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 # Copyright 2000, 2010 Oracle and/or its affiliates.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # This file is part of OpenOffice.org.
11 # OpenOffice.org is free software: you can redistribute it and/or modify
12 # it under the terms of the GNU Lesser General Public License version 3
13 # only, as published by the Free Software Foundation.
15 # OpenOffice.org is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU Lesser General Public License version 3 for more details
19 # (a copy is included in the LICENSE file that accompanied this code).
21 # You should have received a copy of the GNU Lesser General Public License
22 # version 3 along with OpenOffice.org. If not, see
23 # <http://www.openoffice.org/license.html>
24 # for a copy of the LGPLv3 License.
26 #*************************************************************************
33 ENABLE_EXCEPTIONS
=TRUE
37 .IF
"$(L10N_framework)"==""
38 DLLPRE
= # no leading "lib" on .so files
42 GIVE_EXEC_RIGHTS
=@echo
43 MY_URE_INTERNAL_JAVA_DIR
=$(strip $(subst,\
,/ file
:///$(shell @
$(WRAPCMD
) echo
$(SOLARBINDIR
))))
44 MY_LOCAL_CLASSDIR
=$(strip $(subst,\
,/ file
:///$(shell $(WRAPCMD
) echo
$(PWD
)/$(CLASSDIR
)/)))
47 GIVE_EXEC_RIGHTS
=@echo
48 MY_URE_INTERNAL_JAVA_DIR
=$(strip $(subst,\
,/ file
:///$(shell @
$(WRAPCMD
) echo
$(SOLARBINDIR
))))
49 MY_LOCAL_CLASSDIR
=$(strip $(subst,\
,/ file
:///$(shell $(WRAPCMD
) echo
$(PWD
)/$(CLASSDIR
)/)))
51 GIVE_EXEC_RIGHTS
=chmod
+x
52 MY_URE_INTERNAL_JAVA_DIR
=file
://$(SOLARBINDIR
)
53 MY_LOCAL_CLASSDIR
=file
://$(PWD
)/$(CLASSDIR
)/
56 my_components
= bridgetest constructors cppobj
57 .IF
"$(SOLAR_JAVA)" != ""
58 my_components
+= testComponent
62 .IF
"$(compcheck)" != ""
63 CFLAGSCXX
+= -DCOMPCHECK
68 $(SLO
)$/bridgetest.obj \
70 $(SLO
)$/currentcontextchecker.obj \
75 LIB1TARGET
=$(SLB
)$/cppobj.lib
77 $(SLO
)$/cppobj.obj
$(SLO
)$/currentcontextchecker.obj
$(SLO
)$/multi.obj
79 SHL1TARGET
= cppobj.uno
85 SHL1LIBS
= $(LIB1TARGET
)
86 SHL1DEF
= $(MISC
)$/$(SHL1TARGET
).def
87 DEF1NAME
= $(SHL1TARGET
)
88 SHL1VERSIONMAP
= $(SOLARENV
)/src
/component.map
90 # ---- test object ----
92 LIB2TARGET
=$(SLB
)$/bridgetest.lib
94 $(SLO
)$/bridgetest.obj \
95 $(SLO
)$/currentcontextchecker.obj \
98 SHL2TARGET
= bridgetest.uno
104 SHL2LIBS
= $(LIB2TARGET
)
105 SHL2DEF
= $(MISC
)$/$(SHL2TARGET
).def
106 DEF2NAME
= $(SHL2TARGET
)
107 SHL2VERSIONMAP
= $(SOLARENV
)/src
/component.map
109 SHL3TARGET
= constructors.uno
110 SHL3OBJS
= $(SLO
)$/constructors.obj
111 SHL3STDLIBS
= $(CPPULIB
) $(CPPUHELPERLIB
) $(SALLIB
)
112 SHL3VERSIONMAP
= $(SOLARENV
)/src
/component.map
113 SHL3IMPLIB
= i
$(SHL3TARGET
)
114 DEF3NAME
= $(SHL3TARGET
)
116 .IF
"$(SOLAR_JAVA)" != ""
117 JARFILES
= java_uno.jar jurt.jar ridl.jar
119 $(DLLDEST
)$/bridgetest_javaserver
$(BATCH_SUFFIX
) \
120 $(DLLDEST
)$/bridgetest_inprocess_java
$(BATCH_SUFFIX
)
123 # --- Targets ------------------------------------------------------
124 .ENDIF
# L10N_framework
127 .IF
"$(L10N_framework)"==""
130 $(DLLDEST
)/services.rdb \
131 $(DLLDEST
)$/uno_types.rdb \
132 $(DLLDEST
)$/uno_services.rdb \
133 $(DLLDEST
)$/bridgetest_server
$(BATCH_SUFFIX
) \
134 $(DLLDEST
)$/bridgetest_client
$(BATCH_SUFFIX
) \
137 #################################################################
139 runtest
: $(DLLDEST
)$/uno_types.rdb
$(DLLDEST
)$/uno_services.rdb makefile.mk \
140 $(SHL1TARGETN
) $(SHL2TARGETN
) $(SHL3TARGETN
)
141 .IF
"$(COM)$(OS)$(CPU)" == "GCCMACOSXP"
142 @echo
"Mac OSX PPC GCC fails this test!, likely broken UNO bridge. Fix me."
144 cd
$(DLLDEST
) && $(AUGMENT_LIBRARY_PATH
) $(SOLARBINDIR
)/uno \
145 -ro uno_services.rdb
-ro uno_types.rdb \
146 -s com.sun.star.
test.bridge.BridgeTest
-- \
147 com.sun.star.
test.bridge.CppTestObject
150 $(DLLDEST
)/services.rdb
:
151 $(COPY
) $(SOLARXMLDIR
)/ure
/services.rdb
$@
153 $(DLLDEST
)$/uno_types.rdb
: $(SOLARBINDIR
)$/udkapi.rdb
156 $(REGMERGE
) $@
/ $(BIN
)$/bridgetest.rdb
158 $(DLLDEST
)$/bridgetest_client
$(BATCH_SUFFIX
) .ERRREMOVE
: makefile.mk
159 echo
'$(AUGMENT_LIBRARY_PATH)' '$(SOLARBINDIR)'/uno
-ro services.rdb \
160 -ro uno_services.rdb
-ro uno_types.rdb \
161 -s com.sun.star.
test.bridge.BridgeTest
-- \
162 -u
\''uno:socket,host=127.0.0.1,port=2002;urp;test'\' > $@
163 $(GIVE_EXEC_RIGHTS
) $@
165 $(DLLDEST
)$/bridgetest_server
$(BATCH_SUFFIX
) .ERRREMOVE
: makefile.mk
166 echo
'$(AUGMENT_LIBRARY_PATH)' '$(SOLARBINDIR)'/uno
-ro uno_services.rdb
-ro uno_types.rdb \
167 -s com.sun.star.
test.bridge.CppTestObject \
168 -u
\''uno:socket,host=127.0.0.1,port=2002;urp;test'\' --singleaccept \
170 $(GIVE_EXEC_RIGHTS
) $@
173 .IF
"$(SOLAR_JAVA)" != ""
174 # jar-files, which regcomp needs so that it can use java
175 MY_JARS
=java_uno.jar ridl.jar jurt.jar juh.jar
177 # CLASSPATH, which regcomp needs to be run
178 MY_CLASSPATH_TMP
=$(foreach,i
,$(MY_JARS
) $(SOLARBINDIR
)$/$i)$(PATH_SEPERATOR
)$(XCLASSPATH
)
179 MY_CLASSPATH
=$(strip $(subst,!,$(PATH_SEPERATOR
) $(MY_CLASSPATH_TMP
:s
/ /!/)))$(PATH_SEPERATOR
)..
$/class
181 # Use "127.0.0.1" instead of "localhost", see #i32281#:
182 $(DLLDEST
)$/bridgetest_javaserver
$(BATCH_SUFFIX
) : makefile.mk
184 echo java
-classpath
"$(MY_CLASSPATH)$(PATH_SEPERATOR)..$/class$/testComponent.jar" \
185 com.sun.star.comp.bridge.TestComponentMain
\""uno:socket,host=127.0.0.1,port=2002;urp;test"\" singleaccept
> $@
186 $(GIVE_EXEC_RIGHTS
) $@
188 $(DLLDEST
)$/bridgetest_inprocess_java
$(BATCH_SUFFIX
) .ERRREMOVE
: makefile.mk
189 echo
'$(AUGMENT_LIBRARY_PATH)' '$(SOLARBINDIR)'/uno
-ro services.rdb \
190 -ro uno_services.rdb
-ro uno_types.rdb \
191 -s com.sun.star.
test.bridge.BridgeTest \
192 -env
:URE_INTERNAL_JAVA_DIR
=$(MY_URE_INTERNAL_JAVA_DIR
) \
193 -env
:MY_CLASSDIR_URL
=$(MY_LOCAL_CLASSDIR
) \
194 -- com.sun.star.
test.bridge.JavaTestObject noCurrentContext
> $@
195 $(GIVE_EXEC_RIGHTS
) $@
198 $(DLLDEST
)$/uno_services.rdb .ERRREMOVE
: $(SOLARENV
)/bin
/packcomponents.xslt \
199 $(MISC
)/uno_services.input
$(my_components
:^
"$(MISC)/":+".component")
200 $(XSLTPROC
) --nonet
--stringparam
prefix $(PWD
)/$(MISC
)/ -o
$@ \
201 $(SOLARENV
)/bin
/packcomponents.xslt
$(MISC
)/uno_services.input
203 $(MISC
)/uno_services.input
:
205 '<list>$(my_components:^"<filename>":+".component</filename>")</list>' \
208 $(MISC
)/bridgetest.component .ERRREMOVE
: $(SOLARENV
)/bin
/createcomponent.xslt \
210 $(XSLTPROC
) --nonet
--stringparam uri
'./$(SHL2TARGETN:f)' -o
$@ \
211 $(SOLARENV
)/bin
/createcomponent.xslt bridgetest.component
213 $(MISC
)/constructors.component .ERRREMOVE
: \
214 $(SOLARENV
)/bin
/createcomponent.xslt constructors.component
215 $(XSLTPROC
) --nonet
--stringparam uri
'./$(SHL3TARGETN:f)' -o
$@ \
216 $(SOLARENV
)/bin
/createcomponent.xslt constructors.component
218 $(MISC
)/cppobj.component .ERRREMOVE
: $(SOLARENV
)/bin
/createcomponent.xslt \
220 $(XSLTPROC
) --nonet
--stringparam uri
'./$(SHL1TARGETN:f)' -o
$@ \
221 $(SOLARENV
)/bin
/createcomponent.xslt cppobj.component
223 $(MISC
)/testComponent.component .ERRREMOVE
: \
224 $(SOLARENV
)/bin
/createcomponent.xslt testComponent.component
225 $(XSLTPROC
) --nonet
--stringparam uri \
226 'vnd.sun.star.expand:$${{MY_CLASSDIR_URL}}testComponent.jar' -o
$@ \
227 $(SOLARENV
)/bin
/createcomponent.xslt testComponent.component
229 .ENDIF
# L10N_framework