From 3dd1faa5c849dbeb59a88653068c010699ce86f7 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 14 Nov 2005 15:31:13 +0000 Subject: Implemented the .INCLUDE_DIRS special variable. It expands to a list of directories that make searches for included makefiles. --- tests/ChangeLog | 5 ++++ tests/scripts/variables/INCLUDE_DIRS | 46 ++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 tests/scripts/variables/INCLUDE_DIRS (limited to 'tests') diff --git a/tests/ChangeLog b/tests/ChangeLog index c936301..d30f0c9 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,8 @@ +2005-11-14 Boris Kolpackov + + * scripts/variables/INCLUDE_DIRS: Add a test for the .INCLUDE_DIRS + special variable. + 2005-10-24 Paul D. Smith * scripts/misc/general4: Test '$$' in prerequisites list. diff --git a/tests/scripts/variables/INCLUDE_DIRS b/tests/scripts/variables/INCLUDE_DIRS new file mode 100644 index 0000000..c9662e9 --- /dev/null +++ b/tests/scripts/variables/INCLUDE_DIRS @@ -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; -- cgit v1.2.3