xref: /trunk/main/bean/test/makefile.mk (revision cdf0e10c)
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 := bean
30TARGET := test
31PACKAGE = test
32
33.INCLUDE: settings.mk
34
35#----- compile .java files -----------------------------------------
36
37JARFILES = officebean.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar
38JAVAFILES       = Test.java
39JAVACLASSFILES	= $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
40
41#----- make a jar from compiled files ------------------------------
42
43MAXLINELENGTH = 100000
44
45#JARCLASSDIRS    = $(PACKAGE)
46#JARTARGET       = $(TARGET).jar
47#JARCOMPRESS 	= TRUE
48
49# --- Parameters for the test --------------------------------------
50
51# test base is java complex
52#CT_TESTBASE = -TestBase java_complex
53
54# test looks something like the.full.package.TestName
55#CT_TEST     = -o $(PACKAGE:s\$/\.\).$(JAVAFILES:b)
56
57# start the runner application
58#CT_APP      = org.openoffice.Runner
59
60#CT_NOOFFICE = -NoOffice
61
62
63OFFICE_CLASSPATH_TMP:=$(foreach,i,$(JARFILES) $(office)$/program$/classes$/$(i)$(PATH_SEPERATOR))
64
65OFFICE_CLASSPATH=$(OFFICE_CLASSPATH_TMP:t"")$(PATH_SEPERATOR)$(CLASSDIR)
66
67OOOBEAN_OPTIONS=-Dcom.sun.star.officebean.Options=-norestore
68
69
70.INCLUDE: target.mk
71
72ALLTAR : RUNINSTRUCTIONS
73
74# --- Targets ------------------------------------------------------
75
76#The OOoBean uses the classpath to find the office installation.
77#Therefore we must use the jar files from the office.
78RUN:
79    java -cp $(OFFICE_CLASSPATH) $(OOOBEAN_OPTIONS) $(PACKAGE).Test
80run: RUN
81
82rund:
83    java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8100 -cp $(OFFICE_CLASSPATH) $(OOOBEAN_OPTIONS) $(PACKAGE).Test
84
85
86
87RUNINSTRUCTIONS :
88    @echo .
89    @echo ###########################   N O T E  ######################################
90    @echo .
91    @echo "To run the test you have to provide the office location."
92    @echo Example:
93    @echo dmake run office="d:/myOffice"
94    @echo .
95
96