diff options
author | Alexandre Duret-Lutz <adl@gnu.org> | 2003-04-25 18:39:21 +0000 |
---|---|---|
committer | Alexandre Duret-Lutz <adl@gnu.org> | 2003-04-25 18:39:21 +0000 |
commit | 535b7ba4b5b9828d915d1ab25aae39ab25b194dc (patch) | |
tree | b5013927d9b9425e980b3953be3a2ee26ee7ea89 /tests/aclocal6.test | |
parent | 425c4fddab019419400dd2127efa154298ff2d85 (diff) | |
download | automake-535b7ba4b5b9828d915d1ab25aae39ab25b194dc.tar.gz |
* tests/aclocal6.test: New file.
* lib/am/configure.am (am--refresh): New rule.
(%MAKEFILE-IN%, %MAKEFILE%, $(top_builddir)/config.status,
$(top_srcdir)/configure): Call the top-level am--refresh from
subdirectories.
($(ACLOCAL_M4)): Depend upon %CONFIGURE_DEPS%. Call the
top-level am--refresh when not in the top-level directory.
Fix jump directories for VPATH builds.
Suggested by Raja R. Harinath.
Diffstat (limited to 'tests/aclocal6.test')
-rwxr-xr-x | tests/aclocal6.test | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/tests/aclocal6.test b/tests/aclocal6.test new file mode 100755 index 000000000..c0a150f75 --- /dev/null +++ b/tests/aclocal6.test @@ -0,0 +1,69 @@ +#! /bin/sh +# Copyright (C) 2003 Free Software Foundation, Inc. +# +# This file is part of GNU Automake. +# +# GNU Automake 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. +# +# GNU Automake 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 Automake; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +# Make sure aclocal.m4 is rebuilt whenever a configure +# dependency changes. Test for VPATH too. + +required='GNUmake' +. ./defs || exit 1 + +set -e + +cat >> configure.in << 'END' +SOME_DEFS +AC_CONFIG_FILES([sub/Makefile]) +AC_OUTPUT +END + +cat > Makefile.am << 'END' +SUBDIRS = sub +ACLOCAL_AMFLAGS = -I m4 +END + +mkdir sub +: > sub/Makefile.am + +mkdir m4 +echo 'AC_DEFUN([SOME_DEFS], [])' > m4/somedefs.m4 +echo 'AC_DEFUN([MORE_DEFS], [AC_SUBST([GREPME])])' > m4/moredefs.m4 + +$ACLOCAL -I m4 +$AUTOCONF +$AUTOMAKE --copy --add-missing + +mkdir build +cd build + +../configure +$MAKE + +# Update an aclocal.m4 dependency, then make sure all Makefiles +# are updated, even from a sub-directory. +echo 'AC_DEFUN([SOME_DEFS], [MORE_DEFS])' > ../m4/somedefs.m4 +cd sub +$MAKE +cd .. +grep GREPME Makefile +grep GREPME sub/Makefile + +# Make sure configure dependencies are distributed. +$MAKE distdir +test -f aclocal6-1.0/m4/moredefs.m4 +test -f aclocal6-1.0/m4/somedefs.m4 |