1 | # $Id: testcase-lazy-deps-vars.kmk 2019 2008-11-02 00:21:05Z bird $
|
---|
2 | ## @file
|
---|
3 | # kBuild - testcase for the lazy dependency lists.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (c) 2008 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 |
|
---|
26 | DEPTH = ../..
|
---|
27 | include $(PATH_KBUILD)/header.kmk
|
---|
28 |
|
---|
29 | ifneq ($(not 1),)
|
---|
30 | $(error The 'not' function is missing)
|
---|
31 | endif
|
---|
32 | ifneq ($(eq 1,1),1)
|
---|
33 | $(error The 'eq' function is missing)
|
---|
34 | endif
|
---|
35 |
|
---|
36 |
|
---|
37 | all: simple_1
|
---|
38 |
|
---|
39 |
|
---|
40 | simple_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 |
|
---|