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