/[make]/make/tests/scripts/functions/eval
ViewVC logotype

Diff of /make/tests/scripts/functions/eval

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by psmith, Thu Jan 30 07:49:17 2003 UTC revision 1.4 by psmith, Tue Nov 4 07:40:29 2003 UTC
# Line 109  close(MAKEFILE); Line 109  close(MAKEFILE);
109  $answer = "[         9 8 7 6 5 4 3 2 1 0 ]\n";  $answer = "[         9 8 7 6 5 4 3 2 1 0 ]\n";
110  &compare_output($answer,&get_logfile(1));  &compare_output($answer,&get_logfile(1));
111    
112    
113    # TEST eval with no filename context.
114    # The trick here is that because EVAR is taken from the environment, it must
115    # be evaluated before every command is invoked.  Make sure that works, when
116    # we have no file context for reading_file (bug # 6195)
117    
118    $makefile4 = &get_tmpfile;
119    
120    open(MAKEFILE,"> $makefile4");
121    
122    print MAKEFILE <<'EOF';
123    EVAR = $(eval FOBAR = 1)
124    all: ; @echo "OK"
125    
126    EOF
127    
128    close(MAKEFILE);
129    
130    $ENV{EVAR} = '1';
131    &run_make_with_options($makefile4, "", &get_logfile);
132    $answer = "OK\n";
133    &compare_output($answer,&get_logfile(1));
134    
135    delete $ENV{EVAR};
136    
137  1;  1;

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26