From: Tom Tromey Date: Sat, 21 Jul 2001 19:34:32 +0000 (+0000) Subject: * automake.in (handle_dist): Handle case where aux dir doesn't X-Git-Tag: Release-1-4j~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b30c85900c953e7b171562196829568ffb78fd4;p=thirdparty%2Fautomake.git * automake.in (handle_dist): Handle case where aux dir doesn't have a Makefile. Fixes depdist.test. * tests/Makefile.am (XFAIL_TESTS): Removed depdist.test. * tests/depdist.test: Look for config/depcomp. * tests/Makefile.am (TESTS): Added depdist.test. (XFAIL_TESTS): Likewise. * tests/depdist.test: New file. From Eric Magnien. --- diff --git a/ChangeLog b/ChangeLog index d7a135f4e..e5dab0320 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2001-07-21 Tom Tromey + * automake.in (handle_dist): Handle case where aux dir doesn't + have a Makefile. Fixes depdist.test. + * tests/Makefile.am (XFAIL_TESTS): Removed depdist.test. + * tests/depdist.test: Look for config/depcomp. + + * tests/Makefile.am (TESTS): Added depdist.test. + (XFAIL_TESTS): Likewise. + * tests/depdist.test: New file. From Eric Magnien. + * tests/ccnoco.test: Removed `configure.2' test; in autocon 2.50 AC_PROG_CC_C_O does require AC_PROG_CC. diff --git a/automake.in b/automake.in index fc52d420e..ffeb2621f 100755 --- a/automake.in +++ b/automake.in @@ -3275,12 +3275,32 @@ sub handle_dist return if $cygnus_mode; # Look for common files that should be included in distribution. + # If the aux dir is set, and it does not have a Makefile.am, then + # we check for these files there as well. + my $check_aux = 0; + my $auxdir = ''; + if ($relative_dir eq '.' + && $config_aux_dir_set_in_configure_in) + { + ($auxdir = $config_aux_dir) =~ s,^\$\(top_srcdir\)/,,; + if (! &is_make_dir ($auxdir)) + { + $check_aux = 1; + } + } foreach my $cfile (@common_files) { if (-f ($relative_dir . "/" . $cfile)) { &push_dist_common ($cfile); } + + # Don't use `elsif' here because a file might meaningfully + # appear in both directories. + if ($check_aux && -f ($auxdir . '/' . $cfile)) + { + &push_dist_common ($auxdir . '/' . $cfile); + } } # We might copy elements from $configure_dist_common to diff --git a/tests/Makefile.am b/tests/Makefile.am index 492714858..92ea1a1c0 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -99,6 +99,7 @@ depacl.test \ depacl2.test \ depcomp.test \ depcomp2.test \ +depdist.test \ depend.test \ depend2.test \ depend3.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index a73a5e605..5699c55f2 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -165,6 +165,7 @@ depacl.test \ depacl2.test \ depcomp.test \ depcomp2.test \ +depdist.test \ depend.test \ depend2.test \ depend3.test \ diff --git a/tests/depdist.test b/tests/depdist.test new file mode 100755 index 000000000..b658d8bf1 --- /dev/null +++ b/tests/depdist.test @@ -0,0 +1,42 @@ +#! /bin/sh + +# Make sure depcomp is found for the distribution. +# From Eric Magnien. + +. $srcdir/defs || exit 1 + +rm -f configure.in + +mkdir config +for i in *; do + if test $i != "config"; then + mv $i config + fi +done + +cat > configure.in << 'END' +AC_INIT(subdir/foo.c) +AC_CONFIG_AUX_DIR(config) +AM_INIT_AUTOMAKE(nonesuch, nonesuch) +AC_PROG_CC +AC_OUTPUT(subdir/Makefile Makefile) +END + +cat > Makefile.am << 'END' +SUBDIRS = subdir +END + +mkdir subdir +: > subdir/foo.c + +cat > subdir/Makefile.am << 'END' +bin_PROGRAMS = foo +foo_SOURCES = foo.c +END + +set -e + +$ACLOCAL +$AUTOMAKE --add-missing +$AUTOCONF +grep config/depcomp Makefile.in