+2011-04-12 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ tests: fix spurious failure in test 'yacc-d-cxx.test'
+ * tests/yacc-d-cxx.test: Create ylwrap script before calling
+ automake for the first time, so that the script gets correctly
+ distributed. Add checks verifying it indeed is.
+
2011-04-12 Stefano Lattarini <stefano.lattarini@gmail.com>
tests cosmetics: remove redundant definitions of variable $tab
AC_OUTPUT
END
-cat > Makefile.am <<'END'
-SUBDIRS = foo bar baz qux
-END
-
mkdir foo bar baz qux baz/sub
# These makefiles will be extended later.
-cat > foo/Makefile.am <<'END'
+cat > Makefile.am <<'END'
.PHONY: echo-distcom
echo-distcom:
@echo ' ' $(DIST_COMMON) ' '
END
-cp foo/Makefile.am bar/Makefile.am
-cp foo/Makefile.am baz/Makefile.am
-cp foo/Makefile.am qux/Makefile.am
+cp Makefile.am foo/Makefile.am
+cp Makefile.am bar/Makefile.am
+cp Makefile.am baz/Makefile.am
+cp Makefile.am qux/Makefile.am
+
+cat >> Makefile.am <<'END'
+SUBDIRS = foo bar baz qux
+END
$ACLOCAL
$AUTOCONF
-$AUTOMAKE Makefile
cp $testsrcdir/../lib/ylwrap .
+$AUTOMAKE Makefile
+
# Try with -d in $(YFLAGS) (don't do this in real life!).
cat >> foo/Makefile.am <<END
bin_PROGRAMS = zardoz
test -f qux/maude-parse.cxx
test -f qux/maude-parse.hxx
+# The ylwrap script must be shipped.
+$MAKE echo-distcom
+$MAKE -s echo-distcom | grep '[ /]ylwrap '
+
# The generated C++ source and header files must be shipped.
cd foo
$MAKE echo-distcom
$MAKE distdir
find $distdir # For debugging.
+test -f $distdir/ylwrap
test -f $distdir/foo/parse.cc
test -f $distdir/foo/parse.hh
test -f $distdir/bar/parse.cpp