xref: /aoo42x/main/cli_ure/qa/climaker/makefile.mk (revision cdf0e10c)
1*cdf0e10cSrcweir#*************************************************************************
2*cdf0e10cSrcweir#
3*cdf0e10cSrcweir# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir#
5*cdf0e10cSrcweir# Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir#
7*cdf0e10cSrcweir# OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir#
9*cdf0e10cSrcweir# This file is part of OpenOffice.org.
10*cdf0e10cSrcweir#
11*cdf0e10cSrcweir# OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir# it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir# only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir#
15*cdf0e10cSrcweir# OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir# but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir# GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir# (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir#
21*cdf0e10cSrcweir# You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir# version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir# <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir# for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir#
26*cdf0e10cSrcweir#*************************************************************************
27*cdf0e10cSrcweir
28*cdf0e10cSrcweirPRJ := ..$/..
29*cdf0e10cSrcweirPRJNAME := cli_ure
30*cdf0e10cSrcweirTARGET := test_climaker
31*cdf0e10cSrcweirPACKAGE = climaker
32*cdf0e10cSrcweir
33*cdf0e10cSrcweir#we use the climaker which is build by this project
34*cdf0e10cSrcweirCLIMAKER*=$(WRAPCMD) $(BIN)$/climaker
35*cdf0e10cSrcweir.INCLUDE: settings.mk
36*cdf0e10cSrcweir
37*cdf0e10cSrcweir
38*cdf0e10cSrcweir#----- compile .java files -----------------------------------------
39*cdf0e10cSrcweir
40*cdf0e10cSrcweirJARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
41*cdf0e10cSrcweirJAVAFILES       = ClimakerTestCase.java
42*cdf0e10cSrcweirJAVACLASSFILES	= $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
43*cdf0e10cSrcweir
44*cdf0e10cSrcweir#----- make a jar from compiled files ------------------------------
45*cdf0e10cSrcweir
46*cdf0e10cSrcweirMAXLINELENGTH = 100000
47*cdf0e10cSrcweir
48*cdf0e10cSrcweirJARCLASSDIRS    = $(PACKAGE)
49*cdf0e10cSrcweirJARTARGET       = $(TARGET).jar
50*cdf0e10cSrcweirJARCOMPRESS 	= TRUE
51*cdf0e10cSrcweir
52*cdf0e10cSrcweir
53*cdf0e10cSrcweir
54*cdf0e10cSrcweirCSCFLAGS = -incr
55*cdf0e10cSrcweir.IF "$(debug)" != ""
56*cdf0e10cSrcweirCSCFLAGS += -checked+ -define:DEBUG -define:TRACE -debug+
57*cdf0e10cSrcweir.ELSE
58*cdf0e10cSrcweirCSCFLAGS += -optimize+
59*cdf0e10cSrcweir.ENDIF
60*cdf0e10cSrcweir
61*cdf0e10cSrcweir
62*cdf0e10cSrcweirOUTDIR=$(BIN)$/qa$/climaker
63*cdf0e10cSrcweirEXETARGET=$(OUTDIR)$/test_climaker.exe
64*cdf0e10cSrcweir
65*cdf0e10cSrcweirALLTAR: $(EXETARGET)
66*cdf0e10cSrcweir
67*cdf0e10cSrcweirCSFILES = climaker.cs testobjects.cs
68*cdf0e10cSrcweir
69*cdf0e10cSrcweir
70*cdf0e10cSrcweir$(EXETARGET): $(CSFILES) $(OUTDIR)$/cli_test_types.dll
71*cdf0e10cSrcweir	$(GNUCOPY) -p $(BIN)$/cli_cppuhelper.dll $(OUTDIR)$/cli_cppuhelper.dll
72*cdf0e10cSrcweir	$(GNUCOPY) -p $(BIN)$/cli_uretypes.dll $(OUTDIR)$/cli_uretypes.dll
73*cdf0e10cSrcweir	$(GNUCOPY) -p $(BIN)$/cli_basetypes.dll $(OUTDIR)$/cli_basetypes.dll
74*cdf0e10cSrcweir	$(GNUCOPY) -p $(BIN)$/cli_ure.dll $(OUTDIR)$/cli_ure.dll
75*cdf0e10cSrcweir	$(GNUCOPY) -p $(BIN)$/climaker.exe $(OUTDIR)
76*cdf0e10cSrcweir	$(CSC) $(CSCFLAGS) -target:exe -out:$(EXETARGET) \
77*cdf0e10cSrcweir		-reference:$(BIN)$/cli_ure.dll \
78*cdf0e10cSrcweir 		-reference:$(BIN)$/cli_uretypes.dll \
79*cdf0e10cSrcweir 		-reference:$(BIN)$/cli_basetypes.dll \
80*cdf0e10cSrcweir		-reference:$(OUTDIR)$/cli_test_types.dll \
81*cdf0e10cSrcweir		$(CSFILES)
82*cdf0e10cSrcweir
83*cdf0e10cSrcweir
84*cdf0e10cSrcweir
85*cdf0e10cSrcweir#-----------------------------------------------------------------------------
86*cdf0e10cSrcweirCLIMAKERFLAGS =
87*cdf0e10cSrcweir.IF "$(debug)" != ""
88*cdf0e10cSrcweirCLIMAKERFLAGS += --verbose
89*cdf0e10cSrcweir.ENDIF
90*cdf0e10cSrcweir
91*cdf0e10cSrcweir
92*cdf0e10cSrcweir
93*cdf0e10cSrcweir
94*cdf0e10cSrcweir$(OUTDIR)$/types.urd: types.idl
95*cdf0e10cSrcweir    - $(MKDIR) $(OUTDIR)
96*cdf0e10cSrcweir    $(IDLC) -O$(OUTDIR) -I$(SOLARIDLDIR) -cid -we $<
97*cdf0e10cSrcweir
98*cdf0e10cSrcweir$(OUTDIR)$/types.rdb: $(OUTDIR)$/types.urd
99*cdf0e10cSrcweir    - rm $@
100*cdf0e10cSrcweir    $(REGMERGE) $@ /UCR $<
101*cdf0e10cSrcweir
102*cdf0e10cSrcweir$(OUTDIR)$/cli_test_types.dll: $(OUTDIR)$/types.rdb $(BIN)$/climaker.exe $(BIN)$/cli_uretypes.dll
103*cdf0e10cSrcweir    $(CLIMAKER) $(CLIMAKERFLAGS) --out $@  \
104*cdf0e10cSrcweir		-r $(BIN)$/cli_uretypes.dll \
105*cdf0e10cSrcweir		-X $(SOLARBINDIR)$/types.rdb \
106*cdf0e10cSrcweir		$(OUTDIR)$/types.rdb
107*cdf0e10cSrcweir
108*cdf0e10cSrcweir
109*cdf0e10cSrcweir
110*cdf0e10cSrcweir.IF "$(depend)" == ""
111*cdf0e10cSrcweirALL: ALLTAR
112*cdf0e10cSrcweir.ELSE
113*cdf0e10cSrcweirALL: ALLDEP
114*cdf0e10cSrcweir.ENDIF
115*cdf0e10cSrcweir
116*cdf0e10cSrcweir.INCLUDE: target.mk
117*cdf0e10cSrcweir
118*cdf0e10cSrcweir# --- Parameters for the test --------------------------------------
119*cdf0e10cSrcweir
120*cdf0e10cSrcweir# test base is java complex
121*cdf0e10cSrcweirCT_TESTBASE = -TestBase java_complex
122*cdf0e10cSrcweir
123*cdf0e10cSrcweir# test looks something like the.full.package.TestName
124*cdf0e10cSrcweirCT_TEST     = -o $(PACKAGE:s\$/\.\).$(JAVAFILES:b)
125*cdf0e10cSrcweir
126*cdf0e10cSrcweir# start the runner application
127*cdf0e10cSrcweirCT_APP      = org.openoffice.Runner
128*cdf0e10cSrcweir
129*cdf0e10cSrcweirCT_NOOFFICE = -NoOffice
130*cdf0e10cSrcweir# --- Targets ------------------------------------------------------
131*cdf0e10cSrcweir
132*cdf0e10cSrcweirRUN:
133*cdf0e10cSrcweir    java -cp $(CLASSPATH) -Dcli_ure_test=$(EXETARGET) $(CT_APP) $(CT_NOOFFICE) $(CT_TESTBASE) $(CT_TEST)
134*cdf0e10cSrcweir
135*cdf0e10cSrcweirrun: RUN
136