]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Allow package trees (packages with subpackages) to share
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 19 Mar 2006 05:04:29 +0000 (05:04 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 19 Mar 2006 05:04:29 +0000 (05:04 +0000)
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.

14 files changed:
ChangeLog
Makefile.in
aclocal.m4
configure
doc/Makefile.in
lib/Automake/Makefile.in
lib/Automake/tests/Makefile.in
lib/Makefile.in
lib/am/Makefile.in
lib/am/distdir.am
m4/Makefile.in
tests/Makefile.am
tests/Makefile.in
tests/subpkg3.test [new file with mode: 0755]

index 13d8549003db1c0b953d7a054174cd1839d83e25..0ffb55fce15926bc80ae5405da7b77d49a4f7243 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2006-03-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       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  <adl@gnu.org>
 
        * tests/check5.test, tests/nobast.test: Fix $MAKE and rm
index b42ecbe227fefac7bac1d44e20c4dfe77082c9c5..52ecab320bdfc413e6b284bfefa0ea317fe9bc08 100644 (file)
@@ -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; \
index b7c1190228c462885890bda9cacfdd2d74bf706f..739c7d93751681e187dd89e26d7d6934d4591200 100644 (file)
@@ -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.
index 0b25efaeb83e163f20bd77894963cabb085a652a..6460b1dc950913116e41fb282ca7589e3ce02d1e 100755 (executable)
--- a/configure
+++ b/configure
@@ -5,7 +5,7 @@
 # Report bugs to <bug-automake@gnu.org>.
 #
 # 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 </dev/null 6>&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
index 6f0a24d8e513f993cc89f4bdb7248e03018de513..c931908838971b27eed40c0aef37d3c68eeb5eca 100644 (file)
@@ -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
 
index 866a313fe77f870a827f3e3bbda298dc8dd4071e..0d06b7784ee6a4d223ea41735328d1936afcfd5e 100644 (file)
@@ -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; \
index 6051812f608ab3f91f555e270e68c5fb329a088e..9bae53ddfa85f9dd36a939b8338b5341977141cc 100644 (file)
@@ -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
 
index f0675b5d251b0dfb1c4294a4b2e9c14a033f4105..b888a6cd5f494775afde6b0bd0acb800579d911c 100644 (file)
@@ -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; \
index 143226eae9a1a1af1e438b964001e19bdf8a55f6..6cd8ae3d2065ad2ef1d703cc2dbb3c6e866540d7 100644 (file)
@@ -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.
index a7b96d51dbb0f82342959913dd239a6d15687708..d23fc935905b2bb94230169bb9920f7a1ac19dcf 100644 (file)
@@ -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; \
index b1e1631bc4f3b89c840daa2268e2190b0d9186ab..c3078fdeb90ba5e74405f4bd1a0fa92c1ec9c5e6 100644 (file)
@@ -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.
index 896bae1546570d3b93aaed073fce32c724380e1f..c5f826b2aaeafda8ef3831ffd75939231d450ea6 100644 (file)
@@ -499,6 +499,7 @@ subobj9.test \
 subobjname.test \
 subpkg.test \
 subpkg2.test \
+subpkg3.test \
 subst.test \
 subst2.test \
 substref.test \
index 3b3e9f795375f68b85a627b9cce587165ee95de0..647ad3956fdc49ef6c692118af942332e00919cc 100644 (file)
@@ -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 (executable)
index 0000000..bfc8369
--- /dev/null
@@ -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