From: Tom Tromey Date: Fri, 10 Dec 1999 07:49:32 +0000 (+0000) Subject: * automake.in (initialize_global_constants): If unreadable by X-Git-Tag: Release-1-4b~163 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=1873eca33a806d71cef5b3c99ca14d67a04f9b38;p=automake.git * automake.in (initialize_global_constants): If unreadable by owner, make it readable by owner regardless of number of links. Fixes more of install2.test. * missing: Try to see if gnutar or gtar exist before invoking them. * m4/missing.m4 (AM_MISSING_INSTALL_SH): Remove ${SHELL} from install_sh value. Look for install-sh and install.sh in a somewhat more sensible way. Fixes test install2.test. Partially from Jim Meyering. --- diff --git a/ChangeLog b/ChangeLog index ca86795d..fcc09d67 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +1999-12-10 Tom Tromey + + * automake.in (initialize_global_constants): If unreadable by + owner, make it readable by owner regardless of number of links. + Fixes more of install2.test. + + * missing: Try to see if gnutar or gtar exist before invoking + them. + + * m4/missing.m4 (AM_MISSING_INSTALL_SH): Remove ${SHELL} from + install_sh value. Look for install-sh and install.sh in a + somewhat more sensible way. Fixes test install2.test. Partially + from Jim Meyering. + 1999-12-09 Pavel Roskin * m4/missing.m4: remove redundant backquote diff --git a/automake.in b/automake.in index 8136ba8d..934cb49d 100755 --- a/automake.in +++ b/automake.in @@ -6606,8 +6606,12 @@ sub initialize_global_constants # extract them. # Ignore return result from chmod, because it might give an error # if we chmod a symlink. + # Another nastiness: if the file is unreadable by us, we make it + # readable regardless of the number of links to it. This only + # happens in perverse cases. $dist_header = ' -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \\ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \\ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \\ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \\ || chmod -R a+r $(distdir) '; diff --git a/lib/missing b/lib/missing index b965c144..c60e9d77 100755 --- a/lib/missing +++ b/lib/missing @@ -197,9 +197,15 @@ WARNING: \`$1' is missing on your system. You should only need it if exit 1 fi - # we have already tried tar in the generic part - gnutar ${1+"$@"} && exit 0 - gtar ${1+"$@"} && exit 0 + # We have already tried tar in the generic part. + # Look for gnutar/gtar before invocation to avoid ugly error + # messages. + if (gnutar --version > /dev/null 2>&1); then + gnutar ${1+"$@"} && exit 0 + fi + if (gtar --version > /dev/null 2>&1); then + gtar ${1+"$@"} && exit 0 + fi firstarg="$1" if shift; then case "$firstarg" in diff --git a/m4/missing.m4 b/m4/missing.m4 index 5daa7944..02cfc8ab 100644 --- a/m4/missing.m4 +++ b/m4/missing.m4 @@ -12,8 +12,12 @@ dnl AM_MISSING_INSTALL_SH() AC_DEFUN(AM_MISSING_INSTALL_SH, [ AC_REQUIRE([AM_MISSING_HAS_RUN]) if test -z "$install_sh"; then - install_sh="${am_missing_run}install-sh" - test -f "$install_sh" || install_sh="${am_missing_run}install.sh" + install_sh="$ac_aux_dir/install-sh" + test -f "$install_sh" || install_sh="$ac_aux_dir/install.sh" + test -f "$install_sh" || install_sh="${am_missing_run}${ac_auxdir}/install-sh" + dnl FIXME: an evil hack: we remove the SHELL invocation from + dnl install_sh because automake adds it back in. Sigh. + install_sh="`echo $install_sh | sed -e 's/\${SHELL}//'`" fi AC_SUBST(install_sh)]) diff --git a/missing b/missing index b965c144..c60e9d77 100755 --- a/missing +++ b/missing @@ -197,9 +197,15 @@ WARNING: \`$1' is missing on your system. You should only need it if exit 1 fi - # we have already tried tar in the generic part - gnutar ${1+"$@"} && exit 0 - gtar ${1+"$@"} && exit 0 + # We have already tried tar in the generic part. + # Look for gnutar/gtar before invocation to avoid ugly error + # messages. + if (gnutar --version > /dev/null 2>&1); then + gnutar ${1+"$@"} && exit 0 + fi + if (gtar --version > /dev/null 2>&1); then + gtar ${1+"$@"} && exit 0 + fi firstarg="$1" if shift; then case "$firstarg" in