1 | # $Id: Makefile.kmk 1405 2008-03-17 18:08:13Z bird $
|
---|
2 | ## @file
|
---|
3 | # Test - Build Type Inheritance.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (c) 2008 knut st. osmundsen <[email protected]>
|
---|
8 | #
|
---|
9 | # This file is part of kBuild.
|
---|
10 | #
|
---|
11 | # kBuild is free software; you can redistribute it and/or modify
|
---|
12 | # it under the terms of the GNU General Public License as published by
|
---|
13 | # the Free Software Foundation; either version 2 of the License, or
|
---|
14 | # (at your option) any later version.
|
---|
15 | #
|
---|
16 | # kBuild is distributed in the hope that it will be useful,
|
---|
17 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
18 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
19 | # GNU General Public License for more details.
|
---|
20 | #
|
---|
21 | # You should have received a copy of the GNU General Public License
|
---|
22 | # along with kBuild; if not, write to the Free Software
|
---|
23 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
---|
24 | #
|
---|
25 | #
|
---|
26 |
|
---|
27 |
|
---|
28 | DEPTH = ../..
|
---|
29 | include $(PATH_KBUILD)/header.kmk
|
---|
30 |
|
---|
31 |
|
---|
32 | # Plain setup just for a reality check.
|
---|
33 | PROGRAMS += inherit-bld1
|
---|
34 | inherit-bld1_TEMPLATE = TST
|
---|
35 | inherit-bld1_DEFS = X=y
|
---|
36 | inherit-bld1_SOURCES = ../dummy_defined_X.c
|
---|
37 |
|
---|
38 | # Test that the BLD_TYPE feature works.
|
---|
39 | PROGRAMS += inherit-bld2
|
---|
40 | inherit-bld2_TEMPLATE = TST
|
---|
41 | inherit-bld2_BLD_TYPE = debug
|
---|
42 | inherit-bld2_DEFS.debug = X=y
|
---|
43 | inherit-bld2_SOURCES = ../dummy_defined_X.c
|
---|
44 |
|
---|
45 | # Test that an simple alternative build type works.
|
---|
46 | PROGRAMS += inherit-bld3
|
---|
47 | inherit-bld3_TEMPLATE = TST
|
---|
48 | inherit-bld3_BLD_TYPE = dbgbld3
|
---|
49 | inherit-bld3_DEFS.dbgbld3 = X=y
|
---|
50 | inherit-bld3_SOURCES = ../dummy_defined_X.c
|
---|
51 |
|
---|
52 | # Test that default build type inheritance works - dbgbld4 extends dbgbld3.
|
---|
53 | PROGRAMS += inherit-bld4
|
---|
54 | inherit-bld4_TEMPLATE = TST
|
---|
55 | inherit-bld4_BLD_TYPE = dbgbld4
|
---|
56 | inherit-bld4_DEFS.dbgbld3 = X=y
|
---|
57 | inherit-bld4_DEFS.dbgbld4 = $(inherit-bld4_DEFS.dbgbld3) # remove me
|
---|
58 | inherit-bld4_SOURCES = ../dummy_defined_X.c
|
---|
59 |
|
---|
60 | # Test that appending build type inheritance works - dbgbld5 extends dbgbld3.
|
---|
61 | PROGRAMS += inherit-bld5
|
---|
62 | inherit-bld5_TEMPLATE = TST
|
---|
63 | inherit-bld5_BLD_TYPE = dbgbld5
|
---|
64 | inherit-bld5_DEFS.dbgbld3 = X=y y=0
|
---|
65 | #inherit-bld5_DEFS.dbgbld5 = y=42
|
---|
66 | inherit-bld5_DEFS.dbgbld5 = $(inherit-bld5_DEFS.dbgbld3) y=42 # remove me
|
---|
67 | inherit-bld5_SOURCES = ../dummy_defined_X.c
|
---|
68 |
|
---|
69 | # Test that prepending build type inheritance works - dbgbld6 extends dbgbld3.
|
---|
70 | PROGRAMS += inherit-bld6
|
---|
71 | inherit-bld6_TEMPLATE = TST
|
---|
72 | inherit-bld6_BLD_TYPE = dbgbld6
|
---|
73 | inherit-bld6_DEFS.dbgbld3 = X=y y=42
|
---|
74 | #inherit-bld6_DEFS.dbgbld6 = y=0
|
---|
75 | inherit-bld6_DEFS.dbgbld6 = y=0 $(inherit-bld6_DEFS.dbgbld3) # remove me
|
---|
76 | inherit-bld6_SOURCES = ../dummy_defined_X.c
|
---|
77 |
|
---|
78 |
|
---|
79 | include $(PATH_KBUILD)/footer.kmk
|
---|
80 |
|
---|