autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sync install-sh, missing, mkinstalldirs from Automake


From: Paul Eggert
Subject: sync install-sh, missing, mkinstalldirs from Automake
Date: Thu, 11 May 2006 12:45:55 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

I installed this, in preparation for cleanups to my changes of
yesterday for mkdir -p.  This patch merely imports fixes from
Automake.

2006-05-11  Paul Eggert  <address@hidden>

        Sync from Automake, as follows:

        2006-05-11  Ralf Wildenhues  <address@hidden>
        * 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'.

Index: config/install-sh
===================================================================
RCS file: /cvsroot/autoconf/autoconf/config/install-sh,v
retrieving revision 1.13
diff -p -u -r1.13 install-sh
--- config/install-sh   10 May 2006 23:05:15 -0000      1.13
+++ config/install-sh   11 May 2006 19:40:10 -0000
@@ -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.
Index: config/missing
===================================================================
RCS file: /cvsroot/autoconf/autoconf/config/missing,v
retrieving revision 1.12
diff -p -u -r1.12 missing
--- config/missing      6 Apr 2006 22:40:55 -0000       1.12
+++ config/missing      11 May 2006 19:40:10 -0000
@@ -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
     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 ne
          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
          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
         \`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
          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
     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
Index: config/mkinstalldirs
===================================================================
RCS file: /cvsroot/autoconf/autoconf/config/mkinstalldirs,v
retrieving revision 1.11
diff -p -u -r1.11 mkinstalldirs
--- config/mkinstalldirs        6 Apr 2006 22:40:55 -0000       1.11
+++ config/mkinstalldirs        11 May 2006 19:40:10 -0000
@@ -1,7 +1,7 @@
 #! /bin/sh
 # mkinstalldirs --- make directory hierarchy
 
-scriptversion=2005-06-29.22
+scriptversion=2006-05-11.19
 
 # Original author: Noah Friedman <address@hidden>
 # Created: 1993-05-16
@@ -11,6 +11,9 @@ scriptversion=2005-06-29.22
 # bugs to <address@hidden> or send patches to
 # <address@hidden>.
 
+nl='
+'
+IFS=" ""       $nl"
 errstatus=0
 dirmode=
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]