-ChangeLog merge=merge-changelog
+NEWS merge=union
*.texi* diff=texinfo
## (among them, TAP).
# Restructured Text title and section.
-am__rst_title = sed 's/.*/ & /;h;s/./=/g;p;x;p;g;p;s/.*//'
-am__rst_section = sed 'p;s/./=/g;p;g'
+am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
+am__rst_section = { sed 'p;s/./=/g;' && echo; }
# Solaris 10 'make', and several other traditional 'make' implementations,
# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
## and are thus executed also with "make -n" -- either because they
## are declared as dependencies to '.MAKE' (NetBSD make), or because
## their recipes contain the "$(MAKE)" string (GNU and Solari make).
+
+## The case statement has [:] in order to not tickle makefile-deps.test
+## which greps for '^ *:'.
am__make_dryrun = \
{ \
am__dry=no; \
for am__flg in : $(MAKEFLAGS); do \
case $$am__flg in \
- :) ;; \
+ [:]) ;; \
*=*|--*) ;; \
*n*) am__dry=yes; break;; \
esac; \
yes)
po=Plo objext=lo a=la
normalized_target=libfoo_la
- LIBPRIMARY=LTLIBRARIES LINKADD=LIBADD
+ # On platforms requiring that no undefined symbols exist in order
+ # to build shared libraries (e.g. Windows DLLs), you have to
+ # explicitly declare that the libtool library you are building
+ # does not actually have any undefined symbols, for libtool to
+ # even try to build it as a shared library. Without that
+ # explicit declaration, libtool falls back to a static library
+ # only, regardless of any --enable-shared flags etc.
+ LIBPRIMARY=LTLIBRARIES LINKADD=LIBADD NOUNDEF=-no-undefined
+ libbaz_ldflags="libbaz_${a}_LDFLAGS = $NOUNDEF"
echo lib_LTLIBRARIES = libfoo.la >> Makefile.am
make_ok ()
{
no)
po=Po objext='$(OBJEXT)' a=a
normalized_target=foo
- LIBPRIMARY=LIBRARIES LINKADD=LDADD
+ LIBPRIMARY=LIBRARIES LINKADD=LDADD NOUNDEF=
+ libbaz_ldflags=
echo bin_PROGRAMS = foo >> Makefile.am
make_ok ()
{
# We include subfoo only to be sure that the munging in depcomp
# doesn't remove too much from the object file name.
${normalized_target}_SOURCES = foo.c sub/subfoo.c foo.h sub/subfoo.h
+${normalized_target}_LDFLAGS = $NOUNDEF
${normalized_target}_${LINKADD} = src/libbaz.$a
.PHONY: grep-test
# We include sub2foo only to be sure that the munging in depcomp
# doesn't remove too much from the object file name.
libbaz_${a}_SOURCES = baz.c sub2/sub2foo.c baz.h sub2/sub2foo.h
+$libbaz_ldflags
END
cat > foo.c <<'END'
case $depmode in
auto)
- plan_ 84
- do_all_tests ()
- {
- do_test default
- do_test noshared --disable-shared
- do_test nostatic --disable-static
- }
+ if test $depcomp_with_libtool = no; then
+ plan_ 28
+ do_all_tests () { do_test; }
+ else
+ plan_ 84
+ do_all_tests ()
+ {
+ do_test default
+ do_test noshared --disable-shared
+ do_test nostatic --disable-static
+ }
+ fi
displayed_depmode='..*' # At least one character long.
cfg_deptrack=--enable-dependency-tracking ;;
disabled)
plan_ 28
- do_all_tests() { do_test; }
+ do_all_tests () { do_test; }
displayed_depmode=none
cfg_deptrack=--disable-dependency-tracking ;;
*)
plan_ 28
- do_all_tests() { do_test; }
+ do_all_tests () { do_test; }
displayed_depmode="(cached) $depmode"
cfg_deptrack="$cachevar=$depmode"
# Sanity check: ensure the cache variable we force is truly
case $c in
# Assume gzip(1) is available on every reasonable portability target.
gzip)
- continue;;
+ continue
+ ;;
# On Cygwin, as of 9/2/2012, 'compress' is provided by sharutils
# and is just a dummy script that is not able to actually compress
# (it can only decompress). So, check that the 'compress' program
compress)
for x in 1 2 3 4 5 6 7 8; do
echo aaaaaaaaaaaaaaa
- done | $c -c >/dev/null && continue;;
+ done | $c -c >/dev/null && continue
+ : For shells with busted 'set -e'.
+ ;;
*)
- $c --version </dev/null >&2 && continue;;
+ $c --version </dev/null >&2 && continue
+ : For shells with busted 'set -e'.
+ ;;
esac
echo $c
done | tr "$nl" ' '`
reqd.test \
reqd2.test \
repeated-options.test \
+rst-formatting.test \
rulepat.test \
self-check-cleanup.tap \
self-check-configure-help.test \
[AC_LANG_PROGRAM([[#include <unistd.h>]],
[[write (9, "foobar\n", 7); return 0;]])],
[AM_RUN_LOG([./conftest$EXEEXT 9>&1]) \
- && AM_RUN_LOG([(./conftest$EXEEXT 9>&1) | grep "^foobar"]) \
+dnl Leading ":;" required to avoid having two nested subshells starting
+dnl with '((' in the generated configure: that is unportable and could
+dnl confuse some shells (e.g., NetBSD 5.1 /bin/ksh) into thinking we are
+dnl trying to perform an arithmetic operation.
+ && AM_RUN_LOG([:; (./conftest$EXEEXT 9>&1) | grep "^foobar"]) \
&& am__ok=yes])
test $am__ok = yes || AS_EXIT([63])
AM_CONDITIONAL([real_EXEEXT], [test -n "$EXEEXT"])
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2012 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/>.
+
+# Parallel testsuite harness: check APIs for the registering the
+# "global test result" in `*.trs' files, as documented in the automake
+# manual.
+
+am_create_testdir=empty
+. ./defs || Exit 1
+
+sed -n '/^am__rst_[a-z_][a-z_]* =/p' "$am_amdir"/check.am > Makefile \
+ || framework_failure_ "fetching definitions from check.am"
+
+cat >> Makefile << 'END'
+test:
+ printf '%s\n' "$$in" | $(am__rst_title) > title-got
+ printf '%s\n' "$$in" | $(am__rst_section) > section-got
+ cat title-exp
+ cat title-got
+ diff title-exp title-got
+ cat section-exp
+ cat section-got
+ diff section-exp section-got
+END
+
+# -------------------------------------------------------------------------
+
+cat > title-exp <<'END'
+==============
+ ab cd ef
+==============
+
+END
+
+cat > section-exp <<'END'
+ab cd ef
+========
+
+END
+
+env in='ab cd ef' $MAKE test
+
+# -------------------------------------------------------------------------
+
+cat > title-exp <<'END'
+============================================================================
+ 0123456789012345678901234567890123456789012345678901234567890123456789
+============================================================================
+
+END
+
+cat > section-exp <<'END'
+0123456789012345678901234567890123456789012345678901234567890123456789
+======================================================================
+
+END
+
+in=0123456789012345678901234567890123456789012345678901234567890123456789
+env in=$in $MAKE test
+
+# -------------------------------------------------------------------------
+
+cat > title-exp <<'END'
+=======
+ x
+=======
+
+END
+
+cat > section-exp <<'END'
+x
+=
+
+END
+
+env in=x $MAKE test
+
+# -------------------------------------------------------------------------
+
+:
esac
}
-command_ok_ '"make check" fails' eval 'not $MAKE check >stdout'
+command_ok_ '"make check" fails' eval '
+ (
+ st=0; $MAKE check >stdout || st=$?
+ # Extra "echo" and silencing of xtraces required to avoid possible
+ # garbled output with NetBSD make, which would miss some final
+ # newlines in the expected places and thus mess up our TAP output.
+ set +x; echo
+ test $st -gt 0
+ )
+'
cat stdout # For debugging.
command_ok_ "count of test results" count_test_results \
#! /bin/sh
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011, 2012 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
# - `test-driver' script not correctly distributed when TESTS is
# defined in a subdir Makefile
+am_create_testdir=empty
am_parallel_tests=yes
. ./defs || Exit 1
-cat >> configure.in << 'END'
-AC_CONFIG_FILES([tests/Makefile])
-AC_OUTPUT
+ocwd=`pwd` || fatal_ "getting current working directory"
+
+do_check ()
+{
+ whereopts=$1 auxdir=$2
+ case $#,$whereopts in
+ 2,ac) ac_opts=parallel-tests am_code= ;;
+ 2,am) am_opts=parallel-tests ac_code= ;;
+ *) fatal_ "do_check: bad usage";;
+ esac
+ mkdir $whereopts
+ cd $whereopts
+ mkdir tests
+ unindent > configure.in << END
+ AC_INIT([$me], [1.0])
+ AC_CONFIG_AUX_DIR([$auxdir])
+ AM_INIT_AUTOMAKE([$ac_opts])
+ AC_CONFIG_FILES([Makefile tests/Makefile])
+ AC_OUTPUT
END
-
-rm -f depcomp # It's unneeded.
-
-mkdir tests
-
-cat > Makefile.am << 'END'
-SUBDIRS = tests
-check-local: test-top
-test-top: distdir
- ls -l $(distdir) $(distdir)/* ;: For debugging.
- test -f $(distdir)/test-driver
-.PHONY: test-top
+ if test $auxdir = .; then
+ test_driver=test-driver
+ else
+ mkdir $auxdir
+ test_driver=$auxdir/test-driver
+ fi
+ # No 'AUTOMAKE_OPTIONS' in here -- purposely.
+ unindent > Makefile.am << END
+ SUBDIRS = tests
+ check-local: test-top
+ test-top: distdir
+ ls -l \$(distdir) \$(distdir)/* ;: For debugging.
+ test -f \$(distdir)/$test_driver
+ .PHONY: test-top
END
-
-cat > tests/Makefile.am << 'END'
-check-local: test-sub
-test-sub:
- echo ' ' $(DIST_COMMON) ' ' | grep '[ /]test-driver '
-TESTS = foo.test
-EXTRA_DIST = $(TESTS)
+ unindent > tests/Makefile.am << END
+ AUTOMAKE_OPTIONS = $am_opts
+ check-local: test-sub
+ test-sub:
+ echo ' ' \$(DIST_COMMON) ' ' | grep '[ /]$test_driver '
+ TESTS = foo.test
+ EXTRA_DIST = \$(TESTS)
END
-
-cat > tests/foo.test << 'END'
-#!/bin/sh
-exit 0
+ unindent > tests/foo.test << 'END'
+ #!/bin/sh
+ exit 0
END
-chmod a+x tests/foo.test
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
-./configure
-$MAKE test-top
-cd tests; $MAKE test-sub; cd ..;
-$MAKE distcheck
-
-# Try again, with a `config_auxdir' != `.' this time.
-
-$MAKE distclean
-
-mkdir build-aux
-mv missing install-sh test-driver build-aux
-
-for d in . tests; do
- sed 's|test-driver|build-aux/test-driver|' $d/Makefile.am > $d/t
- mv -f $d/t $d/Makefile.am
- cat $d/Makefile.am # For debugging.
-done
-
-# Extra newline possibly required by OpenBSD 3.9 sed, see the autoconf
-# manual for details.
-sed '/^AC_INIT/i\
-AC_CONFIG_AUX_DIR([build-aux])
-' configure.in > t
-mv -f t configure.in
-cat configure.in # For debugging.
-
-touch aclocal.m4 # To avoid useless remakes.
-$AUTOCONF
-$AUTOMAKE
-./configure
-$MAKE test-top
-cd tests; $MAKE test-sub; cd ..;
-$MAKE distcheck
+ chmod a+x tests/foo.test
+ $ACLOCAL
+ $AUTOCONF
+ $AUTOMAKE -a
+ ./configure
+ $MAKE test-top
+ cd tests
+ $MAKE test-sub
+ cd ..
+ $MAKE distcheck
+ # Try code path without automatic installation of required files.
+ mv -f Makefile.in Makefile.sav
+ mv -f tests/Makefile.in tests/Makefile.sav
+ $AUTOMAKE
+ diff Makefile.in Makefile.sav
+ diff tests/Makefile.in tests/Makefile.sav
+ :
+}
+
+do_check ac .
+do_check am build-aux
: