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