xref: /aoo42x/main/stoc/test/uriproc/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
28.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
29nothing .PHONY:
30.ELSE
31
32PRJ := ../..
33PRJNAME := stoc
34TARGET := test_uriproc
35
36ENABLE_EXCEPTIONS := TRUE
37
38my_components = stocservices
39
40.INCLUDE: settings.mk
41
42CFLAGSCXX += $(CPPUNIT_CFLAGS)
43DLLPRE = # no leading "lib" on .so files
44
45SHL1TARGET = $(TARGET)
46SHL1OBJS = $(SLO)/test_uriproc.obj
47SHL1STDLIBS = $(CPPULIB) $(CPPUHELPERLIB) $(CPPUNITLIB) $(SALLIB)
48SHL1VERSIONMAP = version.map
49SHL1RPATH = NONE
50SHL1IMPLIB = i$(SHL1TARGET)
51DEF1NAME = $(SHL1TARGET)
52
53SLOFILES = $(SHL1OBJS)
54
55.INCLUDE: target.mk
56
57.IF "$(OS)" == "WNT"
58my_file = file:///
59.ELSE
60my_file = file://
61.END
62
63ALLTAR: test
64
65test .PHONY: $(SHL1TARGETN) $(MISC)/$(TARGET)/services.rdb
66    $(CPPUNITTESTER) $(SHL1TARGETN) \
67        -env:UNO_TYPES=$(my_file)$(SOLARBINDIR)/udkapi.rdb \
68        -env:UNO_SERVICES=$(my_file)$(PWD)/$(MISC)/$(TARGET)/services.rdb \
69        -env:URE_INTERNAL_LIB_DIR=$(my_file)$(PWD)/$(DLLDEST)
70
71$(MISC)/$(TARGET)/services.rdb .ERRREMOVE: $(SOLARENV)/bin/packcomponents.xslt \
72        $(MISC)/$(TARGET)/services.input \
73        $(my_components:^"$(MISC)/":+".component")
74    $(XSLTPROC) --nonet --stringparam prefix $(PWD)/$(MISC)/ -o $@ \
75        $(SOLARENV)/bin/packcomponents.xslt $(MISC)/$(TARGET)/services.input
76
77$(MISC)/$(TARGET)/services.input:
78    $(MKDIRHIER) $(@:d)
79    echo \
80        '<list>$(my_components:^"<filename>":+".component</filename>")</list>' \
81        > $@
82
83.END
84