1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- #! /bin/sh
- required='cc yacc'
- . test-init.sh
- useless_vpath_rebuild && skip_ "would trip on automake bug#7884"
- cat >> configure.ac << 'END'
- AC_PROG_CC
- AC_PROG_YACC
- AC_OUTPUT
- END
- mkdir sub
- cat > sub/parse.y << 'END'
- %{
- int yylex () { return 0; }
- void yyerror (char *s) { return; }
- %}
- %%
- x : 'x' {};
- %%
- int main (void)
- {
- return yyparse ();
- }
- END
- cat > Makefile.am <<'END'
- AUTOMAKE_OPTIONS = subdir-objects
- noinst_PROGRAMS = foo bar
- foo_SOURCES = sub/parse.y
- bar_SOURCES = $(foo_SOURCES)
- AM_YFLAGS = -d
- bar_YFLAGS =
- END
- $ACLOCAL
- $AUTOCONF
- $AUTOMAKE -a
- ./configure
- $MAKE distdir
- test -f sub/parse.c
- test -f sub/parse.h
- test -f sub/bar-parse.c
- test ! -e sub/bar-parse.h
- test -f $distdir/sub/parse.c
- test -f $distdir/sub/parse.h
- test -f $distdir/sub/bar-parse.c
- test ! -e $distdir/sub/bar-parse.h
- mkdir $distdir/build
- chmod -R a-w $distdir
- cd $distdir/build
- chmod u+w .
- ../configure --enable-dependency-tracking YACC=false
- $MAKE
- ls -l sub/*.[ch] && exit 1
- env DISTCHECK_CONFIGURE_FLAGS='YACC=false' $MAKE distcheck
- :
|