VirtualBox

source: kBuild/trunk/src/kmk/testcase-includedep.kmk@ 3387

Last change on this file since 3387 was 2413, checked in by bird, 14 years ago

copyright year update.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.4 KB
Line 
1# $Id: testcase-includedep.kmk 2413 2010-09-11 17:43:04Z bird $
2## @file
3# kBuild - testcase for the includedep directive.
4#
5
6#
7# Copyright (c) 2008-2010 knut st. osmundsen <bird-kBuild-spamx@anduin.net>
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 3 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, see <http://www.gnu.org/licenses/>
23#
24#
25
26DEPTH = ../..
27include $(PATH_KBUILD)/header.kmk
28
29ifdef testcase-includedep-sub.kmk
30$(error testcase-includedep-sub.kmk is defined at the start of the testcase.)
31endif
32
33
34foo = testcase-includedep-sub
35includedep $(foo).kmk
36ifneq ($(testcase-includedep-sub.kmk),included)
37$(error The first test failed.)
38endif
39testcase-includedep-sub.kmk :=
40ifdef testcase-includedep-sub.kmk
41$(error testcase-includedep-sub.kmk is persistent and does not want to be undefed.)
42endif
43
44
45foo = includedep
46includedep testcase-$(foo)-sub.kmk
47ifneq ($(testcase-includedep-sub.kmk),included)
48$(error The second test failed.)
49endif
50testcase-includedep-sub.kmk :=
51ifdef testcase-includedep-sub.kmk
52$(error testcase-includedep-sub.kmk is persistent and does not want to be undefed.)
53endif
54
55
56foo = kmk
57includedep testcase-includedep-sub.$(foo)
58ifneq ($(testcase-includedep-sub.kmk),included)
59$(error The thrid test failed.)
60endif
61testcase-includedep-sub.kmk :=
62ifdef testcase-includedep-sub.kmk
63$(error testcase-includedep-sub.kmk is persistent and does not want to be undefed.)
64endif
65
66
67includedep testcase-includedep-sub.kmk
68ifneq ($(testcase-includedep-sub.kmk),included)
69$(error The forth test failed.)
70endif
71testcase-includedep-sub.kmk :=
72ifdef testcase-includedep-sub.kmk
73$(error testcase-includedep-sub.kmk is persistent and does not want to be undefed.)
74endif
75
76
77foo = asdf
78includedep testcase-$(foo)-sub.kmk
79ifeq ($(testcase-includedep-sub.kmk),included)
80$(error The fifth test failed.)
81endif
82testcase-includedep-sub.kmk :=
83ifdef testcase-includedep-sub.kmk
84$(error testcase-includedep-sub.kmk is persistent and does not want to be undefed.)
85endif
86
87
88all_recursive:
89 $(ECHO) "includedep works fine"
90
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use