VirtualBox

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

Last change on this file since 1847 was 1694, checked in by bird, 16 years ago

kmk: testcase for includedep.

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

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