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/>
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.
)
34 foo
= testcase-includedep-sub
36 ifneq ($(testcase-includedep-sub.kmk
),included
)
37 $(error The first
test failed.
)
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.
)
46 includedep testcase-
$(foo
)-sub.kmk
47 ifneq ($(testcase-includedep-sub.kmk
),included
)
48 $(error The second
test failed.
)
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.
)
57 includedep testcase-includedep-sub.
$(foo
)
58 ifneq ($(testcase-includedep-sub.kmk
),included
)
59 $(error The thrid
test failed.
)
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.
)
67 includedep testcase-includedep-sub.kmk
68 ifneq ($(testcase-includedep-sub.kmk
),included
)
69 $(error The forth
test failed.
)
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.
)
78 includedep testcase-
$(foo
)-sub.kmk
79 ifeq ($(testcase-includedep-sub.kmk
),included
)
80 $(error The fifth
test failed.
)
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.
)
89 $(ECHO
) "includedep works fine"