1 | # $Id: testcase-if1of.kmk 2243 2009-01-10 02:24:02Z bird $
|
---|
2 | ## @file
|
---|
3 | # kBuild - testcase for the if1of and ifn1of conditionals.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (c) 2007-2009 knut st. osmundsen <bird-kBuild-spamix@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 |
|
---|
26 | DEPTH = ../..
|
---|
27 | include $(PATH_KBUILD)/header.kmk
|
---|
28 |
|
---|
29 | # the basics.
|
---|
30 | if1of (asdf,asdf)
|
---|
31 | else
|
---|
32 | $(error busted)
|
---|
33 | endif
|
---|
34 | ifn1of (asdf,asdf)
|
---|
35 | $(error busted)
|
---|
36 | endif
|
---|
37 |
|
---|
38 | # larger sets.
|
---|
39 | if1of (1,2 3 4 5 6 7 8 9 0)
|
---|
40 | $(error busted)
|
---|
41 | endif
|
---|
42 | if1of (1,12 3 4 5 6 7 8 9 0)
|
---|
43 | $(error busted)
|
---|
44 | endif
|
---|
45 | if1of (1,2 31 4 5 6 7 8 9 0)
|
---|
46 | $(error busted)
|
---|
47 | endif
|
---|
48 | ifn1of (1,1 2 3 4 5 6 7 8 9 0)
|
---|
49 | $(error busted)
|
---|
50 | endif
|
---|
51 | ifn1of (8,1 2 3 4 5 6 7 8 9 0)
|
---|
52 | $(error busted)
|
---|
53 | endif
|
---|
54 | ifn1of (asdf,asdf)
|
---|
55 | $(error busted)
|
---|
56 | endif
|
---|
57 | ifn1of (asdf,asdf asdf)
|
---|
58 | $(error busted)
|
---|
59 | endif
|
---|
60 |
|
---|
61 | # any in set 1 match any in set 2.
|
---|
62 | if1of (1 3 5 7 9, 2 4 6 8)
|
---|
63 | $(error busted)
|
---|
64 | endif
|
---|
65 | ifn1of (1 2 3 4 5, 2 4 6 8)
|
---|
66 | $(error busted)
|
---|
67 | endif
|
---|
68 |
|
---|
69 | # real life.
|
---|
70 | ifn1of (win linux, linux)
|
---|
71 | $(error busted)
|
---|
72 | endif
|
---|
73 | ifn1of (win.x86, win.amd64 linux.x86 darwin.x86 win.x86 os2.x86)
|
---|
74 | $(error busted)
|
---|
75 | endif
|
---|
76 |
|
---|
77 |
|
---|
78 | all_recursive:
|
---|
79 | $(ECHO) "if1of and ifn1of work fine"
|
---|
80 |
|
---|