| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 | #! /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 VPATH builds and "make distcheck" works with packages# using yacc and the automake 'subdir-objects' option.# Exposes automake bug#8485.required='cc yacc'. test-init.sh# This test is bounded to fail for any implementation that# triggers automake bug#7884.useless_vpath_rebuild && skip_ "would trip on automake bug#7884"cat >> configure.ac << 'END'AC_PROG_CCAC_PROG_YACCAC_OUTPUTENDmkdir subcat > sub/parse.y << 'END'%{int yylex () { return 0; }void yyerror (char *s) { return; }%}%%x : 'x' {};%%int main (void){  return yyparse ();}ENDcat > Makefile.am <<'END'AUTOMAKE_OPTIONS = subdir-objectsnoinst_PROGRAMS = foo barfoo_SOURCES = sub/parse.ybar_SOURCES = $(foo_SOURCES)AM_YFLAGS = -dbar_YFLAGS =END$ACLOCAL$AUTOCONF$AUTOMAKE -a./configure$MAKE distdir# Yacc-derived C source and header files must be built and distributed.test   -f sub/parse.ctest   -f sub/parse.htest   -f sub/bar-parse.ctest ! -e sub/bar-parse.htest   -f $distdir/sub/parse.ctest   -f $distdir/sub/parse.htest   -f $distdir/sub/bar-parse.ctest ! -e $distdir/sub/bar-parse.h# But they shouldn't be rebuilt in VPATH builds.mkdir $distdir/buildchmod -R a-w $distdircd $distdir/buildchmod u+w .# Try to enable dependency tracking even with slow dependency# extractors, to improve coverage.../configure --enable-dependency-tracking YACC=false$MAKEls -l sub/*.[ch] && exit 1env DISTCHECK_CONFIGURE_FLAGS='YACC=false' $MAKE distcheck:
 |