VirtualBox

Ignore:
Timestamp:
Sep 15, 2006 2:30:32 AM (18 years ago)
Author:
bird
Message:

Load make-3.81/ into vendor/gnumake/current.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/gnumake/current/tests/scripts/variables/SHELL

    r283 r501  
    55# Find the default value when SHELL is not set.  On UNIX it will be /bin/sh,
    66# but on other platforms who knows?
    7 $oshell = $ENV{SHELL};
     7resetENV();
    88delete $ENV{SHELL};
    9 $mshell = `echo 'all:;\@echo \$(SHELL)' | $make_name -f-`;
     9$mshell = `echo 'all:;\@echo \$(SHELL)' | $make_path -f-`;
    1010chop $mshell;
    1111
    1212# According to POSIX, the value of SHELL in the environment has no impact on
    1313# the value in the makefile.
     14# Note %extraENV takes precedence over the default value for the shell.
    1415
    15 $ENV{SHELL} = '/dev/null';
     16$extraENV{SHELL} = '/dev/null';
    1617run_make_test('all:;@echo "$(SHELL)"', '', $mshell);
    1718
     
    1920# exported to the subshell!  I wanted to set SHELL to be $^X (perl) in the
    2021# makefile, but make runs $(SHELL) -c 'commandline' and that doesn't work at
    21 # all when $(SHELL) is perl :-/.  So, we just add an extra initial / and hope
    22 # for the best on non-UNIX platforms :-/.
     22# all when $(SHELL) is perl :-/.  So, we just add an extra initial /./ which
     23# works well on UNIX and seems to work OK on at least some non-UNIX systems.
    2324
    24 $ENV{SHELL} = $mshell;
     25$extraENV{SHELL} = $mshell;
    2526
    26 run_make_test("SHELL := /$mshell\n".'
     27run_make_test("SHELL := /./$mshell\n".'
    2728all:;@echo "$(SHELL) $$SHELL"
    28 ', '', "/$mshell $mshell");
     29', '', "/./$mshell $mshell");
    2930
    3031# As a GNU make extension, if make's SHELL variable is explicitly exported,
    3132# then we really _DO_ export it.
    3233
    33 run_make_test("export SHELL := /$mshell\n".'
     34$extraENV{SHELL} = $mshell;
     35
     36run_make_test("export SHELL := /./$mshell\n".'
    3437all:;@echo "$(SHELL) $$SHELL"
    35 ', '', "/$mshell /$mshell");
     38', '', "/./$mshell /./$mshell");
    3639
    3740
     
    3942# variable.
    4043
    41 run_make_test("all: SHELL := /$mshell\n".'
     44$extraENV{SHELL} = $mshell;
     45
     46run_make_test("all: SHELL := /./$mshell\n".'
    4247all:;@echo "$(SHELL) $$SHELL"
    43 ', '', "/$mshell $mshell");
     48', '', "/./$mshell $mshell");
    4449
    45 run_make_test("all: export SHELL := /$mshell\n".'
     50$extraENV{SHELL} = $mshell;
     51
     52run_make_test("all: export SHELL := /./$mshell\n".'
    4653all:;@echo "$(SHELL) $$SHELL"
    47 ', '', "/$mshell $mshell");
     54', '', "/./$mshell $mshell");
    4855
    49561;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette