VirtualBox

source: kBuild/branches/kBuild-0.1.5/tests/inherit-bld/Makefile.kmk

最後變更 在這個檔案是 2243,由 bird 提交於 16 年 前

*: Updated copyright to 2009 and normalized name & email.

  • 屬性 svn:keywords 設為 Id
檔案大小: 3.6 KB
 
1# $Id: Makefile.kmk 2243 2009-01-10 02:24:02Z bird $
2## @file
3# Test - Build Type Inheritance.
4#
5
6#
7# Copyright (c) 2008-2009 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
28DEPTH = ../..
29include $(PATH_KBUILD)/header.kmk
30
31
32# Plain setup just for a reality check.
33PROGRAMS += inherit-bld1
34inherit-bld1_TEMPLATE = TST
35inherit-bld1_DEFS = X=y
36inherit-bld1_SOURCES = ../dummy_defined_X.c
37
38# Test that the BLD_TYPE feature works.
39PROGRAMS += inherit-bld2
40inherit-bld2_TEMPLATE = TST
41inherit-bld2_BLD_TYPE = debug
42inherit-bld2_DEFS.debug = X=y
43inherit-bld2_SOURCES = ../dummy_defined_X.c
44
45# Test that an simple alternative build type works.
46PROGRAMS += inherit-bld3
47inherit-bld3_TEMPLATE = TST
48inherit-bld3_BLD_TYPE = dbgbld3
49inherit-bld3_DEFS.dbgbld3 = X=y
50inherit-bld3_SOURCES = ../dummy_defined_X.c
51
52# Test that default build type inheritance works - dbgbld4 extends dbgbld3.
53PROGRAMS += inherit-bld4
54inherit-bld4_TEMPLATE = TST
55inherit-bld4_BLD_TYPE = dbgbld4
56inherit-bld4_DEFS.dbgbld3 = X=y
57inherit-bld4_SOURCES = ../dummy_defined_X.c
58
59# Test that appending build type inheritance works - dbgbld5 extends dbgbld3.
60PROGRAMS += inherit-bld5
61inherit-bld5_TEMPLATE = TST
62inherit-bld5_BLD_TYPE = dbgbld5
63inherit-bld5_DEFS.dbgbld3 = X=y y=0
64inherit-bld5_DEFS.dbgbld5 = y=42
65inherit-bld5_SOURCES = ../dummy_defined_X.c
66
67# Test that prepending build type inheritance works - dbgbld6 extends dbgbld3.
68PROGRAMS += inherit-bld6
69inherit-bld6_TEMPLATE = TST
70inherit-bld6_BLD_TYPE = dbgbld6
71inherit-bld6_DEFS.dbgbld3 = X=y y=42
72inherit-bld6_DEFS.dbgbld6 = y=0
73inherit-bld6_SOURCES = ../dummy_defined_X.c
74
75
76#
77# Tests where we inherit from a target and force build type which
78# relies on inheritance. These are the fine points...
79#
80PROGRAMS += inherit-bld10
81inherit-bld10_TEMPLATE = TST
82inherit-bld10_BLD_TYPE = dbgbld11
83inherit-bld10_DEFS = X=y
84inherit-bld10_DEFS.dbgbld10 = y=42
85inherit-bld10_SOURCES = ../dummy_defined_X.c
86
87# Tests that target and build inheriting works together.
88PROGRAMS += inherit-bld11
89inherit-bld11_EXTENDS = inherit-bld10
90
91# Tests that dbgbld11 is picked from the target rather than the parent.
92PROGRAMS += inherit-bld12
93inherit-bld12_EXTENDS = inherit-bld10
94inherit-bld12_DEFS = y=0
95inherit-bld12_DEFS.dbgbld11 = X=z z=42
96
97# Tests that prepending works.
98PROGRAMS += inherit-bld20
99inherit-bld20_TEMPLATE = TST
100inherit-bld20_BLD_TYPE = dbgbld21
101inherit-bld20_DEFS = X=y
102inherit-bld20_DEFS.dbgbld20 = y=42
103inherit-bld20_DEFS.dbgbld21 = y=0
104#inherit-bld20_DEFS.dbgbld21 = y=0 y=42 <-- expected result.
105inherit-bld20_SOURCES = ../dummy_defined_X.c
106
107# Tests that prepending + target inheritance works as expected. funky!
108PROGRAMS += inherit-bld21
109inherit-bld21_EXTENDS = inherit-bld20
110inherit-bld21_DEFS.dbgbld20 = Y=y
111#inherit-bld21_DEFS.dbgbld21 = y=0 y=42 Y=y <-- expected result; dbgbld21 from parent + our dbgbld20.
112inherit-bld21_SOURCES = ../dummy_defined_Y.c
113
114
115include $(FILE_KBUILD_FOOTER)
116
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette