| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 | #! /bin/sh# Copyright (C) 2011-2017 Free Software Foundation, Inc.## This program is free software; you can redistribute it and/or modify# it under the terms of the GNU General Public License as published by# the Free Software Foundation; either version 2, or (at your option)# any later version.## This program is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the# GNU General Public License for more details.## You should have received a copy of the GNU General Public License# along with this program.  If not, see <http://www.gnu.org/licenses/>.# Check that distributed Yacc-generated parsers are not uselessly# remade from an unpacked distributed tarball.# See automake bug#7884.required='cc yacc'. test-init.shcat >> configure.ac << 'END'AC_PROG_CCAC_PROG_YACCAC_OUTPUTENDcat > Makefile.am << 'END'bin_PROGRAMS = foobar zardozfoobar_SOURCES = parse.y main.czardoz_SOURCES = $(foobar_SOURCES)zardoz_YFLAGS = -dENDcat > parse.y << 'END'%{int yylex () { return 0; }void yyerror (char *s) {}%}%%foobar : 'f' 'o' 'o' 'b' 'a' 'r' {};ENDcat > main.c << 'END'int main () { return 0; }END$ACLOCAL$AUTOCONF$AUTOMAKE -a./configure$MAKE$MAKE distdirchmod -R a-w $distdirmkdir bincat > bin/yacc <<'END'#!/bin/shecho "$0 invoked, shouldn't happen!" >&2exit 1ENDcp bin/yacc bin/bisonchmod a+x bin/yacc bin/bisonPATH=$(pwd)/bin$PATH_SEPARATOR$PATHYACC=yacc BISON=bisonexport YACC BISONmkdir buildcd build../$distdir/configure$MAKE# Sanity check.cd ..chmod u+w $distdirrm -f $distdir/parse.cchmod a-w $distdirmkdir build2cd build2../$distdir/configurerun_make -e FAIL -M$FGREP parse.c output:
 |