diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-12-31 23:29:24 +0100 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2013-01-01 00:10:10 +0100 |
commit | f3e8d1cd06707576cf702e11c758617bea1a067f (patch) | |
tree | 35a72c742eb040b0f934a19980cc44567d2aef6b /t/remake-config-status-dependencies.sh | |
parent | 9f34684b773490e03e2b93b37fb030c20afc5c0b (diff) | |
download | automake-f3e8d1cd06707576cf702e11c758617bea1a067f.tar.gz |
coverage: test CONFIG_STATUS_DEPENDENCIES
* t/remake-config-status-dependencies.sh: New test.
* t/list-of-tests.mk: Add it.
* doc/automake.texi: Reference it in comments.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 't/remake-config-status-dependencies.sh')
-rwxr-xr-x | t/remake-config-status-dependencies.sh | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/t/remake-config-status-dependencies.sh b/t/remake-config-status-dependencies.sh new file mode 100755 index 000000000..c625661bf --- /dev/null +++ b/t/remake-config-status-dependencies.sh @@ -0,0 +1,70 @@ +#! /bin/sh +# Copyright (C) 2013 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/>. + +# Test CONFIG_STATUS_DEPENDENCIES. + +. test-init.sh + +cat >> configure.ac <<'END' +. ${srcdir}/version.sh +AC_SUBST([EXTRA_VERSION]) +AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_srcdir)/version.sh']) +AC_OUTPUT +END + +echo EXTRA_VERSION=1.0 > version.sh + +cat > Makefile.am <<'END' +.PHONY: test-1 test-2 test-3 +check-local: test-3 +test-1: + test $(EXTRA_VERSION) = 1.0 +test-2: + test $(EXTRA_VERSION) = 2.1 +test-3: + test $(EXTRA_VERSION) = 3.14 +END + +$ACLOCAL +$AUTOCONF +$AUTOMAKE + +./configure +$MAKE test-1 + +$sleep +echo EXTRA_VERSION=2.1 > version.sh +using_gmake || $MAKE Makefile +$MAKE test-2 + +$MAKE distclean +mkdir build +cd build +../configure +$MAKE test-2 +$sleep +echo EXTRA_VERSION=3.14 > ../version.sh +using_gmake || $MAKE Makefile +$MAKE test-3 + +# Contents of $(CONFIG_STATUS_DEPENDENCIES) are *not* to be +# automatically distributed; there is no generic good reason +# for that. +$MAKE distdir +test ! -e $distdir/version.sh +test -f $distdir/configure || exit 99 # Sanity check. + +: |