Some build scripts will try to build something before they can properly
answer the `print-distdir' question. Avoid being confused by the
resulting spam by writing the distribution directory name to a weird
file descriptor.
cat >find-distdir.mk <<'EOF'
include Makefile
print-distdir:
- @echo $(distdir)
+ @echo >&3 $(distdir)
EOF
-assign distdir $(make -f find-distdir.mk print-distdir)
+assign distdir \
+ $({ make -f find-distdir.mk print-distdir >/dev/null 2>&1; } 3>&1)
## Get a tarball distribution.
case "$distcheck" in