From: Akim Demaille Date: Mon, 10 Jul 2000 14:03:12 +0000 (+0000) Subject: Alexandre's suggestions. X-Git-Tag: autoconf-2.50~733 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=609835a22fd0ecd8ff37d32874a80b6773ec400f;p=thirdparty%2Fautoconf.git Alexandre's suggestions. * autoreconf.sh (update.sh): Use `ls -1dt' instead of `-lt'. Use test instead of sed. : If automake is used, always run it: it has its own mechanism not to update if unneeded. --- diff --git a/ChangeLog b/ChangeLog index cf7445f1a..061a8f8e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2000-07-10 Akim Demaille + + Alexandre's suggestions. + + * autoreconf.sh (update.sh): Use `ls -1dt' instead of `-lt'. + Use test instead of sed. + : If automake is used, always run it: it has its own + mechanism not to update if unneeded. + 2000-07-10 Akim Demaille * acspecific.m4 (_AC_PROG_ECHO): Modernize. diff --git a/autoreconf.in b/autoreconf.in index 6b862db4a..f2cf832f9 100644 --- a/autoreconf.in +++ b/autoreconf.in @@ -251,14 +251,9 @@ EOF # update.sh -- # Exit 0 iff the first argument is not the most recent of all or is missing. -# FIXME: Why do we need -l? Dropping it would allow using fgrep. cat >$tmp/update.sh <<\EOF test -f "$1" || exit 0 -ls -lt "$@" | - sed 1q | - # This is not exact: we should be quoting the `.' etc. in $1. - grep "$1$" >/dev/null 2>&1 || exit 0 -exit 1 +test x`ls -1dt "$@" | sed 1q` != x"$1" EOF update="@SHELL@ $tmp/update.sh" @@ -316,8 +311,10 @@ while read dir; do uses_automake=false test -f "Makefile.am" && uses_automake=: - if $uses_automake && - { $force || $install || $update Makefile.in Makefile.am; } then + # We should always run automake, and let it decide whether it shall + # update the file or not. In fact, the effect of `$force' is already + # included in `$automake' via `--no-force'. + if $uses_automake; then $verbose running $automake in $dir >&2 $automake fi diff --git a/autoreconf.sh b/autoreconf.sh index 6b862db4a..f2cf832f9 100644 --- a/autoreconf.sh +++ b/autoreconf.sh @@ -251,14 +251,9 @@ EOF # update.sh -- # Exit 0 iff the first argument is not the most recent of all or is missing. -# FIXME: Why do we need -l? Dropping it would allow using fgrep. cat >$tmp/update.sh <<\EOF test -f "$1" || exit 0 -ls -lt "$@" | - sed 1q | - # This is not exact: we should be quoting the `.' etc. in $1. - grep "$1$" >/dev/null 2>&1 || exit 0 -exit 1 +test x`ls -1dt "$@" | sed 1q` != x"$1" EOF update="@SHELL@ $tmp/update.sh" @@ -316,8 +311,10 @@ while read dir; do uses_automake=false test -f "Makefile.am" && uses_automake=: - if $uses_automake && - { $force || $install || $update Makefile.in Makefile.am; } then + # We should always run automake, and let it decide whether it shall + # update the file or not. In fact, the effect of `$force' is already + # included in `$automake' via `--no-force'. + if $uses_automake; then $verbose running $automake in $dir >&2 $automake fi diff --git a/bin/autoreconf.in b/bin/autoreconf.in index 6b862db4a..f2cf832f9 100644 --- a/bin/autoreconf.in +++ b/bin/autoreconf.in @@ -251,14 +251,9 @@ EOF # update.sh -- # Exit 0 iff the first argument is not the most recent of all or is missing. -# FIXME: Why do we need -l? Dropping it would allow using fgrep. cat >$tmp/update.sh <<\EOF test -f "$1" || exit 0 -ls -lt "$@" | - sed 1q | - # This is not exact: we should be quoting the `.' etc. in $1. - grep "$1$" >/dev/null 2>&1 || exit 0 -exit 1 +test x`ls -1dt "$@" | sed 1q` != x"$1" EOF update="@SHELL@ $tmp/update.sh" @@ -316,8 +311,10 @@ while read dir; do uses_automake=false test -f "Makefile.am" && uses_automake=: - if $uses_automake && - { $force || $install || $update Makefile.in Makefile.am; } then + # We should always run automake, and let it decide whether it shall + # update the file or not. In fact, the effect of `$force' is already + # included in `$automake' via `--no-force'. + if $uses_automake; then $verbose running $automake in $dir >&2 $automake fi diff --git a/doc/make-stds.texi b/doc/make-stds.texi index f935158a5..8824e4f55 100644 --- a/doc/make-stds.texi +++ b/doc/make-stds.texi @@ -140,7 +140,7 @@ installation should not use any utilities directly except these: @c dd find @c gunzip gzip md5sum -@c mkfifo mknod tee uname +@c mkfifo mknod tee uname @example cat cmp cp diff echo egrep expr false grep install-info