Home | History | Annotate | Line # | Download | only in variables
      1  1.1  christos #                                                                    -*-perl-*-
      2  1.1  christos $description = "Test the .INCLUDE_DIRS special variable.";
      3  1.1  christos 
      4  1.1  christos $details = "";
      5  1.1  christos 
      6  1.1  christos use Cwd;
      7  1.1  christos 
      8  1.1  christos $dir = cwd;
      9  1.1  christos $dir =~ s,.*/([^/]+)$,../$1,;
     10  1.1  christos 
     11  1.1  christos # Test #1: The content of .INCLUDE_DIRS depends on the platform for which
     12  1.1  christos #          make was built. What we know for sure is that it shouldn't be
     13  1.1  christos #          empty.
     14  1.1  christos #
     15  1.1  christos run_make_test('
     16  1.1  christos ifeq ($(.INCLUDE_DIRS),)
     17  1.1  christos $(warning .INCLUDE_DIRS is empty)
     18  1.1  christos endif
     19  1.1  christos 
     20  1.1  christos .PHONY: all
     21  1.1  christos all:;@:
     22  1.1  christos ',
     23  1.1  christos '',
     24  1.1  christos '');
     25  1.1  christos 
     26  1.1  christos 
     27  1.1  christos # Test #2: Make sure -I paths end up in .INCLUDE_DIRS.
     28  1.1  christos #
     29  1.1  christos run_make_test('
     30  1.1  christos ifeq ($(dir),)
     31  1.1  christos $(warning dir is empty)
     32  1.1  christos endif
     33  1.1  christos 
     34  1.1  christos ifeq ($(filter $(dir),$(.INCLUDE_DIRS)),)
     35  1.1  christos $(warning .INCLUDE_DIRS does not contain $(dir))
     36  1.1  christos endif
     37  1.1  christos 
     38  1.1  christos .PHONY: all
     39  1.1  christos all:;@:
     40  1.1  christos ',
     41  1.1  christos "-I$dir dir=$dir",
     42  1.1  christos '');
     43  1.1  christos 
     44  1.1  christos 
     45  1.1  christos # This tells the test driver that the perl test script executed properly.
     46  1.1  christos 1;
     47