Ignore:
Timestamp:
Sep 15, 2006, 7:09:38 AM (19 years ago)
Author:
bird
Message:

Untested merge with GNU Make v3.81 (vendor/gnumake/2005-05-16 -> vendor/gnumake/current).

Location:
trunk/src/gmake/tests/scripts/variables
Files:
2 edited
3 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/gmake/tests/scripts/variables/SHELL

    r282 r503  
    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;
  • trunk/src/gmake/tests/scripts/variables/automatic

    r285 r503  
    2828close(MAKEFILE);
    2929
    30 # TEST #1 -- simple test
     30# TEST #0 -- simple test
    3131# -------
    3232
     
    4747unlink(qw(foo.x bar.y baz.z));
    4848
    49 # TEST #2 -- test the SysV emulation of $$@ etc.
     49# TEST #1 -- test the SysV emulation of $$@ etc.
    5050# -------
    5151
     
    5555print MAKEFILE "dir = $dir\n";
    5656print MAKEFILE <<'EOF';
     57.SECONDEXPANSION:
    5758.SUFFIXES:
    5859.DEFAULT: ; @echo '$@'
     
    7980&compare_output($answer, &get_logfile(1));
    8081
    81 # TEST #3 -- test for Savannah bug #12320.
     82# TEST #2 -- test for Savannah bug #12320.
    8283#
    8384run_make_test('
     
    8788        @echo $*
    8889
    89 mbr.src: ; @:
     90mbr.src: ; @:',
     91              '',
     92              'mbr');
    9093
    91 ',
    92 '',
    93 'mbr
    94 ');
     94# TEST #3 -- test for Savannah bug #8154
     95# Make sure that nonexistent prerequisites are listed in $?, since they are
     96# considered reasons for the target to be rebuilt.
     97#
     98# This was undone due to Savannah bug #16002.  We'll re-do it in the next
     99# release.  See Savannah bug #16051.
     100
     101#touch('foo');
     102#
     103#run_make_test('
     104#foo: bar ; @echo "\$$? = $?"
     105#bar: ;',
     106#              '',
     107#              '$? = bar');
     108#
     109#unlink('foo');
    95110
    961111;
Note: See TracChangeset for help on using the changeset viewer.