2 # Copyright (C) 2013 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2, or (at your option)
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 # Test CONFIG_STATUS_DEPENDENCIES.
21 cat >> configure.ac <<'END'
22 . ${srcdir}/version.sh
23 AC_SUBST([EXTRA_VERSION])
24 AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_srcdir)/version.sh'])
28 echo EXTRA_VERSION=1.0 > version.sh
30 cat > Makefile.am <<'END'
31 .PHONY: test-1 test-2 test-3
34 test $(EXTRA_VERSION) = 1.0
36 test $(EXTRA_VERSION) = 2.1
38 test $(EXTRA_VERSION) = 3.14
49 echo EXTRA_VERSION=2.1 > version.sh
50 using_gmake || $MAKE Makefile
59 echo EXTRA_VERSION=3.14 > ../version.sh
60 using_gmake || $MAKE Makefile
63 # Contents of $(CONFIG_STATUS_DEPENDENCIES) are *not* to be
64 # automatically distributed; there is no generic good reason
67 test ! -e $distdir/version.sh
68 test -f $distdir/configure || exit 99 # Sanity check.