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
24
25# Builds the SpreadSheet examples of the Developers Guide.
26
27PRJ = ..$/..
28PRJNAME = cli_ure
29TARGET := test_climaker
30PACKAGE = cliversion
31
32.INCLUDE: settings.mk
33.INCLUDE : $(PRJ)$/util$/makefile.pmk
34
35#.IF "$(BUILD_FOR_CLI)" == ""
36
37.IF "$(debug)" != ""
38CSCFLAGS += -checked+ -define:DEBUG -define:TRACE -debug+
39.ELSE
40CSCFLAGS += -optimize+
41.ENDIF
42
43
44EXETARGET2=$(BIN)$/runtests.exe
45
46.IF "$(name)" != ""
47TESTLIB=$(BIN)$/$(name)
48.ELSE
49TESTLIB=$(BIN)$/version_current.dll
50.ENDIF
51VERSIONLIBS=version_libs
52
53CLI_URE = $(SOLARBINDIR)$/cli_ure.dll
54CLI_URETYPES = $(SOLARBINDIR)$/cli_uretypes.dll
55CLI_BASETYPES = $(SOLARBINDIR)$/cli_basetypes.dll
56CLI_CPPUHELPER = $(SOLARBINDIR)$/cli_cppuhelper.dll
57CLI_OOOTYPES = $(SOLARBINDIR)$/cli_oootypes.dll
58
59
60.INCLUDE: target.mk
61
62.IF "$(BUILD_FOR_CLI)" == ""
63ALLTAR:
64
65.ELSE
66ALLTAR: \
67	$(EXETARGET2) \
68	$(TESTLIB) \
69	$(MISC)$/copyassemblies.done \
70	COPYVERSIONLIBS \
71    RUNINSTRUCTIONS
72
73.ENDIF
74
75
76COPYVERSIONLIBS:
77		-$(GNUCOPY) $(VERSIONLIBS)$/* $(BIN)
78
79
80$(MISC)$/copyassemblies.done .ERRREMOVE:
81    $(GNUCOPY) $(CLI_CPPUHELPER) $(BIN)$/$(CLI_CPPUHELPER:f)
82    $(GNUCOPY) $(CLI_BASETYPES) $(BIN)$/$(CLI_BASETYPES:f)
83    $(GNUCOPY) $(CLI_URETYPES) $(BIN)$/$(CLI_URETYPES:f)
84    $(GNUCOPY) $(CLI_URE) $(BIN)$/$(CLI_URE:f)
85    $(GNUCOPY) $(CLI_OOOTYPES) $(BIN)$/$(CLI_OOOTYPES:f)
86    $(TOUCH) $@
87
88CSFILES2 = runtests.cs
89
90.IF "$(CCNUMVER)" >= "001399999999"
91CSCPLATFORMX86 = -platform:x86
92.ELSE
93CSCPLATFORMX86 =
94.ENDIF
95
96$(EXETARGET2): $(CSFILES2)
97	$(CSC) $(CSCFLAGS) -target:exe -out:$(EXETARGET2) $(CSCPLATFORMX86)\
98		$(CSFILES2)
99
100CSFILESLIB = version.cs
101$(TESTLIB): $(CSFILESLIB) $(SOLARBINDIR)$/cliureversion.mk
102	$(CSC) $(CSCFLAGS) -target:library -out:$(TESTLIB) \
103		-reference:$(SOLARBINDIR)$/cli_ure.dll \
104 		-reference:$(SOLARBINDIR)$/cli_uretypes.dll \
105 		-reference:$(SOLARBINDIR)$/cli_basetypes.dll \
106		-reference:$(SOLARBINDIR)$/cli_cppuhelper.dll \
107		-reference:$(SOLARBINDIR)$/cli_oootypes.dll \
108		$(CSFILESLIB)
109
110
111
112RUNINSTRUCTIONS :
113    @echo .
114    @echo ###########################   N O T E  ######################################
115    @echo .
116    @echo To run the test go to qa\cliversioning, run dmake and follow instructions.
117    @echo .
118	@echo Or install an office with full system integration and run $(BIN)$/runtests.exe
119	@echo in a console withouth build environment.
120	@echo .
121	@echo Or install an office with setup /a. Expand PATH with the bin folder of the URE.
122	@echo Set UNO_PATH=system_path_to_program_folder
123	@echo This must be the program folder of the brand layer.
124	@echo For example, c:\staroffice\Sun\staroffice 9\program
125	@echo Run runtests.exe.
126    @echo .
127    @echo To build a test library with run.
128    @echo
129    @echo dmake name=version_10_10_10.dll
130    @echo
131    @echo  The name must always start with 'version_'.
132    @echo ###########################   N O T E  ######################################
133    @echo .
134    @echo .
135
136
137
138#.ENDIF
139