From 539f513773b2e651d987a7bdbdffd8b5164d58cf Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Sun, 28 Nov 2004 23:11:23 +0000 Subject: Fix for bug #1276: Handle SHELL according to POSIX requirements. POSIX requires that the value of SHELL in the makefile NOT be exported to sub-commands. Instead, the value in the environment when make was invoked should be passed to the environment of sub-commands. Note that make still uses SHELL to _run_ sub-commands; it just doesn't change the value of the SHELL variable in the environment of sub-commands. As an extension to POSIX, if the makefile explicitly exports SHELL then GNU make _will_ use it in the environment of sub-commands. --- tests/scripts/variables/MAKELEVEL | 3 +-- tests/scripts/variables/SHELL | 49 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 tests/scripts/variables/SHELL (limited to 'tests/scripts/variables') diff --git a/tests/scripts/variables/MAKELEVEL b/tests/scripts/variables/MAKELEVEL index 79a184e..96a4e74 100644 --- a/tests/scripts/variables/MAKELEVEL +++ b/tests/scripts/variables/MAKELEVEL @@ -1,4 +1,4 @@ -# -*-perl-mode-*- +# -*-perl-*- $description = "The following test creates a makefile to test makelevels in Make. It prints \$(MAKELEVEL) and then @@ -9,7 +9,6 @@ open(MAKEFILE,"> $makefile"); # The Contents of the MAKEFILE ... print MAKEFILE <