xref: /netbsd-src/external/gpl2/gmake/dist/tests/scripts/variables/INCLUDE_DIRS (revision 69606e3f5c9388e52aed8c120ad63c049ca45d8f)
1*69606e3fSchristos#                                                                    -*-perl-*-
2*69606e3fSchristos$description = "Test the .INCLUDE_DIRS special variable.";
3*69606e3fSchristos
4*69606e3fSchristos$details = "";
5*69606e3fSchristos
6*69606e3fSchristosuse Cwd;
7*69606e3fSchristos
8*69606e3fSchristos$dir = cwd;
9*69606e3fSchristos$dir =~ s,.*/([^/]+)$,../$1,;
10*69606e3fSchristos
11*69606e3fSchristos# Test #1: The content of .INCLUDE_DIRS depends on the platform for which
12*69606e3fSchristos#          make was built. What we know for sure is that it shouldn't be
13*69606e3fSchristos#          empty.
14*69606e3fSchristos#
15*69606e3fSchristosrun_make_test('
16*69606e3fSchristosifeq ($(.INCLUDE_DIRS),)
17*69606e3fSchristos$(warning .INCLUDE_DIRS is empty)
18*69606e3fSchristosendif
19*69606e3fSchristos
20*69606e3fSchristos.PHONY: all
21*69606e3fSchristosall:;@:
22*69606e3fSchristos',
23*69606e3fSchristos'',
24*69606e3fSchristos'');
25*69606e3fSchristos
26*69606e3fSchristos
27*69606e3fSchristos# Test #2: Make sure -I paths end up in .INCLUDE_DIRS.
28*69606e3fSchristos#
29*69606e3fSchristosrun_make_test('
30*69606e3fSchristosifeq ($(dir),)
31*69606e3fSchristos$(warning dir is empty)
32*69606e3fSchristosendif
33*69606e3fSchristos
34*69606e3fSchristosifeq ($(filter $(dir),$(.INCLUDE_DIRS)),)
35*69606e3fSchristos$(warning .INCLUDE_DIRS does not contain $(dir))
36*69606e3fSchristosendif
37*69606e3fSchristos
38*69606e3fSchristos.PHONY: all
39*69606e3fSchristosall:;@:
40*69606e3fSchristos',
41*69606e3fSchristos"-I$dir dir=$dir",
42*69606e3fSchristos'');
43*69606e3fSchristos
44*69606e3fSchristos
45*69606e3fSchristos# This tells the test driver that the perl test script executed properly.
46*69606e3fSchristos1;
47