VirtualBox

source: kBuild/trunk/src/kmk/testcase-ifcond.kmk@ 1720

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
30ifeq (1,0)
31#
32# Some very basic tests.
33#
34if 1
35$(warning works)
36else
37$(error busted)
38endif
39
40if 1 || 1
41$(warning works)
42else
43$(error )
44endif
45
46if 0 || 0
47$(error )
48else
49$(warning works)
50endif
51
52if 1 || 0
53$(warning works)
54else
55$(error )
56endif
57
58if 0 || 1
59$(warning works)
60else
61$(error )
62endif
63
64if 0 || 0 || 0 || 0 || 0 || 0 || 0
65$(error )
66else
67$(warning works)
68endif
69
70if 0 || 0 || 0 || 1 || 0 || 0 || 0
71$(warning works)
72else
73$(error )
74endif
75
76if 0 && 1
77$(error )
78else
79$(warning works)
80endif
81
82if 0 || 1 && 1
83$(warning works)
84else
85$(error )
86endif
87endif # all
88
89#
90# Parenthesis
91#
92if (1)
93$(warning works)
94else
95$(error )
96endif
97
98if ((((1))))
99$(warning works)
100else
101$(error )
102endif
103
104
105all_recursive:
106 $(ECHO) "if works fine"
107
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