xref: /aoo42x/main/configmgr/qa/unit/makefile.mk (revision e3c01311)
1*e3c01311SAndrew Rist#**************************************************************
2*e3c01311SAndrew Rist#
3*e3c01311SAndrew Rist#  Licensed to the Apache Software Foundation (ASF) under one
4*e3c01311SAndrew Rist#  or more contributor license agreements.  See the NOTICE file
5*e3c01311SAndrew Rist#  distributed with this work for additional information
6*e3c01311SAndrew Rist#  regarding copyright ownership.  The ASF licenses this file
7*e3c01311SAndrew Rist#  to you under the Apache License, Version 2.0 (the
8*e3c01311SAndrew Rist#  "License"); you may not use this file except in compliance
9*e3c01311SAndrew Rist#  with the License.  You may obtain a copy of the License at
10*e3c01311SAndrew Rist#
11*e3c01311SAndrew Rist#    http://www.apache.org/licenses/LICENSE-2.0
12*e3c01311SAndrew Rist#
13*e3c01311SAndrew Rist#  Unless required by applicable law or agreed to in writing,
14*e3c01311SAndrew Rist#  software distributed under the License is distributed on an
15*e3c01311SAndrew Rist#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*e3c01311SAndrew Rist#  KIND, either express or implied.  See the License for the
17*e3c01311SAndrew Rist#  specific language governing permissions and limitations
18*e3c01311SAndrew Rist#  under the License.
19*e3c01311SAndrew Rist#
20*e3c01311SAndrew Rist#**************************************************************
21*e3c01311SAndrew Rist
22*e3c01311SAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweirPRJ = ../..
25cdf0e10cSrcweirPRJNAME = configmgr
26cdf0e10cSrcweirTARGET = unit
27cdf0e10cSrcweir
28cdf0e10cSrcweirENABLE_EXCEPTIONS = TRUE
29cdf0e10cSrcweir
30cdf0e10cSrcweir.INCLUDE: settings.mk
31cdf0e10cSrcweir
32cdf0e10cSrcweirCFLAGSCXX += $(CPPUNIT_CFLAGS)
33cdf0e10cSrcweir
34cdf0e10cSrcweirSLOFILES = $(SLO)/test.obj
35cdf0e10cSrcweir
36cdf0e10cSrcweirSHL1OBJS = $(SLOFILES)
37cdf0e10cSrcweirSHL1STDLIBS = \
38cdf0e10cSrcweir    $(CPPUHELPERLIB) \
39cdf0e10cSrcweir    $(CPPULIB) \
40cdf0e10cSrcweir    $(CPPUNITLIB) \
41cdf0e10cSrcweir    $(SALLIB) \
42cdf0e10cSrcweir    $(TESTSHL2LIB)
43cdf0e10cSrcweirSHL1TARGET = unit
44cdf0e10cSrcweirSHL1VERSIONMAP = version.map
45cdf0e10cSrcweirDEF1NAME = $(SHL1TARGET)
46cdf0e10cSrcweir
47cdf0e10cSrcweir.INCLUDE: target.mk
48cdf0e10cSrcweir
49cdf0e10cSrcweirALLTAR: TEST
50cdf0e10cSrcweir
51cdf0e10cSrcweir.IF "$(OS)" == "OS2" || "$(OS)" == "WNT"
52cdf0e10cSrcweirMY_INI = .ini
53cdf0e10cSrcweir.ELSE
54cdf0e10cSrcweirMY_INI = rc
55cdf0e10cSrcweir.ENDIF
56cdf0e10cSrcweir
57cdf0e10cSrcweir$(MISC)/unit.rdb .ERRREMOVE:
58cdf0e10cSrcweir    cp $(SOLARBINDIR)/types.rdb $@
59cdf0e10cSrcweir    $(REGCOMP) -register -r $@ -c $(DLLDEST)/$(DLLPRE)configmgr$(DLLPOST)
60cdf0e10cSrcweir
61cdf0e10cSrcweirTEST .PHONY: $(SHL1TARGETN) $(MISC)/unit.rdb
62cdf0e10cSrcweir    rm -rf $(MISC)/unitdata
63cdf0e10cSrcweir    mkdir $(MISC)/unitdata
64cdf0e10cSrcweir    cp urebootstrap.ini $(MISC)/unitdata
65cdf0e10cSrcweir    mkdir $(MISC)/unitdata/basis
66cdf0e10cSrcweir    mkdir $(MISC)/unitdata/basis/program
67cdf0e10cSrcweir    echo '[Bootstrap]' > $(MISC)/unitdata/basis/program/uno$(MY_INI)
68cdf0e10cSrcweir    echo 'UNO_SHARED_PACKAGES_CACHE = $$OOO_BASE_DIR' \
69cdf0e10cSrcweir        >> $(MISC)/unitdata/basis/program/uno$(MY_INI)
70cdf0e10cSrcweir    echo 'UNO_USER_PACKAGES_CACHE =' \
71cdf0e10cSrcweir        '$${$$BRAND_BASE_DIR/program/bootstrap$(MY_INI):UserInstallation}' \
72cdf0e10cSrcweir        >> $(MISC)/unitdata/basis/program/uno$(MY_INI)
73cdf0e10cSrcweir    mkdir $(MISC)/unitdata/basis/share
74cdf0e10cSrcweir    mkdir $(MISC)/unitdata/basis/share/registry
75cdf0e10cSrcweir    cp data.xcd $(MISC)/unitdata/basis/share/registry
76cdf0e10cSrcweir    mkdir $(MISC)/unitdata/brand
77cdf0e10cSrcweir    mkdir $(MISC)/unitdata/brand/program
78cdf0e10cSrcweir    echo '[Bootstrap]' > $(MISC)/unitdata/brand/program/bootstrap$(MY_INI)
79cdf0e10cSrcweir    echo 'UserInstallation = $$ORIGIN/../../user' \
80cdf0e10cSrcweir        >> $(MISC)/unitdata/brand/program/bootstrap$(MY_INI)
81cdf0e10cSrcweir.IF "$(USE_SHELL)" == "bash"
82cdf0e10cSrcweir    export \
83cdf0e10cSrcweir        URE_BOOTSTRAP=vnd.sun.star.pathname:$(MISC)/unitdata/urebootstrap.ini \
84cdf0e10cSrcweir        && $(TESTSHL2) $(SHL1TARGETN) -forward $(MISC)/unit.rdb
85cdf0e10cSrcweir.ELSE
86cdf0e10cSrcweir    setenv \
87cdf0e10cSrcweir        URE_BOOTSTRAP vnd.sun.star.pathname:$(MISC)/unitdata/urebootstrap.ini \
88cdf0e10cSrcweir        && $(TESTSHL2) $(SHL1TARGETN) -forward $(MISC)/unit.rdb
89cdf0e10cSrcweir.ENDIF
90