VirtualBox

Ignore:
Timestamp:
Jun 19, 2012 10:44:52 PM (12 years ago)
Author:
bird
Message:

gnumake/current -> 3.82-cvs.

Location:
vendor/gnumake/current
Files:
3 edited

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 native to LF
    r53 r2596  
    1 $description = "The following test creates a makefile to ...";
     1#                                                                    -*-perl-*-
     2
     3$description = "Test the override directive on variable assignments.";
    24
    35$details = "";
    46
    5 open(MAKEFILE,"> $makefile");
     7# TEST 0: Basic override
    68
    7 # The Contents of the MAKEFILE ...
     9run_make_test('
     10X = start
     11override recur = $(X)
     12override simple := $(X)
     13X = end
     14all: ; @echo "$(recur) $(simple)"
     15',
     16              'recur=I simple=J', "end start\n");
    817
    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
    1519
    16 # END of Contents of MAKEFILE
     20run_make_test('
     21X += X1
     22override X += X2
     23override Y += Y1
     24Y += Y2
     25all: ; @echo "$(X) $(Y)"
     26',
     27              '', "X1 X2 Y1\n");
    1728
    18 close(MAKEFILE);
     29# TEST 2: Override with append to the command line
    1930
    20 &run_make_with_options($makefile,"foo=Hello",&get_logfile);
     31run_make_test(undef, 'X=C Y=C', "C X2 C Y1\n");
    2132
    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
    2534
    26 &compare_output($answer,&get_logfile(1));
     35run_make_test('
     36override define foo
     37@echo First comes the definition.
     38@echo Then comes the override.
     39endef
     40all: ; $(foo)
     41',
     42              'foo=Hello', "First comes the definition.\nThen comes the override.\n");
     43
    2744
    28451;
    29 
    30 
    31 
    32 
    33 
    34 
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