Last change
on this file since 1720 was 1720, checked in by bird, 16 years ago |
kmk: More if conditionals code.
|
-
Property svn:eol-style
set to
native
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
1.6 KB
|
Line | |
---|
1 | # $Id: testcase-ifcond.kmk 1720 2008-09-04 02:50:11Z bird $
|
---|
2 | ## @file
|
---|
3 | # kBuild - testcase for the if conditionals.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (c) 2007 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 |
|
---|
27 | #DEPTH = ../..
|
---|
28 | #include $(PATH_KBUILD)/header.kmk
|
---|
29 |
|
---|
30 | ifeq (1,0)
|
---|
31 | #
|
---|
32 | # Some very basic tests.
|
---|
33 | #
|
---|
34 | if 1
|
---|
35 | $(warning works)
|
---|
36 | else
|
---|
37 | $(error busted)
|
---|
38 | endif
|
---|
39 |
|
---|
40 | if 1 || 1
|
---|
41 | $(warning works)
|
---|
42 | else
|
---|
43 | $(error )
|
---|
44 | endif
|
---|
45 |
|
---|
46 | if 0 || 0
|
---|
47 | $(error )
|
---|
48 | else
|
---|
49 | $(warning works)
|
---|
50 | endif
|
---|
51 |
|
---|
52 | if 1 || 0
|
---|
53 | $(warning works)
|
---|
54 | else
|
---|
55 | $(error )
|
---|
56 | endif
|
---|
57 |
|
---|
58 | if 0 || 1
|
---|
59 | $(warning works)
|
---|
60 | else
|
---|
61 | $(error )
|
---|
62 | endif
|
---|
63 |
|
---|
64 | if 0 || 0 || 0 || 0 || 0 || 0 || 0
|
---|
65 | $(error )
|
---|
66 | else
|
---|
67 | $(warning works)
|
---|
68 | endif
|
---|
69 |
|
---|
70 | if 0 || 0 || 0 || 1 || 0 || 0 || 0
|
---|
71 | $(warning works)
|
---|
72 | else
|
---|
73 | $(error )
|
---|
74 | endif
|
---|
75 |
|
---|
76 | if 0 && 1
|
---|
77 | $(error )
|
---|
78 | else
|
---|
79 | $(warning works)
|
---|
80 | endif
|
---|
81 |
|
---|
82 | if 0 || 1 && 1
|
---|
83 | $(warning works)
|
---|
84 | else
|
---|
85 | $(error )
|
---|
86 | endif
|
---|
87 | endif # all
|
---|
88 |
|
---|
89 | #
|
---|
90 | # Parenthesis
|
---|
91 | #
|
---|
92 | if (1)
|
---|
93 | $(warning works)
|
---|
94 | else
|
---|
95 | $(error )
|
---|
96 | endif
|
---|
97 |
|
---|
98 | if ((((1))))
|
---|
99 | $(warning works)
|
---|
100 | else
|
---|
101 | $(error )
|
---|
102 | endif
|
---|
103 |
|
---|
104 |
|
---|
105 | all_recursive:
|
---|
106 | $(ECHO) "if works fine"
|
---|
107 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.