Edit

kc3-lang/automake/tests/yacc2.test

Branch :

  • Show log

    Commit

  • Author : Alexandre Oliva
    Date : 1999-04-10 00:48:06
    Hash : c97c0af0
    Message : * yacc2.test, yacc3.test: New files. * Makefile.am (TESTS): Added yacc2.test and yacc3.test.

  • tests/yacc2.test
  • #! /bin/sh
    
    # Test to make sure intermediate .h file is not generated nor removed
    # if (AM_)?YFLAGS do not contain -d.  Requested by Jim Meyering.
    
    . $srcdir/defs || exit 1
    
    cat >> configure.in << 'END'
    AC_PROG_CC
    AC_PROG_YACC
    END
    
    cat > Makefile.am <<'END'
    bin_PROGRAMS = zardoz
    zardoz_SOURCES = zardoz.y
    END
    
    $AUTOMAKE || exit 1
    
    # If zardoz.h IS mentioned, fail
    grep 'zardoz.h' Makefile.in > /dev/null && exit 1
    
    echo 'AM_YFLAGS = -d' >> Makefile.am
    
    $AUTOMAKE || exit 1
    
    # If zardoz.h is NOT mentioned, fail
    grep 'zardoz.h' Makefile.in > /dev/null || exit 1
    
    echo 'AM_YFLAGS = ' >> Makefile.am
    
    $AUTOMAKE || exit 1
    
    # If zardoz.h IS mentioned, fail
    grep 'zardoz.h' Makefile.in > /dev/null && exit 1
    
    echo 'YFLAGS = -d' >> Makefile.am
    
    $AUTOMAKE || exit 1
    
    # If zardoz.h is NOT mentioned, fail
    grep 'zardoz.h' Makefile.in > /dev/null || exit 1
    
    echo 'YFLAGS = ' >> Makefile.am
    
    $AUTOMAKE || exit 1
    
    # If zardoz.h IS mentioned, fail
    grep 'zardoz.h' Makefile.in > /dev/null && exit 1
    
    exit 0