mirror of
https://github.com/mirror/make.git
synced 2026-09-03 21:23:01 +08:00
Implemented the .INCLUDE_DIRS special variable. It expands to a list
of directories that make searches for included makefiles.
This commit is contained in:
46
tests/scripts/variables/INCLUDE_DIRS
Normal file
46
tests/scripts/variables/INCLUDE_DIRS
Normal file
@@ -0,0 +1,46 @@
|
||||
# -*-perl-*-
|
||||
$description = "Test the .INCLUDE_DIRS special variable.";
|
||||
|
||||
$details = "";
|
||||
|
||||
use Cwd;
|
||||
|
||||
$dir = cwd;
|
||||
$dir =~ s,.*/([^/]+)$,../$1,;
|
||||
|
||||
# Test #1: The content of .INCLUDE_DIRS depends on the platform for which
|
||||
# make was built. What we know for sure is that it shouldn't be
|
||||
# empty.
|
||||
#
|
||||
run_make_test('
|
||||
ifeq ($(.INCLUDE_DIRS),)
|
||||
$(warning .INCLUDE_DIRS is empty)
|
||||
endif
|
||||
|
||||
.PHONY: all
|
||||
all:;@:
|
||||
',
|
||||
'',
|
||||
'');
|
||||
|
||||
|
||||
# Test #2: Make sure -I paths end up in .INCLUDE_DIRS.
|
||||
#
|
||||
run_make_test('
|
||||
ifeq ($(dir),)
|
||||
$(warning dir is empty)
|
||||
endif
|
||||
|
||||
ifeq ($(filter $(dir),$(.INCLUDE_DIRS)),)
|
||||
$(warning .INCLUDE_DIRS does not contain $(dir))
|
||||
endif
|
||||
|
||||
.PHONY: all
|
||||
all:;@:
|
||||
',
|
||||
"-I$dir dir=$dir",
|
||||
'');
|
||||
|
||||
|
||||
# This tells the test driver that the perl test script executed properly.
|
||||
1;
|
||||
Reference in New Issue
Block a user