xref: /trunk/main/bean/test/makefile.mk (revision 7871dc3e)
1#**************************************************************
2#
3#  Licensed to the Apache Software Foundation (ASF) under one
4#  or more contributor license agreements.  See the NOTICE file
5#  distributed with this work for additional information
6#  regarding copyright ownership.  The ASF licenses this file
7#  to you under the Apache License, Version 2.0 (the
8#  "License"); you may not use this file except in compliance
9#  with the License.  You may obtain a copy of the License at
10#
11#    http://www.apache.org/licenses/LICENSE-2.0
12#
13#  Unless required by applicable law or agreed to in writing,
14#  software distributed under the License is distributed on an
15#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16#  KIND, either express or implied.  See the License for the
17#  specific language governing permissions and limitations
18#  under the License.
19#
20#**************************************************************
21
22
23
24PRJ := ..
25PRJNAME := bean
26TARGET := test
27PACKAGE = test
28
29.INCLUDE: settings.mk
30
31#----- compile .java files -----------------------------------------
32
33JARFILES = officebean.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar
34JAVAFILES       = Test.java
35JAVACLASSFILES	= $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
36
37#----- make a jar from compiled files ------------------------------
38
39MAXLINELENGTH = 100000
40
41#JARCLASSDIRS    = $(PACKAGE)
42#JARTARGET       = $(TARGET).jar
43#JARCOMPRESS 	= TRUE
44
45# --- Parameters for the test --------------------------------------
46
47# test base is java complex
48#CT_TESTBASE = -TestBase java_complex
49
50# test looks something like the.full.package.TestName
51#CT_TEST     = -o $(PACKAGE:s\$/\.\).$(JAVAFILES:b)
52
53# start the runner application
54#CT_APP      = org.openoffice.Runner
55
56#CT_NOOFFICE = -NoOffice
57
58
59OFFICE_CLASSPATH_TMP:=$(foreach,i,$(JARFILES) $(office)$/program$/classes$/$(i)$(PATH_SEPERATOR))
60
61OFFICE_CLASSPATH=$(OFFICE_CLASSPATH_TMP:t"")$(PATH_SEPERATOR)$(CLASSDIR)
62
63OOOBEAN_OPTIONS=-Dcom.sun.star.officebean.Options=-norestore
64
65
66.INCLUDE: target.mk
67
68ALLTAR : RUNINSTRUCTIONS
69
70# --- Targets ------------------------------------------------------
71
72#The OOoBean uses the classpath to find the office installation.
73#Therefore we must use the jar files from the office.
74RUN:
75    java -cp $(OFFICE_CLASSPATH) $(OOOBEAN_OPTIONS) $(PACKAGE).Test
76run: RUN
77
78rund:
79    java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8100 -cp $(OFFICE_CLASSPATH) $(OOOBEAN_OPTIONS) $(PACKAGE).Test
80
81
82
83RUNINSTRUCTIONS :
84    @echo .
85    @echo ###########################   N O T E  ######################################
86    @echo .
87    @echo "To run the test you have to provide the office location."
88    @echo Example:
89    @echo dmake run office="d:/myOffice"
90    @echo .
91
92