From 44c15470763db10dedbd9a13d2a47ac541f7a102 Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Sun, 19 Mar 2006 05:04:26 +0000 Subject: [PATCH] Allow package trees (packages with subpackages) to share common distributed auxiliary files (and directories) that reside within a subpackage. * lib/am/distdir.am (distdir %?TOPDIR_P%): Do not fail if `$(distdir)' already exists. (%?SUBDIRS%): Set `am__remove_distdir' to `:' to prevent removal of subpackage trees for distribution. * tests/subpkg3.test: New test. * tests/Makefile.am: Update. --- ChangeLog | 13 ++ Makefile.in | 3 +- aclocal.m4 | 2 +- configure | 234 +++++++++++++++++++++------------ doc/Makefile.in | 13 +- lib/Automake/Makefile.in | 3 +- lib/Automake/tests/Makefile.in | 9 +- lib/Makefile.in | 3 +- lib/am/Makefile.in | 2 +- lib/am/distdir.am | 6 +- m4/Makefile.in | 2 +- tests/Makefile.am | 1 + tests/Makefile.in | 40 +++--- tests/subpkg3.test | 61 +++++++++ 14 files changed, 269 insertions(+), 123 deletions(-) create mode 100755 tests/subpkg3.test diff --git a/ChangeLog b/ChangeLog index 13d85490..0ffb55fc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2006-03-19 Ralf Wildenhues + + Allow package trees (packages with subpackages) to share + common distributed auxiliary files (and directories) that + reside within a subpackage. + + * lib/am/distdir.am (distdir %?TOPDIR_P%): Do not fail if + `$(distdir)' already exists. + (%?SUBDIRS%): Set `am__remove_distdir' to `:' to prevent + removal of subpackage trees for distribution. + * tests/subpkg3.test: New test. + * tests/Makefile.am: Update. + 2006-03-18 Alexandre Duret-Lutz * tests/check5.test, tests/nobast.test: Fix $MAKE and rm diff --git a/Makefile.in b/Makefile.in index b42ecbe2..52ecab32 100644 --- a/Makefile.in +++ b/Makefile.in @@ -384,7 +384,7 @@ distclean-tags: distdir: $(DISTFILES) $(am__remove_distdir) - mkdir $(distdir) + test -d $(distdir) || mkdir $(distdir) $(mkdir_p) $(distdir)/m4 $(distdir)/tests @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ @@ -423,6 +423,7 @@ distdir: $(DISTFILES) $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ distdir) \ || exit 1; \ fi; \ diff --git a/aclocal.m4 b/aclocal.m4 index b7c11902..739c7d93 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,7 +1,7 @@ # generated automatically by aclocal 1.9a -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005 Free Software Foundation, Inc. +# 2005, 2006 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/configure b/configure index 0b25efae..6460b1dc 100755 --- a/configure +++ b/configure @@ -5,7 +5,7 @@ # Report bugs to . # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## @@ -20,12 +20,11 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -elif (set -o posix) >/dev/null 2>&1; then - set -o posix +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh +DUALCASE=1; export DUALCASE # for MKS sh # PATH needs CR # Avoid depending upon Character Ranges. @@ -56,6 +55,14 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" $as_nl" + # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in @@ -67,6 +74,7 @@ do test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done +IFS=$as_save_IFS ;; esac @@ -122,11 +130,22 @@ $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# CDPATH. +$as_unset CDPATH if test "x$CONFIG_SHELL" = x; then @@ -197,7 +216,7 @@ test \$exitcode = 0) || { (exit 1); exit 1; } else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +for as_dir in /usr/bin/posix$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. @@ -208,6 +227,7 @@ do done esac done +IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do @@ -220,11 +240,9 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -elif (set -o posix) >/dev/null 2>&1; then - set -o posix +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh : _ASEOF @@ -240,11 +258,9 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -elif (set -o posix) >/dev/null 2>&1; then - set -o posix +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh : (as_func_return () { @@ -413,15 +429,15 @@ test \$exitcode = 0") || { /[$]LINENO/= ' <$as_myself | sed ' - s,[$]LINENO.*,&-, + s/[$]LINENO.*/&-/ t lineno b :lineno N :loop - s,[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\),\2\1\2, + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-\n.*,, + s/-\n.*// ' >$as_me.lineno && chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 @@ -499,15 +515,6 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - exec 7<&0 &1 @@ -1060,11 +1067,23 @@ $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. @@ -1248,7 +1267,7 @@ GNU Automake configure 1.9a generated by GNU Autoconf 2.59c Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005 Free Software Foundation, Inc. +2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1297,6 +1316,7 @@ do test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done +IFS=$as_save_IFS } >&5 @@ -1661,6 +1681,7 @@ shift build_cpu=$1 build_vendor=$2 shift; shift +# Remember, the first character of IFS is used to create $*: build_os=$* IFS=$ac_save_IFS @@ -1729,6 +1750,7 @@ case $as_dir/ in ;; esac done +IFS=$as_save_IFS fi @@ -1886,6 +1908,7 @@ do fi done done +IFS=$as_save_IFS fi fi @@ -2020,6 +2043,7 @@ do fi done done +IFS=$as_save_IFS fi fi @@ -2059,6 +2083,7 @@ do fi done done +IFS=$as_save_IFS fi fi @@ -2074,14 +2099,16 @@ fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else - if test "$build" != "$host"; then - { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} - fi +ac_tool_warned=yes ;; +esac STRIP=$ac_ct_STRIP fi else @@ -2148,10 +2175,12 @@ do fi done done +IFS=$as_save_IFS ;; esac fi +PERL=$ac_cv_path_PERL if test -n "$PERL"; then { echo "$as_me:$LINENO: result: $PERL" >&5 echo "${ECHO_T}$PERL" >&6; } @@ -2160,7 +2189,6 @@ else echo "${ECHO_T}no" >&6; } fi -PERL=$ac_cv_path_PERL if test -z "$PERL"; then { { echo "$as_me:$LINENO: error: perl not found" >&5 @@ -2201,6 +2229,7 @@ do fi done done +IFS=$as_save_IFS fi fi @@ -2395,6 +2424,7 @@ esac done done +IFS=$as_save_IFS fi @@ -2476,6 +2506,7 @@ esac done done +IFS=$as_save_IFS fi @@ -2558,6 +2589,7 @@ esac done done +IFS=$as_save_IFS fi @@ -2658,16 +2690,16 @@ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' cat >confdef2opt.sed <<\_ACEOF t clear :clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote d :quote -s,[ `~#$^&*(){}\\|;'"<>?],\\&,g -s,\[,\\&,g -s,\],\\&,g -s,\$,$$,g +s/[ `~#$^&*(){}\\|;'"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g p _ACEOF # We use echo to avoid assuming a particular line-breaking character. @@ -2729,12 +2761,11 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -elif (set -o posix) >/dev/null 2>&1; then - set -o posix +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh +DUALCASE=1; export DUALCASE # for MKS sh # PATH needs CR # Avoid depending upon Character Ranges. @@ -2765,6 +2796,14 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" $as_nl" + # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in @@ -2776,6 +2815,7 @@ do test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done +IFS=$as_save_IFS ;; esac @@ -2831,11 +2871,22 @@ $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# CDPATH. +$as_unset CDPATH @@ -2859,15 +2910,15 @@ echo X/"$0" | /[$]LINENO/= ' <$as_myself | sed ' - s,[$]LINENO.*,&-, + s/[$]LINENO.*/&-/ t lineno b :lineno N :loop - s,[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\),\2\1\2, + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-\n.*,, + s/-\n.*// ' >$as_me.lineno && chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 @@ -2945,15 +2996,6 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - exec 6>&1 # Save the log message, to keep $[0] and so on meaningful, and to @@ -3007,7 +3049,7 @@ GNU Automake config.status 1.9a configured by $0, generated by GNU Autoconf 2.59c, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2005 Free Software Foundation, Inc. +Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -3147,7 +3189,7 @@ $debug || # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d -q "./confXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { @@ -3294,12 +3336,12 @@ _ACEOF # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// }' fi @@ -3375,11 +3417,23 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` { if $as_mkdir_p; then test -d "$ac_dir" || mkdir -p "$ac_dir" else @@ -3394,11 +3448,23 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 diff --git a/doc/Makefile.in b/doc/Makefile.in index 6f0a24d8..c9319088 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -2,7 +2,7 @@ # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -331,10 +331,13 @@ dist-info: $(INFO_DEPS) $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \ esac; \ if test -f $$base; then d=.; else d=$(srcdir); fi; \ - for file in $$d/$$base*; do \ - relfile=`expr "$$file" : "$$d/\(.*\)"`; \ - test -f $(distdir)/$$relfile || \ - cp -p $$file $(distdir)/$$relfile; \ + base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \ + for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \ + if test -f $$file; then \ + relfile=`expr "$$file" : "$$d/\(.*\)"`; \ + test -f $(distdir)/$$relfile || \ + cp -p $$file $(distdir)/$$relfile; \ + else :; fi; \ done; \ done diff --git a/lib/Automake/Makefile.in b/lib/Automake/Makefile.in index 866a313f..0d06b778 100644 --- a/lib/Automake/Makefile.in +++ b/lib/Automake/Makefile.in @@ -2,7 +2,7 @@ # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -427,6 +427,7 @@ distdir: $(DISTFILES) $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ distdir) \ || exit 1; \ fi; \ diff --git a/lib/Automake/tests/Makefile.in b/lib/Automake/tests/Makefile.in index 6051812f..9bae53dd 100644 --- a/lib/Automake/tests/Makefile.in +++ b/lib/Automake/tests/Makefile.in @@ -2,7 +2,7 @@ # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -30,6 +30,7 @@ NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ +TESTS = Condition.pl DisjConditions.pl Version.pl Wrap.pl subdir = lib/Automake/tests DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -131,12 +132,6 @@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TESTS_ENVIRONMENT = $(PERL) -Mstrict -I $(top_srcdir)/lib -w -TESTS = \ -Condition.pl \ -DisjConditions.pl \ -Version.pl \ -Wrap.pl - EXTRA_DIST = $(TESTS) all: all-am diff --git a/lib/Makefile.in b/lib/Makefile.in index f0675b5d..b888a6cd 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -2,7 +2,7 @@ # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -403,6 +403,7 @@ distdir: $(DISTFILES) $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ distdir) \ || exit 1; \ fi; \ diff --git a/lib/am/Makefile.in b/lib/am/Makefile.in index 143226ea..6cd8ae3d 100644 --- a/lib/am/Makefile.in +++ b/lib/am/Makefile.in @@ -2,7 +2,7 @@ # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/lib/am/distdir.am b/lib/am/distdir.am index a7b96d51..d23fc935 100644 --- a/lib/am/distdir.am +++ b/lib/am/distdir.am @@ -51,7 +51,7 @@ endif %?TOPDIR_P% ## if %?TOPDIR_P% $(am__remove_distdir) - mkdir $(distdir) + test -d $(distdir) || mkdir $(distdir) endif %?TOPDIR_P% ## ## @@ -176,6 +176,10 @@ if %?SUBDIRS% $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ + ## Disable am__remove_distdir so that sub-packages do not clear a + ## directory we have already cleared and might even have populated + ## (e.g. shared AUX dir in the sub-package). + am__remove_distdir=: \ distdir) \ || exit 1; \ fi; \ diff --git a/m4/Makefile.in b/m4/Makefile.in index b1e1631b..c3078fde 100644 --- a/m4/Makefile.in +++ b/m4/Makefile.in @@ -2,7 +2,7 @@ # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/tests/Makefile.am b/tests/Makefile.am index 896bae15..c5f826b2 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -499,6 +499,7 @@ subobj9.test \ subobjname.test \ subpkg.test \ subpkg2.test \ +subpkg3.test \ subst.test \ subst2.test \ substref.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 3b3e9f79..647ad395 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -140,26 +140,26 @@ TESTS = aclibobj.test aclocal.test aclocal3.test aclocal4.test \ subcond2.test subcond3.test subobj.test subobj2.test \ subobj3.test subobj4.test subobj5.test subobj6.test \ subobj7.test subobj8.test subobj9.test subobjname.test \ - subpkg.test subpkg2.test subst.test subst2.test substref.test \ - substre2.test substtarg.test suffix.test suffix2.test \ - suffix3.test suffix4.test suffix5.test suffix6.test \ - suffix7.test suffix8.test suffix9.test suffix10.test \ - suffix11.test symlink.test symlink2.test symlink3.test \ - syntax.test tags.test tagsub.test tar.test tar2.test tar3.test \ - target-cflags.test targetclash.test txinfo.test txinfo2.test \ - txinfo3.test txinfo4.test txinfo5.test txinfo6.test \ - txinfo7.test txinfo8.test txinfo9.test txinfo10.test \ - txinfo13.test txinfo16.test txinfo17.test txinfo18.test \ - txinfo19.test txinfo20.test txinfo21.test txinfo22.test \ - txinfo23.test txinfo24.test txinfo25.test txinfo26.test \ - txinfo27.test txinfo28.test txinfo29.test txinfo30.test \ - transform.test unused.test vars.test vars3.test vartar.test \ - version.test version2.test version3.test version4.test \ - version6.test version7.test version8.test vpath.test \ - vtexi.test vtexi2.test warnopts.test werror.test werror2.test \ - whoami.test xsource.test yacc.test yacc2.test yacc3.test \ - yacc4.test yacc5.test yacc6.test yacc7.test yacc8.test \ - yaccpp.test yaccvpath.test + subpkg.test subpkg2.test subpkg3.test subst.test subst2.test \ + substref.test substre2.test substtarg.test suffix.test \ + suffix2.test suffix3.test suffix4.test suffix5.test \ + suffix6.test suffix7.test suffix8.test suffix9.test \ + suffix10.test suffix11.test symlink.test symlink2.test \ + symlink3.test syntax.test tags.test tagsub.test tar.test \ + tar2.test tar3.test target-cflags.test targetclash.test \ + txinfo.test txinfo2.test txinfo3.test txinfo4.test \ + txinfo5.test txinfo6.test txinfo7.test txinfo8.test \ + txinfo9.test txinfo10.test txinfo13.test txinfo16.test \ + txinfo17.test txinfo18.test txinfo19.test txinfo20.test \ + txinfo21.test txinfo22.test txinfo23.test txinfo24.test \ + txinfo25.test txinfo26.test txinfo27.test txinfo28.test \ + txinfo29.test txinfo30.test transform.test unused.test \ + vars.test vars3.test vartar.test version.test version2.test \ + version3.test version4.test version6.test version7.test \ + version8.test vpath.test vtexi.test vtexi2.test warnopts.test \ + werror.test werror2.test whoami.test xsource.test yacc.test \ + yacc2.test yacc3.test yacc4.test yacc5.test yacc6.test \ + yacc7.test yacc8.test yaccpp.test yaccvpath.test subdir = tests DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/aclocal.in $(srcdir)/automake.in $(srcdir)/defs.in diff --git a/tests/subpkg3.test b/tests/subpkg3.test new file mode 100755 index 00000000..bfc83690 --- /dev/null +++ b/tests/subpkg3.test @@ -0,0 +1,61 @@ +#! /bin/sh +# Copyright (C) 2006 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., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. + +# make sure different subpackages may share files and directories. + +. ./defs || exit 1 + +set -e + +cat >Makefile.am <<'END' +SUBDIRS = subpkg +EXTRA_DIST = subpkg/foobar +END + +cat >>configure.in <<'END' +AC_CONFIG_SUBDIRS([subpkg]) +AC_OUTPUT +END + +mkdir subpkg + +echo foobar >subpkg/foobar + +echo SUBDIRS = >subpkg/Makefile.am + +cat >subpkg/configure.in <<'END' +AC_INIT([subpkg], [1.0]) +AM_INIT_AUTOMAKE +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT +END + +$ACLOCAL +$AUTOMAKE +$AUTOCONF + +cd subpkg +$ACLOCAL +$AUTOMAKE +$AUTOCONF +cd .. + +./configure +$MAKE distcheck -- 2.43.5