xref: /trunk/main/configmgr/qa/unit/makefile.mk (revision 910823ae)
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 = configmgr
26TARGET = unit
27
28ENABLE_EXCEPTIONS = TRUE
29
30.INCLUDE: settings.mk
31
32CFLAGSCXX += $(CPPUNIT_CFLAGS)
33
34SLOFILES = $(SLO)/test.obj
35
36SHL1OBJS = $(SLOFILES)
37SHL1STDLIBS = \
38    $(CPPUHELPERLIB) \
39    $(CPPULIB) \
40    $(CPPUNITLIB) \
41    $(SALLIB) \
42    $(TESTSHL2LIB)
43SHL1TARGET = unit
44SHL1VERSIONMAP = version.map
45DEF1NAME = $(SHL1TARGET)
46
47.INCLUDE: target.mk
48
49ALLTAR: TEST
50
51.IF "$(OS)" == "OS2" || "$(OS)" == "WNT"
52MY_INI = .ini
53.ELSE
54MY_INI = rc
55.ENDIF
56
57$(MISC)/unit.rdb .ERRREMOVE:
58    cp $(SOLARBINDIR)/types.rdb $@
59    $(REGCOMP) -register -r $@ -c $(DLLDEST)/$(DLLPRE)configmgr$(DLLPOST)
60
61TEST .PHONY: $(SHL1TARGETN) $(MISC)/unit.rdb
62    rm -rf $(MISC)/unitdata
63    mkdir $(MISC)/unitdata
64    cp urebootstrap.ini $(MISC)/unitdata
65    mkdir $(MISC)/unitdata/basis
66    mkdir $(MISC)/unitdata/basis/program
67    echo '[Bootstrap]' > $(MISC)/unitdata/basis/program/uno$(MY_INI)
68    echo 'UNO_SHARED_PACKAGES_CACHE = $$OOO_BASE_DIR' \
69        >> $(MISC)/unitdata/basis/program/uno$(MY_INI)
70    echo 'UNO_USER_PACKAGES_CACHE =' \
71        '$${$$OOO_BASE_DIR/program/bootstrap$(MY_INI):UserInstallation}' \
72        >> $(MISC)/unitdata/basis/program/uno$(MY_INI)
73    mkdir $(MISC)/unitdata/basis/share
74    mkdir $(MISC)/unitdata/basis/share/registry
75    cp data.xcd $(MISC)/unitdata/basis/share/registry
76    mkdir $(MISC)/unitdata/brand
77    mkdir $(MISC)/unitdata/brand/program
78    echo '[Bootstrap]' > $(MISC)/unitdata/brand/program/bootstrap$(MY_INI)
79    echo 'UserInstallation = $$ORIGIN/../../user' \
80        >> $(MISC)/unitdata/brand/program/bootstrap$(MY_INI)
81.IF "$(USE_SHELL)" == "bash"
82    export \
83        URE_BOOTSTRAP=vnd.sun.star.pathname:$(MISC)/unitdata/urebootstrap.ini \
84        && $(TESTSHL2) $(SHL1TARGETN) -forward $(MISC)/unit.rdb
85.ELSE
86    setenv \
87        URE_BOOTSTRAP vnd.sun.star.pathname:$(MISC)/unitdata/urebootstrap.ini \
88        && $(TESTSHL2) $(SHL1TARGETN) -forward $(MISC)/unit.rdb
89.ENDIF
90