VirtualBox

source: kBuild/trunk/src/kmk/testcase-lazy-deps-vars.kmk

Last change on this file was 2413, checked in by bird, 14 years ago

copyright year update.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.3 KB
Line 
1# $Id: testcase-lazy-deps-vars.kmk 2413 2010-09-11 17:43:04Z bird $
2## @file
3# kBuild - testcase for the lazy dependency lists.
4#
5
6#
7# Copyright (c) 2008-2010 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 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
29ifneq ($(not 1),)
30 $(error The 'not' function is missing)
31endif
32ifneq ($(eq 1,1),1)
33 $(error The 'eq' function is missing)
34endif
35
36
37all: simple_1
38
39
40simple_1: variable.c variable.h variable.c variable.c variable.h function.c | variable.h read.c
41 @$(ECHO) "testcase-lazy-deps-vars.kmk::$@: TESTING..."
42 @$(ECHO) "pluss: $+"
43 $(if $(eq $+,variable.c variable.h variable.c variable.c variable.h function.c),,exit 1)
44 $(if $(eq $(deps-all $@,1),variable.c),,exit 1)
45 $(if $(eq $(deps-all $@,2),variable.h),,exit 2)
46 $(if $(eq $(deps-all $@,3),variable.c),,exit 3)
47 $(if $(eq $(deps-all $@,4),variable.c),,exit 4)
48 $(if $(eq $(deps-all $@,5),variable.h),,exit 5)
49 $(if $(eq $(deps-all $@,6),function.c),,exit 6)
50 $(if $(eq $(deps-all $@,7),),,exit 7)
51
52 @$(ECHO) "caret: $^"
53 $(if $(eq $^,variable.c variable.h function.c),,exit 1)
54 $(if $(eq $(deps $@,1),variable.c),,exit 1)
55 $(if $(eq $(deps $@,2),variable.h),,exit 2)
56 $(if $(eq $(deps $@,3),function.c),,exit 3)
57 $(if $(eq $(deps $@,4),),,exit 4)
58
59 @$(ECHO) "qmark: $?"
60 $(if $(eq $?,variable.c variable.h function.c),,exit 1)
61 $(if $(eq $(deps-newer $@,1),variable.c),,exit 1)
62 $(if $(eq $(deps-newer $@,2),variable.h),,exit 2)
63 $(if $(eq $(deps-newer $@,3),function.c),,exit 3)
64 $(if $(eq $(deps-newer $@,4),),,exit 4)
65
66 @$(ECHO) " bar: $|"
67 $(if $(eq $|,read.c),,exit 1)
68 $(if $(eq $(deps-oo $@,1),read.c),,exit 1)
69 $(if $(eq $(deps-oo $@,2),),,exit 2)
70
71 @$(ECHO) "testcase-lazy-deps-vars.kmk::simple_1: SUCCESS"
72
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