1#************************************************************************* 2# 3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4# 5# Copyright 2000, 2010 Oracle and/or its affiliates. 6# 7# OpenOffice.org - a multi-platform office productivity suite 8# 9# This file is part of OpenOffice.org. 10# 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. 14# 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). 20# 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. 25# 26#************************************************************************* 27 28PRJ := ..$/..$/.. 29PRJNAME := bridges 30 31TARGET := test_javauno_acquire 32PACKAGE := test$/javauno$/acquire 33 34ENABLE_EXCEPTIONS := TRUE 35 36.INCLUDE: settings.mk 37 38DLLPRE = # no leading "lib" on .so files 39INCPRE += $(MISC)$/$(TARGET)$/inc 40 41SLOFILES = $(SLO)$/testacquire.obj 42 43SHL1TARGET = testacquire.uno 44SHL1OBJS = $(SLOFILES) 45SHL1STDLIBS = $(CPPULIB) $(CPPUHELPERLIB) $(SALLIB) 46SHL1VERSIONMAP = $(SOLARENV)/src/component.map 47SHL1IMPLIB = itestacquire 48 49JAVAFILES = TestAcquire.java 50JARFILES = OOoRunner.jar juh.jar jurt.jar ridl.jar 51 52.INCLUDE: target.mk 53 54ALLTAR: \ 55 $(BIN)$/testacquire-java-client \ 56 $(BIN)$/testacquire-java-server \ 57 $(BIN)$/testacquire-native-client \ 58 $(BIN)$/testacquire-native-server 59 60.IF "$(GUI)" == "WNT" 61GIVE_EXEC_RIGHTS = @echo 62.ELSE # GUI, WNT 63GIVE_EXEC_RIGHTS = chmod +x 64.ENDIF # GUI, WNT 65 66EXEC_CLASSPATH_TMP = $(foreach,i,$(JARFILES) $(SOLARBINDIR)$/$i) 67EXEC_CLASSPATH = \ 68 $(strip $(subst,!,$(PATH_SEPERATOR) $(EXEC_CLASSPATH_TMP:s/ /!/))) 69 70$(BIN)$/$(TARGET).rdb: types.idl 71 - rm $@ 72 - $(MKDIR) $(MISC)$/$(TARGET) 73 - $(MKDIR) $(MISC)$/$(TARGET)$/inc 74 $(IDLC) -I$(SOLARIDLDIR) -O$(MISC)$/$(TARGET) $< 75 $(REGMERGE) $@ /UCR $(MISC)$/$(TARGET)$/types.urd 76 $(CPPUMAKER) -BUCR -C -O$(MISC)$/$(TARGET)$/inc $@ -X$(SOLARBINDIR)$/types.rdb 77 $(JAVAMAKER) -BUCR -nD -O$(CLASSDIR) $@ -X$(SOLARBINDIR)$/types.rdb 78 $(REGMERGE) $@ / $(SOLARBINDIR)$/types.rdb 79 $(REGCOMP) -register -r $@ -c acceptor.uno$(DLLPOST) \ 80 -c bridgefac.uno$(DLLPOST) -c connector.uno$(DLLPOST) \ 81 -c remotebridge.uno$(DLLPOST) -c uuresolver.uno$(DLLPOST) 82 83$(SLOFILES) $(JAVACLASSFILES): $(BIN)$/$(TARGET).rdb 84 85# Use "127.0.0.1" instead of "localhost", see #i32281#: 86TEST_JAVAUNO_ACQUIRE_UNO_URL := \ 87 \"'uno:socket,host=127.0.0.1,port=2002;urp;test'\" 88 89$(BIN)$/testacquire-java-client: 90 echo java -classpath \ 91 ..$/class$/test$(PATH_SEPERATOR)..$/class$(PATH_SEPERATOR)\ 92..$/class$/java_uno.jar$(PATH_SEPERATOR)$(EXEC_CLASSPATH) \ 93 test.javauno.acquire.TestAcquire client \ 94 $(TEST_JAVAUNO_ACQUIRE_UNO_URL) > $@ 95 $(GIVE_EXEC_RIGHTS) $@ 96 97$(BIN)$/testacquire-java-server: 98 echo java -classpath \ 99 ..$/class$/test$(PATH_SEPERATOR)..$/class$(PATH_SEPERATOR)\ 100..$/class$/java_uno.jar$(PATH_SEPERATOR)$(EXEC_CLASSPATH) \ 101 test.javauno.acquire.TestAcquire server \ 102 $(TEST_JAVAUNO_ACQUIRE_UNO_URL) > $@ 103 $(GIVE_EXEC_RIGHTS) $@ 104 105$(BIN)$/testacquire-native-client: 106 echo '$(AUGMENT_LIBRARY_PATH)' uno \ 107 -c com.sun.star.test.bridges.testacquire.impl \ 108 -l ../lib/$(SHL1TARGETN:f) -ro $(TARGET).rdb -- \ 109 $(TEST_JAVAUNO_ACQUIRE_UNO_URL) > $@ 110 $(GIVE_EXEC_RIGHTS) $@ 111 112$(BIN)$/testacquire-native-server: 113 echo '$(AUGMENT_LIBRARY_PATH)' uno \ 114 -c com.sun.star.test.bridges.testacquire.impl \ 115 -l ../lib/$(SHL1TARGETN:f) -ro $(TARGET).rdb \ 116 -u $(TEST_JAVAUNO_ACQUIRE_UNO_URL) --singleaccept > $@ 117 $(GIVE_EXEC_RIGHTS) $@ 118