Edit

kc3-lang/automake/tests/pluseq3.test

Branch :

  • Show log

    Commit

  • Author : Akim Demaille
    Date : 2001-02-25 18:42:41
    Hash : 1b09f1d2
    Message : Internally just store the conditionals as space separated lists of CONDITIONS (instead of @CONDITIONS@). * automake.in (&conditional_true_when, &variable_conditions_sub): Split conditions at spaces. (&handle_dependencies, &variable_conditions_permutations): Don't put @ around conditions. (&variable_conditions_cmp): There are no @ to strip. (&make_condition): New. (&define_pretty_variable, &read_main_am_file, &read_am_file): Use it. (&read_main_am_file, &read_am_file): Stop playing with @ by hand. Join @conditional_stack with spaces. (&read_main_am_file): Adjust the output of variables. Output `TRUE = true' under the condition `TEST' as `@TEST@TRUE = true' and no longer `@TEST@TRUE = @TEST@true'. (&variable_conditions_cmp): Rename as... (&by_condition): this. Sort in a human pleasant order. Use it everywhere a human can see conditions. (&variable_conditions_reduce): Don't sort conditions, that's pointless. * tests/cond.test, ctarget1.test, pluseq3.test: Strengthen.

  • tests/pluseq3.test
  • #! /bin/sh
    
    # Another `+=' test with conditionals.
    
    . $srcdir/defs || exit 1
    
    echo 'AM_CONDITIONAL(CHECK, true)' >> configure.in
    
    cat > Makefile.am << 'END'
    
    if CHECK
    data_DATA = zar
    endif
    
    if CHECK
    data_DATA += \
     doz
    else
    data_DATA += dog
    endif
    
    END
    
    : > zar
    : > doz
    : > dog
    
    set -e
    
    $AUTOMAKE
    
    grep '^@CHECK_TRUE@data_DATA = zar \\$' Makefile.in
    grep '^@CHECK_TRUE@ doz$' Makefile.in
    
    grep '^@CHECK_FALSE@data_DATA = dog$' Makefile.in
    
    exit 0