From f634f812122775769f5be70f7d3b5fe32fba2e1d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 11 May 2006 19:43:58 +0000 Subject: [PATCH] Sync from Automake, as follows: 2006-05-11 Ralf Wildenhues * config/install-sh: Initialize IFS, so field splitting isn't turned off later. * config/mkinstalldirs: Likewise. * config/missing: Remove superfluous quotes. Replace all uses of `[' by `test', for consistency, and for.. * config/missing (sed_minuso, sed_output): New variables. (autom4te, help2man, makeinfo): Use them. Unifies detection of `-o FILE', `--output FILE', `--output=FILE', stricter regex. Fixes `missing' to detect `--output' for help2man. Fixes PR automake/483. Report by Dennis J. Linse. (autom4te): Document in `missing --help'. --- ChangeLog | 25 +++++++++++++++++---- config/install-sh | 6 ++++- config/missing | 52 +++++++++++++++++++++++--------------------- config/mkinstalldirs | 5 ++++- 4 files changed, 57 insertions(+), 31 deletions(-) diff --git a/ChangeLog b/ChangeLog index f2af1022..da4a5b45 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,12 +1,29 @@ +2006-05-11 Paul Eggert + + Sync from Automake, as follows: + + 2006-05-11 Ralf Wildenhues + * config/install-sh: Initialize IFS, so field splitting isn't + turned off later. + * config/mkinstalldirs: Likewise. + * config/missing: Remove superfluous quotes. Replace all uses of + `[' by `test', for consistency, and for.. + * config/missing (sed_minuso, sed_output): New variables. + (autom4te, help2man, makeinfo): Use them. Unifies detection of + `-o FILE', `--output FILE', `--output=FILE', stricter regex. + Fixes `missing' to detect `--output' for help2man. Fixes + PR automake/483. Report by Dennis J. Linse. + (autom4te): Document in `missing --help'. + 2006-05-10 Paul Eggert - * NEWS: New macro AC_PROG__MKDIR_P. AS_MKDIR_P is now more robust. + * NEWS: New macro AC_PROG_MKDIR_P. AS_MKDIR_P is now more robust. * config/install-sh: Don't use 'path' to talk about file names, as per GNU coding standards. Close a race condition reported by Ralf Wildenhues and Stepan Kasal. There is still a race condition - on hosts that predate POSIX 1003.1-1992, but we can't help this. - Don't mishandle weird characters like space on pre-POSIX hosts. - Invoke mkdir at most once per dir arg on pre-POSIX hosts. + on hosts that predate Posix 1003.1-1992, but we can't help this. + Don't mishandle weird characters like space on pre-Posix hosts. + Invoke mkdir at most once per dir arg on pre-Posix hosts. * doc/autoconf.texi (Programming in M4sh): Cross-reference to AC_PROG_MKDIR_P from AS_MKDIR_P. (Limitations of Usual Tools): Cross-reference to AC_PROG_MKDIR_P diff --git a/config/install-sh b/config/install-sh index db8cee16..13c9c4fc 100755 --- a/config/install-sh +++ b/config/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2006-05-10.12 +scriptversion=2006-05-11.12 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -42,6 +42,10 @@ scriptversion=2006-05-10.12 # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. +nl=' +' +IFS=" "" $nl" + # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. diff --git a/config/missing b/config/missing index c82c8b56..1c8ff704 100755 --- a/config/missing +++ b/config/missing @@ -1,7 +1,7 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -scriptversion=2006-01-12.21 +scriptversion=2006-05-10.23 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. @@ -33,6 +33,8 @@ if test $# -eq 0; then fi run=: +sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' +sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. @@ -44,7 +46,7 @@ fi msg="missing on your system" -case "$1" in +case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= @@ -77,6 +79,7 @@ Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' + autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c @@ -106,7 +109,7 @@ esac # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). -case "$1" in +case $1 in lex|yacc) # Not GNU programs, they don't have --version. ;; @@ -135,7 +138,7 @@ esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. -case "$1" in +case $1 in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if @@ -164,7 +167,7 @@ WARNING: \`$1' is $msg. You should only need it if test -z "$files" && files="config.h" touch_files= for f in $files; do - case "$f" in + case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; @@ -192,8 +195,8 @@ WARNING: \`$1' is needed, but is $msg. You can get \`$1' as part of \`Autoconf' from any GNU archive site." - file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` - test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else @@ -214,25 +217,25 @@ WARNING: \`$1' $msg. You should only need it if in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h - if [ $# -ne 1 ]; then + if test $# -ne 1; then eval LASTARG="\${$#}" - case "$LASTARG" in + case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if [ -f "$SRCFILE" ]; then + if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if [ -f "$SRCFILE" ]; then + if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi - if [ ! -f y.tab.h ]; then + if test ! -f y.tab.h; then echo >y.tab.h fi - if [ ! -f y.tab.c ]; then + if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; @@ -244,18 +247,18 @@ WARNING: \`$1' is $msg. You should only need it if in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c - if [ $# -ne 1 ]; then + if test $# -ne 1; then eval LASTARG="\${$#}" - case "$LASTARG" in + case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if [ -f "$SRCFILE" ]; then + if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi - if [ ! -f lex.yy.c ]; then + if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; @@ -267,11 +270,9 @@ WARNING: \`$1' is $msg. You should only need it if \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` - fi - if [ -f "$file" ]; then + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then touch $file else test -z "$file" || exec >$file @@ -289,7 +290,8 @@ WARNING: \`$1' is $msg. You should only need it if DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` @@ -322,13 +324,13 @@ WARNING: \`$1' is $msg. You should only need it if fi firstarg="$1" if shift; then - case "$firstarg" in + case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac - case "$firstarg" in + case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 diff --git a/config/mkinstalldirs b/config/mkinstalldirs index 259dbfcd..ef7e16fd 100755 --- a/config/mkinstalldirs +++ b/config/mkinstalldirs @@ -1,7 +1,7 @@ #! /bin/sh # mkinstalldirs --- make directory hierarchy -scriptversion=2005-06-29.22 +scriptversion=2006-05-11.19 # Original author: Noah Friedman # Created: 1993-05-16 @@ -11,6 +11,9 @@ scriptversion=2005-06-29.22 # bugs to or send patches to # . +nl=' +' +IFS=" "" $nl" errstatus=0 dirmode=