kbuild.c: added todo for #80.
[kbuild-mirror.git] / src / kmk / testcase-includedep.kmk
blobfa7984a790a89eb0d121af5ebcf803ce414c4fc3
1 # $Id$
2 ## @file
3 # kBuild - testcase for the includedep directive.
7 # Copyright (c) 2008 knut st. osmundsen <bird-src-spam@anduin.net>
9 # This file is part of kBuild.
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.
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.
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/>
26 DEPTH = ../..
27 include $(PATH_KBUILD)/header.kmk
29 ifdef testcase-includedep-sub.kmk
30 $(error testcase-includedep-sub.kmk is defined at the start of the testcase.)
31 endif
34 foo = testcase-includedep-sub
35 includedep $(foo).kmk
36 ifneq ($(testcase-includedep-sub.kmk),included)
37 $(error The first test failed.)
38 endif
39 testcase-includedep-sub.kmk :=
40 ifdef testcase-includedep-sub.kmk
41 $(error testcase-includedep-sub.kmk is persistent and does not want to be undefed.)
42 endif
45 foo = includedep
46 includedep testcase-$(foo)-sub.kmk
47 ifneq ($(testcase-includedep-sub.kmk),included)
48 $(error The second test failed.)
49 endif
50 testcase-includedep-sub.kmk :=
51 ifdef testcase-includedep-sub.kmk
52 $(error testcase-includedep-sub.kmk is persistent and does not want to be undefed.)
53 endif
56 foo = kmk
57 includedep testcase-includedep-sub.$(foo)
58 ifneq ($(testcase-includedep-sub.kmk),included)
59 $(error The thrid test failed.)
60 endif
61 testcase-includedep-sub.kmk :=
62 ifdef testcase-includedep-sub.kmk
63 $(error testcase-includedep-sub.kmk is persistent and does not want to be undefed.)
64 endif
67 includedep testcase-includedep-sub.kmk
68 ifneq ($(testcase-includedep-sub.kmk),included)
69 $(error The forth test failed.)
70 endif
71 testcase-includedep-sub.kmk :=
72 ifdef testcase-includedep-sub.kmk
73 $(error testcase-includedep-sub.kmk is persistent and does not want to be undefed.)
74 endif
77 foo = asdf
78 includedep testcase-$(foo)-sub.kmk
79 ifeq ($(testcase-includedep-sub.kmk),included)
80 $(error The fifth test failed.)
81 endif
82 testcase-includedep-sub.kmk :=
83 ifdef testcase-includedep-sub.kmk
84 $(error testcase-includedep-sub.kmk is persistent and does not want to be undefed.)
85 endif
88 all_recursive:
89 $(ECHO) "includedep works fine"