summaryrefslogtreecommitdiff
path: root/t/distcom5.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/distcom5.sh')
-rw-r--r--t/distcom5.sh42
1 files changed, 15 insertions, 27 deletions
diff --git a/t/distcom5.sh b/t/distcom5.sh
index 2bb1b3435..939702f14 100644
--- a/t/distcom5.sh
+++ b/t/distcom5.sh
@@ -21,21 +21,6 @@
. test-init.sh
-extract_distcommon ()
-{
- sed -n -e '/^DIST_COMMON =.*\\$/ {
- :loop
- p
- n
- t clear
- :clear
- s/\\$/\\/
- t loop
- p
- n
- }' -e '/^DIST_COMMON =/ p' ${1+"$@"}
-}
-
cat >> configure.ac << 'END'
AC_CONFIG_FILES([tests/autoconf:tests/wrapper.in],
[chmod +x tests/autoconf])
@@ -57,28 +42,31 @@ END
mkdir tests
: > tests/wrapper.in
-: > tests/Makefile.am
+
cat > Makefile.am << 'END'
SUBDIRS = tests
.PHONY: test
test: distdir
test -f $(distdir)/tests/wrapper.in
+check-local: test
+ for x in $(DIST_COMMON); do echo $$x; done \
+ | grep tests && exit 1; :
+END
+
+cat > tests/Makefile.am <<'END'
+check-local:
+ for x in $(DIST_COMMON); do echo $$x; done \
+ | grep wrapper.in > lst
+ cat lst # For debugging.
+ test `wc -l <lst` -eq 1
END
$ACLOCAL
$AUTOCONF
$AUTOMAKE --add-missing
./configure
-$MAKE test
-
-extract_distcommon Makefile.in > top.txt
-extract_distcommon tests/Makefile.in > inner.txt
-
-# Might be useful for debugging.
-cat top.txt
-cat inner.txt
-
-test 0 -eq $(grep -c tests top.txt)
-test 1 -eq $(grep -c wrapper inner.txt)
+$MAKE check
+# Sanity check.
+test -f tests/lst
: