Changeset 2596 in kBuild for vendor/gnumake/current/tests/scripts/features/override
- Timestamp:
- Jun 19, 2012 10:44:52 PM (12 years ago)
- Location:
- vendor/gnumake/current
- Files:
-
- 3 edited
-
. (modified) (1 prop)
-
tests (modified) (1 prop)
-
tests/scripts/features/override (modified) (1 diff, 1 prop)
Legend:
- Unmodified
- Added
- Removed
-
vendor/gnumake/current
- Property svn:ignore deleted
-
vendor/gnumake/current/tests
- Property svn:ignore deleted
-
vendor/gnumake/current/tests/scripts/features/override
-
Property svn:eol-style
changed from
nativetoLF
r53 r2596 1 $description = "The following test creates a makefile to ..."; 1 # -*-perl-*- 2 3 $description = "Test the override directive on variable assignments."; 2 4 3 5 $details = ""; 4 6 5 open(MAKEFILE,"> $makefile"); 7 # TEST 0: Basic override 6 8 7 # The Contents of the MAKEFILE ... 9 run_make_test(' 10 X = start 11 override recur = $(X) 12 override simple := $(X) 13 X = end 14 all: ; @echo "$(recur) $(simple)" 15 ', 16 'recur=I simple=J', "end start\n"); 8 17 9 print MAKEFILE "override define foo\n" 10 ."\@echo First comes the definition.\n" 11 ."\@echo Then comes the override.\n" 12 ."endef\n" 13 ."all: \n" 14 ."\t\$(foo)\n"; 18 # TEST 1: Override with append 15 19 16 # END of Contents of MAKEFILE 20 run_make_test(' 21 X += X1 22 override X += X2 23 override Y += Y1 24 Y += Y2 25 all: ; @echo "$(X) $(Y)" 26 ', 27 '', "X1 X2 Y1\n"); 17 28 18 close(MAKEFILE); 29 # TEST 2: Override with append to the command line 19 30 20 &run_make_with_options($makefile,"foo=Hello",&get_logfile);31 run_make_test(undef, 'X=C Y=C', "C X2 C Y1\n"); 21 32 22 # Create the answer to what should be produced by this Makefile 23 $answer = "First comes the definition.\n" 24 ."Then comes the override.\n"; 33 # Test override of define/endef 25 34 26 &compare_output($answer,&get_logfile(1)); 35 run_make_test(' 36 override define foo 37 @echo First comes the definition. 38 @echo Then comes the override. 39 endef 40 all: ; $(foo) 41 ', 42 'foo=Hello', "First comes the definition.\nThen comes the override.\n"); 43 27 44 28 45 1; 29 30 31 32 33 34 -
Property svn:eol-style
changed from
Note:
See TracChangeset
for help on using the changeset viewer.

