From 8b0a1343d7beb4bf1e3692318670b9f18209fb8a Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sat, 21 Jul 2001 19:34:32 +0000 Subject: [PATCH] * 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. --- ChangeLog | 9 +++++++++ automake.in | 20 ++++++++++++++++++++ tests/Makefile.am | 1 + tests/Makefile.in | 1 + tests/depdist.test | 42 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 73 insertions(+) create mode 100755 tests/depdist.test diff --git a/ChangeLog b/ChangeLog index d7a135f4..e5dab032 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 fc52d420..ffeb2621 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 49271485..92ea1a1c 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 a73a5e60..5699c55f 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 00000000..b658d8bf --- /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 -- 2.43.5