|
|
5de29b |
# commit 9e54314bb06aace405553552f7e7b7d8c172968c
|
|
|
5de29b |
# Author: Joseph Myers <joseph@codesourcery.com>
|
|
|
5de29b |
# Date: Thu Jun 6 19:02:09 2013 +0000
|
|
|
5de29b |
#
|
|
|
5de29b |
# Update miscellaneous scripts from upstream.
|
|
|
5de29b |
#
|
|
|
12745e |
diff -urN glibc-2.17-c758a686/scripts/config.guess glibc-2.17-c758a686/scripts/config.guess
|
|
|
12745e |
--- glibc-2.17-c758a686/scripts/config.guess 2014-05-26 15:59:45.000000000 -0500
|
|
|
12745e |
+++ glibc-2.17-c758a686/scripts/config.guess 2014-05-26 16:01:00.000000000 -0500
|
|
|
5de29b |
@@ -1,14 +1,12 @@
|
|
|
5de29b |
#! /bin/sh
|
|
|
5de29b |
# Attempt to guess a canonical system name.
|
|
|
5de29b |
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
|
|
5de29b |
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
|
|
5de29b |
-# 2011, 2012 Free Software Foundation, Inc.
|
|
|
5de29b |
+# Copyright 1992-2013 Free Software Foundation, Inc.
|
|
|
5de29b |
|
|
|
5de29b |
-timestamp='2012-09-25'
|
|
|
5de29b |
+timestamp='2013-11-29'
|
|
|
5de29b |
|
|
|
5de29b |
# This file is free software; you can redistribute it and/or modify it
|
|
|
5de29b |
# under the terms of the GNU General Public License as published by
|
|
|
5de29b |
-# the Free Software Foundation; either version 2 of the License, or
|
|
|
5de29b |
+# the Free Software Foundation; either version 3 of the License, or
|
|
|
5de29b |
# (at your option) any later version.
|
|
|
5de29b |
#
|
|
|
5de29b |
# This program is distributed in the hope that it will be useful, but
|
|
|
5de29b |
@@ -22,19 +20,17 @@
|
|
|
5de29b |
# As a special exception to the GNU General Public License, if you
|
|
|
5de29b |
# distribute this file as part of a program that contains a
|
|
|
5de29b |
# configuration script generated by Autoconf, you may include it under
|
|
|
5de29b |
-# the same distribution terms that you use for the rest of that program.
|
|
|
5de29b |
-
|
|
|
5de29b |
-
|
|
|
5de29b |
-# Originally written by Per Bothner. Please send patches (context
|
|
|
5de29b |
-# diff format) to <config-patches@gnu.org> and include a ChangeLog
|
|
|
5de29b |
-# entry.
|
|
|
5de29b |
+# the same distribution terms that you use for the rest of that
|
|
|
5de29b |
+# program. This Exception is an additional permission under section 7
|
|
|
5de29b |
+# of the GNU General Public License, version 3 ("GPLv3").
|
|
|
5de29b |
#
|
|
|
5de29b |
-# This script attempts to guess a canonical system name similar to
|
|
|
5de29b |
-# config.sub. If it succeeds, it prints the system name on stdout, and
|
|
|
5de29b |
-# exits with 0. Otherwise, it exits with 1.
|
|
|
5de29b |
+# Originally written by Per Bothner.
|
|
|
5de29b |
#
|
|
|
5de29b |
# You can get the latest version of this script from:
|
|
|
5de29b |
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
|
|
|
5de29b |
+#
|
|
|
5de29b |
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
|
|
|
5de29b |
+
|
|
|
5de29b |
|
|
|
5de29b |
me=`echo "$0" | sed -e 's,.*/,,'`
|
|
|
5de29b |
|
|
|
5de29b |
@@ -54,9 +50,7 @@
|
|
|
5de29b |
GNU config.guess ($timestamp)
|
|
|
5de29b |
|
|
|
5de29b |
Originally written by Per Bothner.
|
|
|
5de29b |
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
|
|
5de29b |
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
|
|
5de29b |
-Free Software Foundation, Inc.
|
|
|
5de29b |
+Copyright 1992-2013 Free Software Foundation, Inc.
|
|
|
5de29b |
|
|
|
5de29b |
This is free software; see the source for copying conditions. There is NO
|
|
|
5de29b |
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
|
|
5de29b |
@@ -138,6 +132,27 @@
|
|
|
5de29b |
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
|
|
|
5de29b |
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
|
|
|
5de29b |
|
|
|
5de29b |
+case "${UNAME_SYSTEM}" in
|
|
|
5de29b |
+Linux|GNU|GNU/*)
|
|
|
5de29b |
+ # If the system lacks a compiler, then just pick glibc.
|
|
|
5de29b |
+ # We could probably try harder.
|
|
|
5de29b |
+ LIBC=gnu
|
|
|
5de29b |
+
|
|
|
5de29b |
+ eval $set_cc_for_build
|
|
|
5de29b |
+ cat <<-EOF > $dummy.c
|
|
|
5de29b |
+ #include <features.h>
|
|
|
5de29b |
+ #if defined(__UCLIBC__)
|
|
|
5de29b |
+ LIBC=uclibc
|
|
|
5de29b |
+ #elif defined(__dietlibc__)
|
|
|
5de29b |
+ LIBC=dietlibc
|
|
|
5de29b |
+ #else
|
|
|
5de29b |
+ LIBC=gnu
|
|
|
5de29b |
+ #endif
|
|
|
5de29b |
+ EOF
|
|
|
5de29b |
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
|
|
|
5de29b |
+ ;;
|
|
|
5de29b |
+esac
|
|
|
5de29b |
+
|
|
|
5de29b |
# Note: order is significant - the case branches are not exclusive.
|
|
|
5de29b |
|
|
|
5de29b |
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|
|
5de29b |
@@ -859,21 +874,21 @@
|
|
|
5de29b |
exit ;;
|
|
|
5de29b |
*:GNU:*:*)
|
|
|
5de29b |
# the GNU system
|
|
|
5de29b |
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
|
|
|
5de29b |
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
|
|
|
5de29b |
exit ;;
|
|
|
5de29b |
*:GNU/*:*:*)
|
|
|
5de29b |
# other systems with GNU libc and userland
|
|
|
5de29b |
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
|
|
|
5de29b |
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
|
|
|
5de29b |
exit ;;
|
|
|
5de29b |
i*86:Minix:*:*)
|
|
|
5de29b |
echo ${UNAME_MACHINE}-pc-minix
|
|
|
5de29b |
exit ;;
|
|
|
5de29b |
aarch64:Linux:*:*)
|
|
|
5de29b |
- echo ${UNAME_MACHINE}-unknown-linux-gnu
|
|
|
5de29b |
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
|
|
5de29b |
exit ;;
|
|
|
5de29b |
aarch64_be:Linux:*:*)
|
|
|
5de29b |
UNAME_MACHINE=aarch64_be
|
|
|
5de29b |
- echo ${UNAME_MACHINE}-unknown-linux-gnu
|
|
|
5de29b |
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
|
|
5de29b |
exit ;;
|
|
|
5de29b |
alpha:Linux:*:*)
|
|
|
5de29b |
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
|
|
|
5de29b |
@@ -886,59 +901,54 @@
|
|
|
5de29b |
EV68*) UNAME_MACHINE=alphaev68 ;;
|
|
|
5de29b |
esac
|
|
|
5de29b |
objdump --private-headers /bin/sh | grep -q ld.so.1
|
|
|
5de29b |
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
|
|
|
5de29b |
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
|
|
|
5de29b |
+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
|
|
|
5de29b |
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
|
|
5de29b |
+ exit ;;
|
|
|
5de29b |
+ arc:Linux:*:* | arceb:Linux:*:*)
|
|
|
5de29b |
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
|
|
5de29b |
exit ;;
|
|
|
5de29b |
arm*:Linux:*:*)
|
|
|
5de29b |
eval $set_cc_for_build
|
|
|
5de29b |
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
|
|
5de29b |
| grep -q __ARM_EABI__
|
|
|
5de29b |
then
|
|
|
5de29b |
- echo ${UNAME_MACHINE}-unknown-linux-gnu
|
|
|
5de29b |
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
|
|
5de29b |
else
|
|
|
5de29b |
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
|
|
|
5de29b |
| grep -q __ARM_PCS_VFP
|
|
|
5de29b |
then
|
|
|
5de29b |
- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
|
|
|
5de29b |
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
|
|
|
5de29b |
else
|
|
|
5de29b |
- echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
|
|
|
5de29b |
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
|
|
|
5de29b |
fi
|
|
|
5de29b |
fi
|
|
|
5de29b |
exit ;;
|
|
|
5de29b |
avr32*:Linux:*:*)
|
|
|
5de29b |
- echo ${UNAME_MACHINE}-unknown-linux-gnu
|
|
|
5de29b |
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
|
|
5de29b |
exit ;;
|
|
|
5de29b |
cris:Linux:*:*)
|
|
|
5de29b |
- echo ${UNAME_MACHINE}-axis-linux-gnu
|
|
|
5de29b |
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
|
|
|
5de29b |
exit ;;
|
|
|
5de29b |
crisv32:Linux:*:*)
|
|
|
5de29b |
- echo ${UNAME_MACHINE}-axis-linux-gnu
|
|
|
5de29b |
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
|
|
|
5de29b |
exit ;;
|
|
|
5de29b |
frv:Linux:*:*)
|
|
|
5de29b |
- echo ${UNAME_MACHINE}-unknown-linux-gnu
|
|
|
5de29b |
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
|
|
5de29b |
exit ;;
|
|
|
5de29b |
hexagon:Linux:*:*)
|
|
|
5de29b |
- echo ${UNAME_MACHINE}-unknown-linux-gnu
|
|
|
5de29b |
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
|
|
5de29b |
exit ;;
|
|
|
5de29b |
i*86:Linux:*:*)
|
|
|
5de29b |
- LIBC=gnu
|
|
|
5de29b |
- eval $set_cc_for_build
|
|
|
5de29b |
- sed 's/^ //' << EOF >$dummy.c
|
|
|
5de29b |
- #ifdef __dietlibc__
|
|
|
5de29b |
- LIBC=dietlibc
|
|
|
5de29b |
- #endif
|
|
|
5de29b |
-EOF
|
|
|
5de29b |
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
|
|
|
5de29b |
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
|
|
|
5de29b |
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
|
|
|
5de29b |
exit ;;
|
|
|
5de29b |
ia64:Linux:*:*)
|
|
|
5de29b |
- echo ${UNAME_MACHINE}-unknown-linux-gnu
|
|
|
5de29b |
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
|
|
5de29b |
exit ;;
|
|
|
5de29b |
m32r*:Linux:*:*)
|
|
|
5de29b |
- echo ${UNAME_MACHINE}-unknown-linux-gnu
|
|
|
5de29b |
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
|
|
5de29b |
exit ;;
|
|
|
5de29b |
m68*:Linux:*:*)
|
|
|
5de29b |
- echo ${UNAME_MACHINE}-unknown-linux-gnu
|
|
|
5de29b |
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
|
|
5de29b |
exit ;;
|
|
|
5de29b |
mips:Linux:*:* | mips64:Linux:*:*)
|
|
|
5de29b |
eval $set_cc_for_build
|
|
|
5de29b |
@@ -957,54 +967,63 @@
|
|
|
5de29b |
#endif
|
|
|
5de29b |
EOF
|
|
|
5de29b |
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
|
|
|
5de29b |
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
|
|
|
5de29b |
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
|
|
|
5de29b |
;;
|
|
|
5de29b |
+ or1k:Linux:*:*)
|
|
|
5de29b |
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
|
|
5de29b |
+ exit ;;
|
|
|
5de29b |
or32:Linux:*:*)
|
|
|
5de29b |
- echo ${UNAME_MACHINE}-unknown-linux-gnu
|
|
|
5de29b |
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
|
|
5de29b |
exit ;;
|
|
|
5de29b |
padre:Linux:*:*)
|
|
|
5de29b |
- echo sparc-unknown-linux-gnu
|
|
|
5de29b |
+ echo sparc-unknown-linux-${LIBC}
|
|
|
5de29b |
exit ;;
|
|
|
5de29b |
parisc64:Linux:*:* | hppa64:Linux:*:*)
|
|
|
5de29b |
- echo hppa64-unknown-linux-gnu
|
|
|
5de29b |
+ echo hppa64-unknown-linux-${LIBC}
|
|
|
5de29b |
exit ;;
|
|
|
5de29b |
parisc:Linux:*:* | hppa:Linux:*:*)
|
|
|
5de29b |
# Look for CPU level
|
|
|
5de29b |
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
|
|
|
5de29b |
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
|
|
|
5de29b |
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
|
|
|
5de29b |
- *) echo hppa-unknown-linux-gnu ;;
|
|
|
5de29b |
+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
|
|
|
5de29b |
+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
|
|
|
5de29b |
+ *) echo hppa-unknown-linux-${LIBC} ;;
|
|
|
5de29b |
esac
|
|
|
5de29b |
exit ;;
|
|
|
5de29b |
ppc64:Linux:*:*)
|
|
|
5de29b |
- echo powerpc64-unknown-linux-gnu
|
|
|
5de29b |
+ echo powerpc64-unknown-linux-${LIBC}
|
|
|
5de29b |
exit ;;
|
|
|
5de29b |
ppc:Linux:*:*)
|
|
|
5de29b |
- echo powerpc-unknown-linux-gnu
|
|
|
5de29b |
+ echo powerpc-unknown-linux-${LIBC}
|
|
|
5de29b |
+ exit ;;
|
|
|
5de29b |
+ ppc64le:Linux:*:*)
|
|
|
5de29b |
+ echo powerpc64le-unknown-linux-${LIBC}
|
|
|
5de29b |
+ exit ;;
|
|
|
5de29b |
+ ppcle:Linux:*:*)
|
|
|
5de29b |
+ echo powerpcle-unknown-linux-${LIBC}
|
|
|
5de29b |
exit ;;
|
|
|
5de29b |
s390:Linux:*:* | s390x:Linux:*:*)
|
|
|
5de29b |
- echo ${UNAME_MACHINE}-ibm-linux
|
|
|
5de29b |
+ echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
|
|
|
5de29b |
exit ;;
|
|
|
5de29b |
sh64*:Linux:*:*)
|
|
|
5de29b |
- echo ${UNAME_MACHINE}-unknown-linux-gnu
|
|
|
5de29b |
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
|
|
5de29b |
exit ;;
|
|
|
5de29b |
sh*:Linux:*:*)
|
|
|
5de29b |
- echo ${UNAME_MACHINE}-unknown-linux-gnu
|
|
|
5de29b |
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
|
|
5de29b |
exit ;;
|
|
|
5de29b |
sparc:Linux:*:* | sparc64:Linux:*:*)
|
|
|
5de29b |
- echo ${UNAME_MACHINE}-unknown-linux-gnu
|
|
|
5de29b |
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
|
|
5de29b |
exit ;;
|
|
|
5de29b |
tile*:Linux:*:*)
|
|
|
5de29b |
- echo ${UNAME_MACHINE}-unknown-linux-gnu
|
|
|
5de29b |
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
|
|
5de29b |
exit ;;
|
|
|
5de29b |
vax:Linux:*:*)
|
|
|
5de29b |
- echo ${UNAME_MACHINE}-dec-linux-gnu
|
|
|
5de29b |
+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
|
|
|
5de29b |
exit ;;
|
|
|
5de29b |
x86_64:Linux:*:*)
|
|
|
5de29b |
- echo ${UNAME_MACHINE}-unknown-linux-gnu
|
|
|
5de29b |
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
|
|
5de29b |
exit ;;
|
|
|
5de29b |
xtensa*:Linux:*:*)
|
|
|
5de29b |
- echo ${UNAME_MACHINE}-unknown-linux-gnu
|
|
|
5de29b |
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
|
|
5de29b |
exit ;;
|
|
|
5de29b |
i*86:DYNIX/ptx:4*:*)
|
|
|
5de29b |
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
|
|
|
5de29b |
@@ -1237,19 +1256,31 @@
|
|
|
5de29b |
exit ;;
|
|
|
5de29b |
*:Darwin:*:*)
|
|
|
5de29b |
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
|
|
|
5de29b |
- case $UNAME_PROCESSOR in
|
|
|
5de29b |
- i386)
|
|
|
5de29b |
- eval $set_cc_for_build
|
|
|
5de29b |
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
|
|
|
5de29b |
- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
|
|
|
5de29b |
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
|
|
|
5de29b |
- grep IS_64BIT_ARCH >/dev/null
|
|
|
5de29b |
- then
|
|
|
5de29b |
- UNAME_PROCESSOR="x86_64"
|
|
|
5de29b |
- fi
|
|
|
5de29b |
- fi ;;
|
|
|
5de29b |
- unknown) UNAME_PROCESSOR=powerpc ;;
|
|
|
5de29b |
- esac
|
|
|
5de29b |
+ eval $set_cc_for_build
|
|
|
5de29b |
+ if test "$UNAME_PROCESSOR" = unknown ; then
|
|
|
5de29b |
+ UNAME_PROCESSOR=powerpc
|
|
|
5de29b |
+ fi
|
|
|
5de29b |
+ if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
|
|
|
5de29b |
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
|
|
|
5de29b |
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
|
|
|
5de29b |
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
|
|
|
5de29b |
+ grep IS_64BIT_ARCH >/dev/null
|
|
|
5de29b |
+ then
|
|
|
5de29b |
+ case $UNAME_PROCESSOR in
|
|
|
5de29b |
+ i386) UNAME_PROCESSOR=x86_64 ;;
|
|
|
5de29b |
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
|
|
|
5de29b |
+ esac
|
|
|
5de29b |
+ fi
|
|
|
5de29b |
+ fi
|
|
|
5de29b |
+ elif test "$UNAME_PROCESSOR" = i386 ; then
|
|
|
5de29b |
+ # Avoid executing cc on OS X 10.9, as it ships with a stub
|
|
|
5de29b |
+ # that puts up a graphical alert prompting to install
|
|
|
5de29b |
+ # developer tools. Any system running Mac OS X 10.7 or
|
|
|
5de29b |
+ # later (Darwin 11 and later) is required to have a 64-bit
|
|
|
5de29b |
+ # processor. This is not true of the ARM version of Darwin
|
|
|
5de29b |
+ # that Apple uses in portable devices.
|
|
|
5de29b |
+ UNAME_PROCESSOR=x86_64
|
|
|
5de29b |
+ fi
|
|
|
5de29b |
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
|
|
|
5de29b |
exit ;;
|
|
|
5de29b |
*:procnto*:*:* | *:QNX:[0123456789]*:*)
|
|
|
12745e |
diff -urN glibc-2.17-c758a686/scripts/config.sub glibc-2.17-c758a686/scripts/config.sub
|
|
|
12745e |
--- glibc-2.17-c758a686/scripts/config.sub 2014-05-26 15:59:45.000000000 -0500
|
|
|
12745e |
+++ glibc-2.17-c758a686/scripts/config.sub 2014-05-26 16:00:52.000000000 -0500
|
|
|
5de29b |
@@ -1,24 +1,18 @@
|
|
|
5de29b |
#! /bin/sh
|
|
|
5de29b |
# Configuration validation subroutine script.
|
|
|
5de29b |
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
|
|
5de29b |
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
|
|
5de29b |
-# 2011, 2012 Free Software Foundation, Inc.
|
|
|
5de29b |
-
|
|
|
5de29b |
-timestamp='2012-08-18'
|
|
|
5de29b |
-
|
|
|
5de29b |
-# This file is (in principle) common to ALL GNU software.
|
|
|
5de29b |
-# The presence of a machine in this file suggests that SOME GNU software
|
|
|
5de29b |
-# can handle that machine. It does not imply ALL GNU software can.
|
|
|
5de29b |
-#
|
|
|
5de29b |
-# This file is free software; you can redistribute it and/or modify
|
|
|
5de29b |
-# it under the terms of the GNU General Public License as published by
|
|
|
5de29b |
-# the Free Software Foundation; either version 2 of the License, or
|
|
|
5de29b |
+# Copyright 1992-2013 Free Software Foundation, Inc.
|
|
|
5de29b |
+
|
|
|
5de29b |
+timestamp='2013-10-01'
|
|
|
5de29b |
+
|
|
|
5de29b |
+# This file is free software; you can redistribute it and/or modify it
|
|
|
5de29b |
+# under the terms of the GNU General Public License as published by
|
|
|
5de29b |
+# the Free Software Foundation; either version 3 of the License, or
|
|
|
5de29b |
# (at your option) any later version.
|
|
|
5de29b |
#
|
|
|
5de29b |
-# This program is distributed in the hope that it will be useful,
|
|
|
5de29b |
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
5de29b |
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
5de29b |
-# GNU General Public License for more details.
|
|
|
5de29b |
+# This program is distributed in the hope that it will be useful, but
|
|
|
5de29b |
+# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
5de29b |
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
5de29b |
+# General Public License for more details.
|
|
|
5de29b |
#
|
|
|
5de29b |
# You should have received a copy of the GNU General Public License
|
|
|
5de29b |
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
|
|
5de29b |
@@ -26,11 +20,12 @@
|
|
|
5de29b |
# As a special exception to the GNU General Public License, if you
|
|
|
5de29b |
# distribute this file as part of a program that contains a
|
|
|
5de29b |
# configuration script generated by Autoconf, you may include it under
|
|
|
5de29b |
-# the same distribution terms that you use for the rest of that program.
|
|
|
5de29b |
+# the same distribution terms that you use for the rest of that
|
|
|
5de29b |
+# program. This Exception is an additional permission under section 7
|
|
|
5de29b |
+# of the GNU General Public License, version 3 ("GPLv3").
|
|
|
5de29b |
|
|
|
5de29b |
|
|
|
5de29b |
-# Please send patches to <config-patches@gnu.org>. Submit a context
|
|
|
5de29b |
-# diff and a properly formatted GNU ChangeLog entry.
|
|
|
5de29b |
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
|
|
|
5de29b |
#
|
|
|
5de29b |
# Configuration subroutine to validate and canonicalize a configuration type.
|
|
|
5de29b |
# Supply the specified configuration type as an argument.
|
|
|
5de29b |
@@ -73,9 +68,7 @@
|
|
|
5de29b |
version="\
|
|
|
5de29b |
GNU config.sub ($timestamp)
|
|
|
5de29b |
|
|
|
5de29b |
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
|
|
5de29b |
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
|
|
5de29b |
-Free Software Foundation, Inc.
|
|
|
5de29b |
+Copyright 1992-2013 Free Software Foundation, Inc.
|
|
|
5de29b |
|
|
|
5de29b |
This is free software; see the source for copying conditions. There is NO
|
|
|
5de29b |
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
|
|
5de29b |
@@ -156,7 +149,7 @@
|
|
|
5de29b |
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
|
|
|
5de29b |
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
|
|
|
5de29b |
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
|
|
|
5de29b |
- -apple | -axis | -knuth | -cray | -microblaze)
|
|
|
5de29b |
+ -apple | -axis | -knuth | -cray | -microblaze*)
|
|
|
5de29b |
os=
|
|
|
5de29b |
basic_machine=$1
|
|
|
5de29b |
;;
|
|
|
5de29b |
@@ -259,10 +252,12 @@
|
|
|
5de29b |
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
|
|
|
5de29b |
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
|
|
|
5de29b |
| am33_2.0 \
|
|
|
5de29b |
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
|
|
|
5de29b |
- | be32 | be64 \
|
|
|
5de29b |
+ | arc | arceb \
|
|
|
5de29b |
+ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
|
|
|
5de29b |
+ | avr | avr32 \
|
|
|
5de29b |
+ | be32 | be64 \
|
|
|
5de29b |
| bfin \
|
|
|
5de29b |
- | c4x | clipper \
|
|
|
5de29b |
+ | c4x | c8051 | clipper \
|
|
|
5de29b |
| d10v | d30v | dlx | dsp16xx \
|
|
|
5de29b |
| epiphany \
|
|
|
5de29b |
| fido | fr30 | frv \
|
|
|
5de29b |
@@ -270,10 +265,11 @@
|
|
|
5de29b |
| hexagon \
|
|
|
5de29b |
| i370 | i860 | i960 | ia64 \
|
|
|
5de29b |
| ip2k | iq2000 \
|
|
|
5de29b |
+ | k1om \
|
|
|
5de29b |
| le32 | le64 \
|
|
|
5de29b |
| lm32 \
|
|
|
5de29b |
| m32c | m32r | m32rle | m68000 | m68k | m88k \
|
|
|
5de29b |
- | maxq | mb | microblaze | mcore | mep | metag \
|
|
|
5de29b |
+ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
|
|
|
5de29b |
| mips | mipsbe | mipseb | mipsel | mipsle \
|
|
|
5de29b |
| mips16 \
|
|
|
5de29b |
| mips64 | mips64el \
|
|
|
5de29b |
@@ -291,16 +287,17 @@
|
|
|
5de29b |
| mipsisa64r2 | mipsisa64r2el \
|
|
|
5de29b |
| mipsisa64sb1 | mipsisa64sb1el \
|
|
|
5de29b |
| mipsisa64sr71k | mipsisa64sr71kel \
|
|
|
5de29b |
+ | mipsr5900 | mipsr5900el \
|
|
|
5de29b |
| mipstx39 | mipstx39el \
|
|
|
5de29b |
| mn10200 | mn10300 \
|
|
|
5de29b |
| moxie \
|
|
|
5de29b |
| mt \
|
|
|
5de29b |
| msp430 \
|
|
|
5de29b |
| nds32 | nds32le | nds32be \
|
|
|
5de29b |
- | nios | nios2 \
|
|
|
5de29b |
+ | nios | nios2 | nios2eb | nios2el \
|
|
|
5de29b |
| ns16k | ns32k \
|
|
|
5de29b |
| open8 \
|
|
|
5de29b |
- | or32 \
|
|
|
5de29b |
+ | or1k | or32 \
|
|
|
5de29b |
| pdp10 | pdp11 | pj | pjl \
|
|
|
5de29b |
| powerpc | powerpc64 | powerpc64le | powerpcle \
|
|
|
5de29b |
| pyramid \
|
|
|
5de29b |
@@ -328,7 +325,7 @@
|
|
|
5de29b |
c6x)
|
|
|
5de29b |
basic_machine=tic6x-unknown
|
|
|
5de29b |
;;
|
|
|
5de29b |
- m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
|
|
|
5de29b |
+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
|
|
|
5de29b |
basic_machine=$basic_machine-unknown
|
|
|
5de29b |
os=-none
|
|
|
5de29b |
;;
|
|
|
5de29b |
@@ -370,13 +367,13 @@
|
|
|
5de29b |
| aarch64-* | aarch64_be-* \
|
|
|
5de29b |
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
|
|
|
5de29b |
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
|
|
|
5de29b |
- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
|
|
|
5de29b |
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
|
|
|
5de29b |
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
|
|
|
5de29b |
| avr-* | avr32-* \
|
|
|
5de29b |
| be32-* | be64-* \
|
|
|
5de29b |
| bfin-* | bs2000-* \
|
|
|
5de29b |
| c[123]* | c30-* | [cjt]90-* | c4x-* \
|
|
|
5de29b |
- | clipper-* | craynv-* | cydra-* \
|
|
|
5de29b |
+ | c8051-* | clipper-* | craynv-* | cydra-* \
|
|
|
5de29b |
| d10v-* | d30v-* | dlx-* \
|
|
|
5de29b |
| elxsi-* \
|
|
|
5de29b |
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
|
|
|
5de29b |
@@ -385,11 +382,13 @@
|
|
|
5de29b |
| hexagon-* \
|
|
|
5de29b |
| i*86-* | i860-* | i960-* | ia64-* \
|
|
|
5de29b |
| ip2k-* | iq2000-* \
|
|
|
5de29b |
+ | k1om-* \
|
|
|
5de29b |
| le32-* | le64-* \
|
|
|
5de29b |
| lm32-* \
|
|
|
5de29b |
| m32c-* | m32r-* | m32rle-* \
|
|
|
5de29b |
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
|
|
|
5de29b |
- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
|
|
|
5de29b |
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
|
|
|
5de29b |
+ | microblaze-* | microblazeel-* \
|
|
|
5de29b |
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
|
|
|
5de29b |
| mips16-* \
|
|
|
5de29b |
| mips64-* | mips64el-* \
|
|
|
5de29b |
@@ -407,12 +406,13 @@
|
|
|
5de29b |
| mipsisa64r2-* | mipsisa64r2el-* \
|
|
|
5de29b |
| mipsisa64sb1-* | mipsisa64sb1el-* \
|
|
|
5de29b |
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
|
|
|
5de29b |
+ | mipsr5900-* | mipsr5900el-* \
|
|
|
5de29b |
| mipstx39-* | mipstx39el-* \
|
|
|
5de29b |
| mmix-* \
|
|
|
5de29b |
| mt-* \
|
|
|
5de29b |
| msp430-* \
|
|
|
5de29b |
| nds32-* | nds32le-* | nds32be-* \
|
|
|
5de29b |
- | nios-* | nios2-* \
|
|
|
5de29b |
+ | nios-* | nios2-* | nios2eb-* | nios2el-* \
|
|
|
5de29b |
| none-* | np1-* | ns16k-* | ns32k-* \
|
|
|
5de29b |
| open8-* \
|
|
|
5de29b |
| orion-* \
|
|
|
5de29b |
@@ -788,7 +788,7 @@
|
|
|
5de29b |
basic_machine=ns32k-utek
|
|
|
5de29b |
os=-sysv
|
|
|
5de29b |
;;
|
|
|
5de29b |
- microblaze)
|
|
|
5de29b |
+ microblaze*)
|
|
|
5de29b |
basic_machine=microblaze-xilinx
|
|
|
5de29b |
;;
|
|
|
5de29b |
mingw64)
|
|
|
5de29b |
@@ -796,7 +796,7 @@
|
|
|
5de29b |
os=-mingw64
|
|
|
5de29b |
;;
|
|
|
5de29b |
mingw32)
|
|
|
5de29b |
- basic_machine=i386-pc
|
|
|
5de29b |
+ basic_machine=i686-pc
|
|
|
5de29b |
os=-mingw32
|
|
|
5de29b |
;;
|
|
|
5de29b |
mingw32ce)
|
|
|
5de29b |
@@ -832,7 +832,7 @@
|
|
|
5de29b |
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
|
|
|
5de29b |
;;
|
|
|
5de29b |
msys)
|
|
|
5de29b |
- basic_machine=i386-pc
|
|
|
5de29b |
+ basic_machine=i686-pc
|
|
|
5de29b |
os=-msys
|
|
|
5de29b |
;;
|
|
|
5de29b |
mvs)
|
|
|
5de29b |
@@ -1023,7 +1023,11 @@
|
|
|
5de29b |
basic_machine=i586-unknown
|
|
|
5de29b |
os=-pw32
|
|
|
5de29b |
;;
|
|
|
5de29b |
- rdos)
|
|
|
5de29b |
+ rdos | rdos64)
|
|
|
5de29b |
+ basic_machine=x86_64-pc
|
|
|
5de29b |
+ os=-rdos
|
|
|
5de29b |
+ ;;
|
|
|
5de29b |
+ rdos32)
|
|
|
5de29b |
basic_machine=i386-pc
|
|
|
5de29b |
os=-rdos
|
|
|
5de29b |
;;
|
|
|
5de29b |
@@ -1350,7 +1354,7 @@
|
|
|
5de29b |
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
|
|
|
5de29b |
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
|
|
|
5de29b |
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
|
|
|
5de29b |
- | -sym* | -kopensolaris* \
|
|
|
5de29b |
+ | -sym* | -kopensolaris* | -plan9* \
|
|
|
5de29b |
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
|
|
|
5de29b |
| -aos* | -aros* \
|
|
|
5de29b |
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
|
|
5de29b |
@@ -1496,9 +1500,6 @@
|
|
|
5de29b |
-aros*)
|
|
|
5de29b |
os=-aros
|
|
|
5de29b |
;;
|
|
|
5de29b |
- -kaos*)
|
|
|
5de29b |
- os=-kaos
|
|
|
5de29b |
- ;;
|
|
|
5de29b |
-zvmoe)
|
|
|
5de29b |
os=-zvmoe
|
|
|
5de29b |
;;
|
|
|
5de29b |
@@ -1547,6 +1548,9 @@
|
|
|
5de29b |
c4x-* | tic4x-*)
|
|
|
5de29b |
os=-coff
|
|
|
5de29b |
;;
|
|
|
5de29b |
+ c8051-*)
|
|
|
5de29b |
+ os=-elf
|
|
|
5de29b |
+ ;;
|
|
|
5de29b |
hexagon-*)
|
|
|
5de29b |
os=-elf
|
|
|
5de29b |
;;
|
|
|
5de29b |
@@ -1590,6 +1594,9 @@
|
|
|
5de29b |
mips*-*)
|
|
|
5de29b |
os=-elf
|
|
|
5de29b |
;;
|
|
|
5de29b |
+ or1k-*)
|
|
|
5de29b |
+ os=-elf
|
|
|
5de29b |
+ ;;
|
|
|
5de29b |
or32-*)
|
|
|
5de29b |
os=-coff
|
|
|
5de29b |
;;
|
|
|
12745e |
diff -urN glibc-2.17-c758a686/scripts/install-sh glibc-2.17-c758a686/scripts/install-sh
|
|
|
12745e |
--- glibc-2.17-c758a686/scripts/install-sh 2014-05-26 15:59:45.000000000 -0500
|
|
|
12745e |
+++ glibc-2.17-c758a686/scripts/install-sh 2014-05-26 16:00:34.000000000 -0500
|
|
|
5de29b |
@@ -1,250 +1,527 @@
|
|
|
5de29b |
-#! /bin/sh
|
|
|
5de29b |
-#
|
|
|
5de29b |
+#!/bin/sh
|
|
|
5de29b |
# install - install a program, script, or datafile
|
|
|
5de29b |
-# This comes from X11R5 (mit/util/scripts/install.sh).
|
|
|
5de29b |
+
|
|
|
5de29b |
+scriptversion=2011-11-20.07; # UTC
|
|
|
5de29b |
+
|
|
|
5de29b |
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
|
|
5de29b |
+# later released in X11R6 (xc/config/util/install.sh) with the
|
|
|
5de29b |
+# following copyright and license.
|
|
|
5de29b |
+#
|
|
|
5de29b |
+# Copyright (C) 1994 X Consortium
|
|
|
5de29b |
+#
|
|
|
5de29b |
+# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
5de29b |
+# of this software and associated documentation files (the "Software"), to
|
|
|
5de29b |
+# deal in the Software without restriction, including without limitation the
|
|
|
5de29b |
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
|
5de29b |
+# sell copies of the Software, and to permit persons to whom the Software is
|
|
|
5de29b |
+# furnished to do so, subject to the following conditions:
|
|
|
5de29b |
+#
|
|
|
5de29b |
+# The above copyright notice and this permission notice shall be included in
|
|
|
5de29b |
+# all copies or substantial portions of the Software.
|
|
|
5de29b |
+#
|
|
|
5de29b |
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
5de29b |
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
5de29b |
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
5de29b |
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
|
|
5de29b |
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
|
|
5de29b |
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
5de29b |
+#
|
|
|
5de29b |
+# Except as contained in this notice, the name of the X Consortium shall not
|
|
|
5de29b |
+# be used in advertising or otherwise to promote the sale, use or other deal-
|
|
|
5de29b |
+# ings in this Software without prior written authorization from the X Consor-
|
|
|
5de29b |
+# tium.
|
|
|
5de29b |
#
|
|
|
5de29b |
-# Copyright 1991 by the Massachusetts Institute of Technology
|
|
|
5de29b |
#
|
|
|
5de29b |
-# Permission to use, copy, modify, distribute, and sell this software and its
|
|
|
5de29b |
-# documentation for any purpose is hereby granted without fee, provided that
|
|
|
5de29b |
-# the above copyright notice appear in all copies and that both that
|
|
|
5de29b |
-# copyright notice and this permission notice appear in supporting
|
|
|
5de29b |
-# documentation, and that the name of M.I.T. not be used in advertising or
|
|
|
5de29b |
-# publicity pertaining to distribution of the software without specific,
|
|
|
5de29b |
-# written prior permission. M.I.T. makes no representations about the
|
|
|
5de29b |
-# suitability of this software for any purpose. It is provided "as is"
|
|
|
5de29b |
-# without express or implied warranty.
|
|
|
5de29b |
+# FSF changes to this file are in the public domain.
|
|
|
5de29b |
#
|
|
|
5de29b |
# Calling this script install-sh is preferred over install.sh, to prevent
|
|
|
5de29b |
-# `make' implicit rules from creating a file called install from it
|
|
|
5de29b |
+# 'make' implicit rules from creating a file called install from it
|
|
|
5de29b |
# when there is no Makefile.
|
|
|
5de29b |
#
|
|
|
5de29b |
# This script is compatible with the BSD install script, but was written
|
|
|
5de29b |
-# from scratch. It can only install one file at a time, a restriction
|
|
|
5de29b |
-# shared with many OS's install programs.
|
|
|
5de29b |
+# from scratch.
|
|
|
5de29b |
|
|
|
5de29b |
+nl='
|
|
|
5de29b |
+'
|
|
|
5de29b |
+IFS=" "" $nl"
|
|
|
5de29b |
|
|
|
5de29b |
# set DOITPROG to echo to test this script
|
|
|
5de29b |
|
|
|
5de29b |
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
|
|
5de29b |
-doit="${DOITPROG-}"
|
|
|
5de29b |
-
|
|
|
5de29b |
-
|
|
|
5de29b |
-# put in absolute paths if you don't have them in your path; or use env. vars.
|
|
|
5de29b |
-
|
|
|
5de29b |
-mvprog="${MVPROG-mv}"
|
|
|
5de29b |
-cpprog="${CPPROG-cp}"
|
|
|
5de29b |
-chmodprog="${CHMODPROG-chmod}"
|
|
|
5de29b |
-chownprog="${CHOWNPROG-chown}"
|
|
|
5de29b |
-chgrpprog="${CHGRPPROG-chgrp}"
|
|
|
5de29b |
-stripprog="${STRIPPROG-strip}"
|
|
|
5de29b |
-rmprog="${RMPROG-rm}"
|
|
|
5de29b |
-mkdirprog="${MKDIRPROG-mkdir}"
|
|
|
5de29b |
-
|
|
|
5de29b |
-transformbasename=""
|
|
|
5de29b |
-transform_arg=""
|
|
|
5de29b |
-instcmd="$mvprog"
|
|
|
5de29b |
-chmodcmd="$chmodprog 0755"
|
|
|
5de29b |
-chowncmd=""
|
|
|
5de29b |
-chgrpcmd=""
|
|
|
5de29b |
-stripcmd=""
|
|
|
5de29b |
-rmcmd="$rmprog -f"
|
|
|
5de29b |
-mvcmd="$mvprog"
|
|
|
5de29b |
-src=""
|
|
|
5de29b |
-dst=""
|
|
|
5de29b |
-dir_arg=""
|
|
|
5de29b |
-
|
|
|
5de29b |
-while [ x"$1" != x ]; do
|
|
|
5de29b |
- case $1 in
|
|
|
5de29b |
- -c) instcmd="$cpprog"
|
|
|
5de29b |
- shift
|
|
|
5de29b |
- continue;;
|
|
|
5de29b |
-
|
|
|
5de29b |
- -d) dir_arg=true
|
|
|
5de29b |
- shift
|
|
|
5de29b |
- continue;;
|
|
|
5de29b |
-
|
|
|
5de29b |
- -m) chmodcmd="$chmodprog $2"
|
|
|
5de29b |
- shift
|
|
|
5de29b |
- shift
|
|
|
5de29b |
- continue;;
|
|
|
5de29b |
-
|
|
|
5de29b |
- -o) chowncmd="$chownprog $2"
|
|
|
5de29b |
- shift
|
|
|
5de29b |
- shift
|
|
|
5de29b |
- continue;;
|
|
|
5de29b |
-
|
|
|
5de29b |
- -g) chgrpcmd="$chgrpprog $2"
|
|
|
5de29b |
- shift
|
|
|
5de29b |
- shift
|
|
|
5de29b |
- continue;;
|
|
|
5de29b |
-
|
|
|
5de29b |
- -s) stripcmd="$stripprog"
|
|
|
5de29b |
- shift
|
|
|
5de29b |
- continue;;
|
|
|
5de29b |
-
|
|
|
5de29b |
- -t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
|
|
5de29b |
- shift
|
|
|
5de29b |
- continue;;
|
|
|
5de29b |
-
|
|
|
5de29b |
- -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
|
|
5de29b |
- shift
|
|
|
5de29b |
- continue;;
|
|
|
5de29b |
-
|
|
|
5de29b |
- *) if [ x"$src" = x ]
|
|
|
5de29b |
- then
|
|
|
5de29b |
- src=$1
|
|
|
5de29b |
- else
|
|
|
5de29b |
- # this colon is to work around a 386BSD /bin/sh bug
|
|
|
5de29b |
- :
|
|
|
5de29b |
- dst=$1
|
|
|
5de29b |
- fi
|
|
|
5de29b |
- shift
|
|
|
5de29b |
- continue;;
|
|
|
5de29b |
- esac
|
|
|
5de29b |
-done
|
|
|
5de29b |
-
|
|
|
5de29b |
-if [ x"$src" = x ]
|
|
|
5de29b |
-then
|
|
|
5de29b |
- echo "install: no input file specified"
|
|
|
5de29b |
- exit 1
|
|
|
5de29b |
+doit=${DOITPROG-}
|
|
|
5de29b |
+if test -z "$doit"; then
|
|
|
5de29b |
+ doit_exec=exec
|
|
|
5de29b |
else
|
|
|
5de29b |
- true
|
|
|
5de29b |
+ doit_exec=$doit
|
|
|
5de29b |
fi
|
|
|
5de29b |
|
|
|
5de29b |
-if [ x"$dir_arg" != x ]; then
|
|
|
5de29b |
- dst=$src
|
|
|
5de29b |
- src=""
|
|
|
5de29b |
-
|
|
|
5de29b |
- if [ -d $dst ]; then
|
|
|
5de29b |
- instcmd=:
|
|
|
5de29b |
- else
|
|
|
5de29b |
- instcmd=mkdir
|
|
|
5de29b |
- fi
|
|
|
5de29b |
-else
|
|
|
5de29b |
+# Put in absolute file names if you don't have them in your path;
|
|
|
5de29b |
+# or use environment vars.
|
|
|
5de29b |
|
|
|
5de29b |
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
|
|
5de29b |
-# might cause directories to be created, which would be especially bad
|
|
|
5de29b |
-# if $src (and thus $dsttmp) contains '*'.
|
|
|
5de29b |
-
|
|
|
5de29b |
- if [ -f $src -o -d $src ]
|
|
|
5de29b |
- then
|
|
|
5de29b |
- true
|
|
|
5de29b |
- else
|
|
|
5de29b |
- echo "install: $src does not exist"
|
|
|
5de29b |
- exit 1
|
|
|
5de29b |
- fi
|
|
|
5de29b |
-
|
|
|
5de29b |
- if [ x"$dst" = x ]
|
|
|
5de29b |
- then
|
|
|
5de29b |
- echo "install: no destination specified"
|
|
|
5de29b |
- exit 1
|
|
|
5de29b |
- else
|
|
|
5de29b |
- true
|
|
|
5de29b |
- fi
|
|
|
5de29b |
-
|
|
|
5de29b |
-# If destination is a directory, append the input filename; if your system
|
|
|
5de29b |
-# does not like double slashes in filenames, you may need to add some logic
|
|
|
5de29b |
-
|
|
|
5de29b |
- if [ -d $dst ]
|
|
|
5de29b |
- then
|
|
|
5de29b |
- dst="$dst"/`basename $src`
|
|
|
5de29b |
- else
|
|
|
5de29b |
- true
|
|
|
5de29b |
- fi
|
|
|
5de29b |
-fi
|
|
|
5de29b |
-
|
|
|
5de29b |
-## this sed command emulates the dirname command
|
|
|
5de29b |
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
|
|
5de29b |
+chgrpprog=${CHGRPPROG-chgrp}
|
|
|
5de29b |
+chmodprog=${CHMODPROG-chmod}
|
|
|
5de29b |
+chownprog=${CHOWNPROG-chown}
|
|
|
5de29b |
+cmpprog=${CMPPROG-cmp}
|
|
|
5de29b |
+cpprog=${CPPROG-cp}
|
|
|
5de29b |
+mkdirprog=${MKDIRPROG-mkdir}
|
|
|
5de29b |
+mvprog=${MVPROG-mv}
|
|
|
5de29b |
+rmprog=${RMPROG-rm}
|
|
|
5de29b |
+stripprog=${STRIPPROG-strip}
|
|
|
5de29b |
+
|
|
|
5de29b |
+posix_glob='?'
|
|
|
5de29b |
+initialize_posix_glob='
|
|
|
5de29b |
+ test "$posix_glob" != "?" || {
|
|
|
5de29b |
+ if (set -f) 2>/dev/null; then
|
|
|
5de29b |
+ posix_glob=
|
|
|
5de29b |
+ else
|
|
|
5de29b |
+ posix_glob=:
|
|
|
5de29b |
+ fi
|
|
|
5de29b |
+ }
|
|
|
5de29b |
+'
|
|
|
5de29b |
|
|
|
5de29b |
-# Make sure that the destination directory exists.
|
|
|
5de29b |
-# this part is taken from Noah Friedman's mkinstalldirs script
|
|
|
5de29b |
+posix_mkdir=
|
|
|
5de29b |
|
|
|
5de29b |
-# Skip lots of stat calls in the usual case.
|
|
|
5de29b |
-if [ ! -d "$dstdir" ]; then
|
|
|
5de29b |
-defaultIFS='
|
|
|
5de29b |
-'
|
|
|
5de29b |
-IFS="${IFS-${defaultIFS}}"
|
|
|
5de29b |
+# Desired mode of installed file.
|
|
|
5de29b |
+mode=0755
|
|
|
5de29b |
|
|
|
5de29b |
-oIFS="${IFS}"
|
|
|
5de29b |
-# Some sh's can't handle IFS=/ for some reason.
|
|
|
5de29b |
-IFS='%'
|
|
|
5de29b |
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
|
|
|
5de29b |
-IFS="${oIFS}"
|
|
|
5de29b |
-
|
|
|
5de29b |
-pathcomp=''
|
|
|
5de29b |
-
|
|
|
5de29b |
-while [ $# -ne 0 ] ; do
|
|
|
5de29b |
- pathcomp="${pathcomp}${1}"
|
|
|
5de29b |
- shift
|
|
|
5de29b |
-
|
|
|
5de29b |
- if [ ! -d "${pathcomp}" ] ;
|
|
|
5de29b |
- then
|
|
|
5de29b |
- $mkdirprog "${pathcomp}"
|
|
|
5de29b |
- else
|
|
|
5de29b |
- true
|
|
|
5de29b |
- fi
|
|
|
5de29b |
+chgrpcmd=
|
|
|
5de29b |
+chmodcmd=$chmodprog
|
|
|
5de29b |
+chowncmd=
|
|
|
5de29b |
+mvcmd=$mvprog
|
|
|
5de29b |
+rmcmd="$rmprog -f"
|
|
|
5de29b |
+stripcmd=
|
|
|
5de29b |
|
|
|
5de29b |
- pathcomp="${pathcomp}/"
|
|
|
5de29b |
+src=
|
|
|
5de29b |
+dst=
|
|
|
5de29b |
+dir_arg=
|
|
|
5de29b |
+dst_arg=
|
|
|
5de29b |
+
|
|
|
5de29b |
+copy_on_change=false
|
|
|
5de29b |
+no_target_directory=
|
|
|
5de29b |
+
|
|
|
5de29b |
+usage="\
|
|
|
5de29b |
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
|
|
5de29b |
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
|
|
|
5de29b |
+ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
|
|
5de29b |
+ or: $0 [OPTION]... -d DIRECTORIES...
|
|
|
5de29b |
+
|
|
|
5de29b |
+In the 1st form, copy SRCFILE to DSTFILE.
|
|
|
5de29b |
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
|
|
5de29b |
+In the 4th, create DIRECTORIES.
|
|
|
5de29b |
+
|
|
|
5de29b |
+Options:
|
|
|
5de29b |
+ --help display this help and exit.
|
|
|
5de29b |
+ --version display version info and exit.
|
|
|
5de29b |
+
|
|
|
5de29b |
+ -c (ignored)
|
|
|
5de29b |
+ -C install only if different (preserve the last data modification time)
|
|
|
5de29b |
+ -d create directories instead of installing files.
|
|
|
5de29b |
+ -g GROUP $chgrpprog installed files to GROUP.
|
|
|
5de29b |
+ -m MODE $chmodprog installed files to MODE.
|
|
|
5de29b |
+ -o USER $chownprog installed files to USER.
|
|
|
5de29b |
+ -s $stripprog installed files.
|
|
|
5de29b |
+ -t DIRECTORY install into DIRECTORY.
|
|
|
5de29b |
+ -T report an error if DSTFILE is a directory.
|
|
|
5de29b |
+
|
|
|
5de29b |
+Environment variables override the default commands:
|
|
|
5de29b |
+ CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
|
|
5de29b |
+ RMPROG STRIPPROG
|
|
|
5de29b |
+"
|
|
|
5de29b |
+
|
|
|
5de29b |
+while test $# -ne 0; do
|
|
|
5de29b |
+ case $1 in
|
|
|
5de29b |
+ -c) ;;
|
|
|
5de29b |
+
|
|
|
5de29b |
+ -C) copy_on_change=true;;
|
|
|
5de29b |
+
|
|
|
5de29b |
+ -d) dir_arg=true;;
|
|
|
5de29b |
+
|
|
|
5de29b |
+ -g) chgrpcmd="$chgrpprog $2"
|
|
|
5de29b |
+ shift;;
|
|
|
5de29b |
+
|
|
|
5de29b |
+ --help) echo "$usage"; exit $?;;
|
|
|
5de29b |
+
|
|
|
5de29b |
+ -m) mode=$2
|
|
|
5de29b |
+ case $mode in
|
|
|
5de29b |
+ *' '* | *' '* | *'
|
|
|
5de29b |
+'* | *'*'* | *'?'* | *'['*)
|
|
|
5de29b |
+ echo "$0: invalid mode: $mode" >&2
|
|
|
5de29b |
+ exit 1;;
|
|
|
5de29b |
+ esac
|
|
|
5de29b |
+ shift;;
|
|
|
5de29b |
+
|
|
|
5de29b |
+ -o) chowncmd="$chownprog $2"
|
|
|
5de29b |
+ shift;;
|
|
|
5de29b |
+
|
|
|
5de29b |
+ -s) stripcmd=$stripprog;;
|
|
|
5de29b |
+
|
|
|
5de29b |
+ -t) dst_arg=$2
|
|
|
5de29b |
+ # Protect names problematic for 'test' and other utilities.
|
|
|
5de29b |
+ case $dst_arg in
|
|
|
5de29b |
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
|
|
|
5de29b |
+ esac
|
|
|
5de29b |
+ shift;;
|
|
|
5de29b |
+
|
|
|
5de29b |
+ -T) no_target_directory=true;;
|
|
|
5de29b |
+
|
|
|
5de29b |
+ --version) echo "$0 $scriptversion"; exit $?;;
|
|
|
5de29b |
+
|
|
|
5de29b |
+ --) shift
|
|
|
5de29b |
+ break;;
|
|
|
5de29b |
+
|
|
|
5de29b |
+ -*) echo "$0: invalid option: $1" >&2
|
|
|
5de29b |
+ exit 1;;
|
|
|
5de29b |
+
|
|
|
5de29b |
+ *) break;;
|
|
|
5de29b |
+ esac
|
|
|
5de29b |
+ shift
|
|
|
5de29b |
done
|
|
|
5de29b |
+
|
|
|
5de29b |
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
|
|
5de29b |
+ # When -d is used, all remaining arguments are directories to create.
|
|
|
5de29b |
+ # When -t is used, the destination is already specified.
|
|
|
5de29b |
+ # Otherwise, the last argument is the destination. Remove it from $@.
|
|
|
5de29b |
+ for arg
|
|
|
5de29b |
+ do
|
|
|
5de29b |
+ if test -n "$dst_arg"; then
|
|
|
5de29b |
+ # $@ is not empty: it contains at least $arg.
|
|
|
5de29b |
+ set fnord "$@" "$dst_arg"
|
|
|
5de29b |
+ shift # fnord
|
|
|
5de29b |
+ fi
|
|
|
5de29b |
+ shift # arg
|
|
|
5de29b |
+ dst_arg=$arg
|
|
|
5de29b |
+ # Protect names problematic for 'test' and other utilities.
|
|
|
5de29b |
+ case $dst_arg in
|
|
|
5de29b |
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
|
|
|
5de29b |
+ esac
|
|
|
5de29b |
+ done
|
|
|
5de29b |
fi
|
|
|
5de29b |
|
|
|
5de29b |
-if [ x"$dir_arg" != x ]
|
|
|
5de29b |
-then
|
|
|
5de29b |
- $doit $instcmd $dst &&
|
|
|
5de29b |
-
|
|
|
5de29b |
- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
|
|
|
5de29b |
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
|
|
|
5de29b |
- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
|
|
|
5de29b |
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
|
|
|
5de29b |
-else
|
|
|
5de29b |
+if test $# -eq 0; then
|
|
|
5de29b |
+ if test -z "$dir_arg"; then
|
|
|
5de29b |
+ echo "$0: no input file specified." >&2
|
|
|
5de29b |
+ exit 1
|
|
|
5de29b |
+ fi
|
|
|
5de29b |
+ # It's OK to call 'install-sh -d' without argument.
|
|
|
5de29b |
+ # This can happen when creating conditional directories.
|
|
|
5de29b |
+ exit 0
|
|
|
5de29b |
+fi
|
|
|
5de29b |
|
|
|
5de29b |
-# If we're going to rename the final executable, determine the name now.
|
|
|
5de29b |
+if test -z "$dir_arg"; then
|
|
|
5de29b |
+ do_exit='(exit $ret); exit $ret'
|
|
|
5de29b |
+ trap "ret=129; $do_exit" 1
|
|
|
5de29b |
+ trap "ret=130; $do_exit" 2
|
|
|
5de29b |
+ trap "ret=141; $do_exit" 13
|
|
|
5de29b |
+ trap "ret=143; $do_exit" 15
|
|
|
5de29b |
+
|
|
|
5de29b |
+ # Set umask so as not to create temps with too-generous modes.
|
|
|
5de29b |
+ # However, 'strip' requires both read and write access to temps.
|
|
|
5de29b |
+ case $mode in
|
|
|
5de29b |
+ # Optimize common cases.
|
|
|
5de29b |
+ *644) cp_umask=133;;
|
|
|
5de29b |
+ *755) cp_umask=22;;
|
|
|
5de29b |
+
|
|
|
5de29b |
+ *[0-7])
|
|
|
5de29b |
+ if test -z "$stripcmd"; then
|
|
|
5de29b |
+ u_plus_rw=
|
|
|
5de29b |
+ else
|
|
|
5de29b |
+ u_plus_rw='% 200'
|
|
|
5de29b |
+ fi
|
|
|
5de29b |
+ cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
|
|
5de29b |
+ *)
|
|
|
5de29b |
+ if test -z "$stripcmd"; then
|
|
|
5de29b |
+ u_plus_rw=
|
|
|
5de29b |
+ else
|
|
|
5de29b |
+ u_plus_rw=,u+rw
|
|
|
5de29b |
+ fi
|
|
|
5de29b |
+ cp_umask=$mode$u_plus_rw;;
|
|
|
5de29b |
+ esac
|
|
|
5de29b |
+fi
|
|
|
5de29b |
|
|
|
5de29b |
- if [ x"$transformarg" = x ]
|
|
|
5de29b |
- then
|
|
|
5de29b |
- dstfile=`basename $dst`
|
|
|
5de29b |
+for src
|
|
|
5de29b |
+do
|
|
|
5de29b |
+ # Protect names problematic for 'test' and other utilities.
|
|
|
5de29b |
+ case $src in
|
|
|
5de29b |
+ -* | [=\(\)!]) src=./$src;;
|
|
|
5de29b |
+ esac
|
|
|
5de29b |
+
|
|
|
5de29b |
+ if test -n "$dir_arg"; then
|
|
|
5de29b |
+ dst=$src
|
|
|
5de29b |
+ dstdir=$dst
|
|
|
5de29b |
+ test -d "$dstdir"
|
|
|
5de29b |
+ dstdir_status=$?
|
|
|
5de29b |
+ else
|
|
|
5de29b |
+
|
|
|
5de29b |
+ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
|
|
5de29b |
+ # might cause directories to be created, which would be especially bad
|
|
|
5de29b |
+ # if $src (and thus $dsttmp) contains '*'.
|
|
|
5de29b |
+ if test ! -f "$src" && test ! -d "$src"; then
|
|
|
5de29b |
+ echo "$0: $src does not exist." >&2
|
|
|
5de29b |
+ exit 1
|
|
|
5de29b |
+ fi
|
|
|
5de29b |
+
|
|
|
5de29b |
+ if test -z "$dst_arg"; then
|
|
|
5de29b |
+ echo "$0: no destination specified." >&2
|
|
|
5de29b |
+ exit 1
|
|
|
5de29b |
+ fi
|
|
|
5de29b |
+ dst=$dst_arg
|
|
|
5de29b |
+
|
|
|
5de29b |
+ # If destination is a directory, append the input filename; won't work
|
|
|
5de29b |
+ # if double slashes aren't ignored.
|
|
|
5de29b |
+ if test -d "$dst"; then
|
|
|
5de29b |
+ if test -n "$no_target_directory"; then
|
|
|
5de29b |
+ echo "$0: $dst_arg: Is a directory" >&2
|
|
|
5de29b |
+ exit 1
|
|
|
5de29b |
+ fi
|
|
|
5de29b |
+ dstdir=$dst
|
|
|
5de29b |
+ dst=$dstdir/`basename "$src"`
|
|
|
5de29b |
+ dstdir_status=0
|
|
|
5de29b |
+ else
|
|
|
5de29b |
+ # Prefer dirname, but fall back on a substitute if dirname fails.
|
|
|
5de29b |
+ dstdir=`
|
|
|
5de29b |
+ (dirname "$dst") 2>/dev/null ||
|
|
|
5de29b |
+ expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
|
|
5de29b |
+ X"$dst" : 'X\(//\)[^/]' \| \
|
|
|
5de29b |
+ X"$dst" : 'X\(//\)$' \| \
|
|
|
5de29b |
+ X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
|
|
5de29b |
+ echo X"$dst" |
|
|
|
5de29b |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
|
|
5de29b |
+ s//\1/
|
|
|
5de29b |
+ q
|
|
|
5de29b |
+ }
|
|
|
5de29b |
+ /^X\(\/\/\)[^/].*/{
|
|
|
5de29b |
+ s//\1/
|
|
|
5de29b |
+ q
|
|
|
5de29b |
+ }
|
|
|
5de29b |
+ /^X\(\/\/\)$/{
|
|
|
5de29b |
+ s//\1/
|
|
|
5de29b |
+ q
|
|
|
5de29b |
+ }
|
|
|
5de29b |
+ /^X\(\/\).*/{
|
|
|
5de29b |
+ s//\1/
|
|
|
5de29b |
+ q
|
|
|
5de29b |
+ }
|
|
|
5de29b |
+ s/.*/./; q'
|
|
|
5de29b |
+ `
|
|
|
5de29b |
+
|
|
|
5de29b |
+ test -d "$dstdir"
|
|
|
5de29b |
+ dstdir_status=$?
|
|
|
5de29b |
+ fi
|
|
|
5de29b |
+ fi
|
|
|
5de29b |
+
|
|
|
5de29b |
+ obsolete_mkdir_used=false
|
|
|
5de29b |
+
|
|
|
5de29b |
+ if test $dstdir_status != 0; then
|
|
|
5de29b |
+ case $posix_mkdir in
|
|
|
5de29b |
+ '')
|
|
|
5de29b |
+ # Create intermediate dirs using mode 755 as modified by the umask.
|
|
|
5de29b |
+ # This is like FreeBSD 'install' as of 1997-10-28.
|
|
|
5de29b |
+ umask=`umask`
|
|
|
5de29b |
+ case $stripcmd.$umask in
|
|
|
5de29b |
+ # Optimize common cases.
|
|
|
5de29b |
+ *[2367][2367]) mkdir_umask=$umask;;
|
|
|
5de29b |
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
|
|
5de29b |
+
|
|
|
5de29b |
+ *[0-7])
|
|
|
5de29b |
+ mkdir_umask=`expr $umask + 22 \
|
|
|
5de29b |
+ - $umask % 100 % 40 + $umask % 20 \
|
|
|
5de29b |
+ - $umask % 10 % 4 + $umask % 2
|
|
|
5de29b |
+ `;;
|
|
|
5de29b |
+ *) mkdir_umask=$umask,go-w;;
|
|
|
5de29b |
+ esac
|
|
|
5de29b |
+
|
|
|
5de29b |
+ # With -d, create the new directory with the user-specified mode.
|
|
|
5de29b |
+ # Otherwise, rely on $mkdir_umask.
|
|
|
5de29b |
+ if test -n "$dir_arg"; then
|
|
|
5de29b |
+ mkdir_mode=-m$mode
|
|
|
5de29b |
else
|
|
|
5de29b |
- dstfile=`basename $dst $transformbasename |
|
|
|
5de29b |
- sed $transformarg`$transformbasename
|
|
|
5de29b |
+ mkdir_mode=
|
|
|
5de29b |
fi
|
|
|
5de29b |
|
|
|
5de29b |
-# don't allow the sed command to completely eliminate the filename
|
|
|
5de29b |
+ posix_mkdir=false
|
|
|
5de29b |
+ case $umask in
|
|
|
5de29b |
+ *[123567][0-7][0-7])
|
|
|
5de29b |
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
|
|
|
5de29b |
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
|
|
5de29b |
+ ;;
|
|
|
5de29b |
+ *)
|
|
|
5de29b |
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
|
|
5de29b |
+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
|
|
5de29b |
+
|
|
|
5de29b |
+ if (umask $mkdir_umask &&
|
|
|
5de29b |
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
|
|
5de29b |
+ then
|
|
|
5de29b |
+ if test -z "$dir_arg" || {
|
|
|
5de29b |
+ # Check for POSIX incompatibilities with -m.
|
|
|
5de29b |
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
|
|
5de29b |
+ # other-writable bit of parent directory when it shouldn't.
|
|
|
5de29b |
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
|
|
5de29b |
+ ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
|
|
5de29b |
+ case $ls_ld_tmpdir in
|
|
|
5de29b |
+ d????-?r-*) different_mode=700;;
|
|
|
5de29b |
+ d????-?--*) different_mode=755;;
|
|
|
5de29b |
+ *) false;;
|
|
|
5de29b |
+ esac &&
|
|
|
5de29b |
+ $mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
|
|
5de29b |
+ ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
|
|
5de29b |
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
|
|
5de29b |
+ }
|
|
|
5de29b |
+ }
|
|
|
5de29b |
+ then posix_mkdir=:
|
|
|
5de29b |
+ fi
|
|
|
5de29b |
+ rmdir "$tmpdir/d" "$tmpdir"
|
|
|
5de29b |
+ else
|
|
|
5de29b |
+ # Remove any dirs left behind by ancient mkdir implementations.
|
|
|
5de29b |
+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
|
|
5de29b |
+ fi
|
|
|
5de29b |
+ trap '' 0;;
|
|
|
5de29b |
+ esac;;
|
|
|
5de29b |
+ esac
|
|
|
5de29b |
|
|
|
5de29b |
- if [ x"$dstfile" = x ]
|
|
|
5de29b |
- then
|
|
|
5de29b |
- dstfile=`basename $dst`
|
|
|
5de29b |
+ if
|
|
|
5de29b |
+ $posix_mkdir && (
|
|
|
5de29b |
+ umask $mkdir_umask &&
|
|
|
5de29b |
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
|
|
5de29b |
+ )
|
|
|
5de29b |
+ then :
|
|
|
5de29b |
+ else
|
|
|
5de29b |
+
|
|
|
5de29b |
+ # The umask is ridiculous, or mkdir does not conform to POSIX,
|
|
|
5de29b |
+ # or it failed possibly due to a race condition. Create the
|
|
|
5de29b |
+ # directory the slow way, step by step, checking for races as we go.
|
|
|
5de29b |
+
|
|
|
5de29b |
+ case $dstdir in
|
|
|
5de29b |
+ /*) prefix='/';;
|
|
|
5de29b |
+ [-=\(\)!]*) prefix='./';;
|
|
|
5de29b |
+ *) prefix='';;
|
|
|
5de29b |
+ esac
|
|
|
5de29b |
+
|
|
|
5de29b |
+ eval "$initialize_posix_glob"
|
|
|
5de29b |
+
|
|
|
5de29b |
+ oIFS=$IFS
|
|
|
5de29b |
+ IFS=/
|
|
|
5de29b |
+ $posix_glob set -f
|
|
|
5de29b |
+ set fnord $dstdir
|
|
|
5de29b |
+ shift
|
|
|
5de29b |
+ $posix_glob set +f
|
|
|
5de29b |
+ IFS=$oIFS
|
|
|
5de29b |
+
|
|
|
5de29b |
+ prefixes=
|
|
|
5de29b |
+
|
|
|
5de29b |
+ for d
|
|
|
5de29b |
+ do
|
|
|
5de29b |
+ test X"$d" = X && continue
|
|
|
5de29b |
+
|
|
|
5de29b |
+ prefix=$prefix$d
|
|
|
5de29b |
+ if test -d "$prefix"; then
|
|
|
5de29b |
+ prefixes=
|
|
|
5de29b |
else
|
|
|
5de29b |
- true
|
|
|
5de29b |
+ if $posix_mkdir; then
|
|
|
5de29b |
+ (umask=$mkdir_umask &&
|
|
|
5de29b |
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
|
|
5de29b |
+ # Don't fail if two instances are running concurrently.
|
|
|
5de29b |
+ test -d "$prefix" || exit 1
|
|
|
5de29b |
+ else
|
|
|
5de29b |
+ case $prefix in
|
|
|
5de29b |
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
|
|
5de29b |
+ *) qprefix=$prefix;;
|
|
|
5de29b |
+ esac
|
|
|
5de29b |
+ prefixes="$prefixes '$qprefix'"
|
|
|
5de29b |
+ fi
|
|
|
5de29b |
fi
|
|
|
5de29b |
+ prefix=$prefix/
|
|
|
5de29b |
+ done
|
|
|
5de29b |
|
|
|
5de29b |
-# Make a temp file name in the proper directory.
|
|
|
5de29b |
-
|
|
|
5de29b |
- dsttmp=$dstdir/#inst.$$#
|
|
|
5de29b |
-
|
|
|
5de29b |
-# Move or copy the file name to the temp name
|
|
|
5de29b |
-
|
|
|
5de29b |
- $doit $instcmd $src $dsttmp &&
|
|
|
5de29b |
-
|
|
|
5de29b |
- trap "rm -f ${dsttmp}" 0 &&
|
|
|
5de29b |
-
|
|
|
5de29b |
-# and set any options; do chmod last to preserve setuid bits
|
|
|
5de29b |
-
|
|
|
5de29b |
-# If any of these fail, we abort the whole thing. If we want to
|
|
|
5de29b |
-# ignore errors from any of these, just make sure not to ignore
|
|
|
5de29b |
-# errors from the above "$doit $instcmd $src $dsttmp" command.
|
|
|
5de29b |
-
|
|
|
5de29b |
- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
|
|
|
5de29b |
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
|
|
|
5de29b |
- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
|
|
|
5de29b |
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
|
|
|
5de29b |
-
|
|
|
5de29b |
-# Now rename the file to the real destination.
|
|
|
5de29b |
-
|
|
|
5de29b |
- $doit $rmcmd -f $dstdir/$dstfile &&
|
|
|
5de29b |
- $doit $mvcmd $dsttmp $dstdir/$dstfile
|
|
|
5de29b |
-
|
|
|
5de29b |
-fi &&
|
|
|
5de29b |
+ if test -n "$prefixes"; then
|
|
|
5de29b |
+ # Don't fail if two instances are running concurrently.
|
|
|
5de29b |
+ (umask $mkdir_umask &&
|
|
|
5de29b |
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
|
|
|
5de29b |
+ test -d "$dstdir" || exit 1
|
|
|
5de29b |
+ obsolete_mkdir_used=true
|
|
|
5de29b |
+ fi
|
|
|
5de29b |
+ fi
|
|
|
5de29b |
+ fi
|
|
|
5de29b |
+
|
|
|
5de29b |
+ if test -n "$dir_arg"; then
|
|
|
5de29b |
+ { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
|
|
5de29b |
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
|
|
5de29b |
+ { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
|
|
5de29b |
+ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
|
|
5de29b |
+ else
|
|
|
5de29b |
+
|
|
|
5de29b |
+ # Make a couple of temp file names in the proper directory.
|
|
|
5de29b |
+ dsttmp=$dstdir/_inst.$$_
|
|
|
5de29b |
+ rmtmp=$dstdir/_rm.$$_
|
|
|
5de29b |
+
|
|
|
5de29b |
+ # Trap to clean up those temp files at exit.
|
|
|
5de29b |
+ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
|
|
5de29b |
+
|
|
|
5de29b |
+ # Copy the file name to the temp name.
|
|
|
5de29b |
+ (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
|
|
5de29b |
+
|
|
|
5de29b |
+ # and set any options; do chmod last to preserve setuid bits.
|
|
|
5de29b |
+ #
|
|
|
5de29b |
+ # If any of these fail, we abort the whole thing. If we want to
|
|
|
5de29b |
+ # ignore errors from any of these, just make sure not to ignore
|
|
|
5de29b |
+ # errors from the above "$doit $cpprog $src $dsttmp" command.
|
|
|
5de29b |
+ #
|
|
|
5de29b |
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
|
|
5de29b |
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
|
|
5de29b |
+ { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
|
|
5de29b |
+ { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
|
|
5de29b |
+
|
|
|
5de29b |
+ # If -C, don't bother to copy if it wouldn't change the file.
|
|
|
5de29b |
+ if $copy_on_change &&
|
|
|
5de29b |
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
|
|
5de29b |
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
|
|
5de29b |
+
|
|
|
5de29b |
+ eval "$initialize_posix_glob" &&
|
|
|
5de29b |
+ $posix_glob set -f &&
|
|
|
5de29b |
+ set X $old && old=:$2:$4:$5:$6 &&
|
|
|
5de29b |
+ set X $new && new=:$2:$4:$5:$6 &&
|
|
|
5de29b |
+ $posix_glob set +f &&
|
|
|
5de29b |
+
|
|
|
5de29b |
+ test "$old" = "$new" &&
|
|
|
5de29b |
+ $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
|
|
5de29b |
+ then
|
|
|
5de29b |
+ rm -f "$dsttmp"
|
|
|
5de29b |
+ else
|
|
|
5de29b |
+ # Rename the file to the real destination.
|
|
|
5de29b |
+ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
|
|
5de29b |
+
|
|
|
5de29b |
+ # The rename failed, perhaps because mv can't rename something else
|
|
|
5de29b |
+ # to itself, or perhaps because mv is so ancient that it does not
|
|
|
5de29b |
+ # support -f.
|
|
|
5de29b |
+ {
|
|
|
5de29b |
+ # Now remove or move aside any old file at destination location.
|
|
|
5de29b |
+ # We try this two ways since rm can't unlink itself on some
|
|
|
5de29b |
+ # systems and the destination file might be busy for other
|
|
|
5de29b |
+ # reasons. In this case, the final cleanup might fail but the new
|
|
|
5de29b |
+ # file should still install successfully.
|
|
|
5de29b |
+ {
|
|
|
5de29b |
+ test ! -f "$dst" ||
|
|
|
5de29b |
+ $doit $rmcmd -f "$dst" 2>/dev/null ||
|
|
|
5de29b |
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
|
|
5de29b |
+ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
|
|
5de29b |
+ } ||
|
|
|
5de29b |
+ { echo "$0: cannot unlink or rename $dst" >&2
|
|
|
5de29b |
+ (exit 1); exit 1
|
|
|
5de29b |
+ }
|
|
|
5de29b |
+ } &&
|
|
|
5de29b |
+
|
|
|
5de29b |
+ # Now rename the file to the real destination.
|
|
|
5de29b |
+ $doit $mvcmd "$dsttmp" "$dst"
|
|
|
5de29b |
+ }
|
|
|
5de29b |
+ fi || exit 1
|
|
|
5de29b |
|
|
|
5de29b |
+ trap '' 0
|
|
|
5de29b |
+ fi
|
|
|
5de29b |
+done
|
|
|
5de29b |
|
|
|
5de29b |
-exit 0
|
|
|
5de29b |
+# Local variables:
|
|
|
5de29b |
+# eval: (add-hook 'write-file-hooks 'time-stamp)
|
|
|
5de29b |
+# time-stamp-start: "scriptversion="
|
|
|
5de29b |
+# time-stamp-format: "%:y-%02m-%02d.%02H"
|
|
|
5de29b |
+# time-stamp-time-zone: "UTC"
|
|
|
5de29b |
+# time-stamp-end: "; # UTC"
|
|
|
5de29b |
+# End:
|
|
|
12745e |
diff -urN glibc-2.17-c758a686/scripts/mkinstalldirs glibc-2.17-c758a686/scripts/mkinstalldirs
|
|
|
12745e |
--- glibc-2.17-c758a686/scripts/mkinstalldirs 2014-05-26 15:59:45.000000000 -0500
|
|
|
12745e |
+++ glibc-2.17-c758a686/scripts/mkinstalldirs 2014-05-26 16:00:34.000000000 -0500
|
|
|
5de29b |
@@ -1,38 +1,162 @@
|
|
|
5de29b |
#! /bin/sh
|
|
|
5de29b |
# mkinstalldirs --- make directory hierarchy
|
|
|
5de29b |
-# Author: Noah Friedman <friedman@prep.ai.mit.edu>
|
|
|
5de29b |
-# Created: 1993-05-16
|
|
|
5de29b |
-# Public domain
|
|
|
5de29b |
|
|
|
5de29b |
+scriptversion=2009-04-28.21; # UTC
|
|
|
5de29b |
+
|
|
|
5de29b |
+# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
|
|
|
5de29b |
+# Created: 1993-05-16
|
|
|
5de29b |
+# Public domain.
|
|
|
5de29b |
+#
|
|
|
5de29b |
+# This file is maintained in Automake, please report
|
|
|
5de29b |
+# bugs to <bug-automake@gnu.org> or send patches to
|
|
|
5de29b |
+# <automake-patches@gnu.org>.
|
|
|
5de29b |
+
|
|
|
5de29b |
+nl='
|
|
|
5de29b |
+'
|
|
|
5de29b |
+IFS=" "" $nl"
|
|
|
5de29b |
errstatus=0
|
|
|
5de29b |
+dirmode=
|
|
|
5de29b |
+
|
|
|
5de29b |
+usage="\
|
|
|
5de29b |
+Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
|
|
|
5de29b |
+
|
|
|
5de29b |
+Create each directory DIR (with mode MODE, if specified), including all
|
|
|
5de29b |
+leading file name components.
|
|
|
5de29b |
+
|
|
|
5de29b |
+Report bugs to <bug-automake@gnu.org>."
|
|
|
5de29b |
+
|
|
|
5de29b |
+# process command line arguments
|
|
|
5de29b |
+while test $# -gt 0 ; do
|
|
|
5de29b |
+ case $1 in
|
|
|
5de29b |
+ -h | --help | --h*) # -h for help
|
|
|
5de29b |
+ echo "$usage"
|
|
|
5de29b |
+ exit $?
|
|
|
5de29b |
+ ;;
|
|
|
5de29b |
+ -m) # -m PERM arg
|
|
|
5de29b |
+ shift
|
|
|
5de29b |
+ test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
|
|
|
5de29b |
+ dirmode=$1
|
|
|
5de29b |
+ shift
|
|
|
5de29b |
+ ;;
|
|
|
5de29b |
+ --version)
|
|
|
5de29b |
+ echo "$0 $scriptversion"
|
|
|
5de29b |
+ exit $?
|
|
|
5de29b |
+ ;;
|
|
|
5de29b |
+ --) # stop option processing
|
|
|
5de29b |
+ shift
|
|
|
5de29b |
+ break
|
|
|
5de29b |
+ ;;
|
|
|
5de29b |
+ -*) # unknown option
|
|
|
5de29b |
+ echo "$usage" 1>&2
|
|
|
5de29b |
+ exit 1
|
|
|
5de29b |
+ ;;
|
|
|
5de29b |
+ *) # first non-opt arg
|
|
|
5de29b |
+ break
|
|
|
5de29b |
+ ;;
|
|
|
5de29b |
+ esac
|
|
|
5de29b |
+done
|
|
|
5de29b |
|
|
|
5de29b |
for file
|
|
|
5de29b |
do
|
|
|
5de29b |
- set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
|
|
|
5de29b |
- shift
|
|
|
5de29b |
+ if test -d "$file"; then
|
|
|
5de29b |
+ shift
|
|
|
5de29b |
+ else
|
|
|
5de29b |
+ break
|
|
|
5de29b |
+ fi
|
|
|
5de29b |
+done
|
|
|
5de29b |
+
|
|
|
5de29b |
+case $# in
|
|
|
5de29b |
+ 0) exit 0 ;;
|
|
|
5de29b |
+esac
|
|
|
5de29b |
+
|
|
|
5de29b |
+# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
|
|
|
5de29b |
+# mkdir -p a/c at the same time, both will detect that a is missing,
|
|
|
5de29b |
+# one will create a, then the other will try to create a and die with
|
|
|
5de29b |
+# a "File exists" error. This is a problem when calling mkinstalldirs
|
|
|
5de29b |
+# from a parallel make. We use --version in the probe to restrict
|
|
|
5de29b |
+# ourselves to GNU mkdir, which is thread-safe.
|
|
|
5de29b |
+case $dirmode in
|
|
|
5de29b |
+ '')
|
|
|
5de29b |
+ if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
|
|
|
5de29b |
+ echo "mkdir -p -- $*"
|
|
|
5de29b |
+ exec mkdir -p -- "$@"
|
|
|
5de29b |
+ else
|
|
|
5de29b |
+ # On NextStep and OpenStep, the 'mkdir' command does not
|
|
|
5de29b |
+ # recognize any option. It will interpret all options as
|
|
|
5de29b |
+ # directories to create, and then abort because '.' already
|
|
|
5de29b |
+ # exists.
|
|
|
5de29b |
+ test -d ./-p && rmdir ./-p
|
|
|
5de29b |
+ test -d ./--version && rmdir ./--version
|
|
|
5de29b |
+ fi
|
|
|
5de29b |
+ ;;
|
|
|
5de29b |
+ *)
|
|
|
5de29b |
+ if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
|
|
|
5de29b |
+ test ! -d ./--version; then
|
|
|
5de29b |
+ echo "mkdir -m $dirmode -p -- $*"
|
|
|
5de29b |
+ exec mkdir -m "$dirmode" -p -- "$@"
|
|
|
5de29b |
+ else
|
|
|
5de29b |
+ # Clean up after NextStep and OpenStep mkdir.
|
|
|
5de29b |
+ for d in ./-m ./-p ./--version "./$dirmode";
|
|
|
5de29b |
+ do
|
|
|
5de29b |
+ test -d $d && rmdir $d
|
|
|
5de29b |
+ done
|
|
|
5de29b |
+ fi
|
|
|
5de29b |
+ ;;
|
|
|
5de29b |
+esac
|
|
|
5de29b |
|
|
|
5de29b |
- pathcomp=
|
|
|
5de29b |
- for d
|
|
|
5de29b |
- do
|
|
|
5de29b |
- pathcomp="$pathcomp$d"
|
|
|
5de29b |
- case "$pathcomp" in
|
|
|
5de29b |
- -* ) pathcomp=./$pathcomp ;;
|
|
|
5de29b |
- esac
|
|
|
5de29b |
-
|
|
|
5de29b |
- if test ! -d "$pathcomp"; then
|
|
|
5de29b |
- echo "mkdir $pathcomp" 1>&2
|
|
|
5de29b |
-
|
|
|
5de29b |
- mkdir "$pathcomp" || lasterr=$?
|
|
|
5de29b |
-
|
|
|
5de29b |
- if test ! -d "$pathcomp"; then
|
|
|
5de29b |
- errstatus=$lasterr
|
|
|
5de29b |
- fi
|
|
|
5de29b |
- fi
|
|
|
5de29b |
+for file
|
|
|
5de29b |
+do
|
|
|
5de29b |
+ case $file in
|
|
|
5de29b |
+ /*) pathcomp=/ ;;
|
|
|
5de29b |
+ *) pathcomp= ;;
|
|
|
5de29b |
+ esac
|
|
|
5de29b |
+ oIFS=$IFS
|
|
|
5de29b |
+ IFS=/
|
|
|
5de29b |
+ set fnord $file
|
|
|
5de29b |
+ shift
|
|
|
5de29b |
+ IFS=$oIFS
|
|
|
5de29b |
+
|
|
|
5de29b |
+ for d
|
|
|
5de29b |
+ do
|
|
|
5de29b |
+ test "x$d" = x && continue
|
|
|
5de29b |
+
|
|
|
5de29b |
+ pathcomp=$pathcomp$d
|
|
|
5de29b |
+ case $pathcomp in
|
|
|
5de29b |
+ -*) pathcomp=./$pathcomp ;;
|
|
|
5de29b |
+ esac
|
|
|
5de29b |
+
|
|
|
5de29b |
+ if test ! -d "$pathcomp"; then
|
|
|
5de29b |
+ echo "mkdir $pathcomp"
|
|
|
5de29b |
+
|
|
|
5de29b |
+ mkdir "$pathcomp" || lasterr=$?
|
|
|
5de29b |
+
|
|
|
5de29b |
+ if test ! -d "$pathcomp"; then
|
|
|
5de29b |
+ errstatus=$lasterr
|
|
|
5de29b |
+ else
|
|
|
5de29b |
+ if test ! -z "$dirmode"; then
|
|
|
5de29b |
+ echo "chmod $dirmode $pathcomp"
|
|
|
5de29b |
+ lasterr=
|
|
|
5de29b |
+ chmod "$dirmode" "$pathcomp" || lasterr=$?
|
|
|
5de29b |
+
|
|
|
5de29b |
+ if test ! -z "$lasterr"; then
|
|
|
5de29b |
+ errstatus=$lasterr
|
|
|
5de29b |
+ fi
|
|
|
5de29b |
+ fi
|
|
|
5de29b |
+ fi
|
|
|
5de29b |
+ fi
|
|
|
5de29b |
|
|
|
5de29b |
- pathcomp="$pathcomp/"
|
|
|
5de29b |
- done
|
|
|
5de29b |
+ pathcomp=$pathcomp/
|
|
|
5de29b |
+ done
|
|
|
5de29b |
done
|
|
|
5de29b |
|
|
|
5de29b |
exit $errstatus
|
|
|
5de29b |
|
|
|
5de29b |
-# mkinstalldirs ends here
|
|
|
5de29b |
+# Local Variables:
|
|
|
5de29b |
+# mode: shell-script
|
|
|
5de29b |
+# sh-indentation: 2
|
|
|
5de29b |
+# eval: (add-hook 'write-file-hooks 'time-stamp)
|
|
|
5de29b |
+# time-stamp-start: "scriptversion="
|
|
|
5de29b |
+# time-stamp-format: "%:y-%02m-%02d.%02H"
|
|
|
5de29b |
+# time-stamp-time-zone: "UTC"
|
|
|
5de29b |
+# time-stamp-end: "; # UTC"
|
|
|
5de29b |
+# End:
|
|
|
12745e |
diff -urN glibc-2.17-c758a686/scripts/move-if-change glibc-2.17-c758a686/scripts/move-if-change
|
|
|
12745e |
--- glibc-2.17-c758a686/scripts/move-if-change 2014-05-26 15:59:45.000000000 -0500
|
|
|
12745e |
+++ glibc-2.17-c758a686/scripts/move-if-change 2014-05-26 16:00:34.000000000 -0500
|
|
|
5de29b |
@@ -1,17 +1,83 @@
|
|
|
5de29b |
#!/bin/sh
|
|
|
5de29b |
# Like mv $1 $2, but if the files are the same, just delete $1.
|
|
|
5de29b |
-# Status is 0 if $2 is changed, 1 otherwise.
|
|
|
5de29b |
-if
|
|
|
5de29b |
-test -r $2
|
|
|
5de29b |
-then
|
|
|
5de29b |
-if
|
|
|
5de29b |
-cmp -s $1 $2
|
|
|
5de29b |
-then
|
|
|
5de29b |
-echo $2 is unchanged
|
|
|
5de29b |
-rm -f $1
|
|
|
5de29b |
+# Status is zero if successful, nonzero otherwise.
|
|
|
5de29b |
+
|
|
|
5de29b |
+VERSION='2012-01-06 07:23'; # UTC
|
|
|
5de29b |
+# The definition above must lie within the first 8 lines in order
|
|
|
5de29b |
+# for the Emacs time-stamp write hook (at end) to update it.
|
|
|
5de29b |
+# If you change this file with Emacs, please let the write hook
|
|
|
5de29b |
+# do its job. Otherwise, update this string manually.
|
|
|
5de29b |
+
|
|
|
5de29b |
+# Copyright (C) 2002-2013 Free Software Foundation, Inc.
|
|
|
5de29b |
+
|
|
|
5de29b |
+# This program is free software: you can redistribute it and/or modify
|
|
|
5de29b |
+# it under the terms of the GNU General Public License as published by
|
|
|
5de29b |
+# the Free Software Foundation, either version 3 of the License, or
|
|
|
5de29b |
+# (at your option) any later version.
|
|
|
5de29b |
+
|
|
|
5de29b |
+# This program is distributed in the hope that it will be useful,
|
|
|
5de29b |
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
5de29b |
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
5de29b |
+# GNU General Public License for more details.
|
|
|
5de29b |
+
|
|
|
5de29b |
+# You should have received a copy of the GNU General Public License
|
|
|
5de29b |
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
5de29b |
+
|
|
|
5de29b |
+usage="usage: $0 SOURCE DEST"
|
|
|
5de29b |
+
|
|
|
5de29b |
+help="$usage
|
|
|
5de29b |
+ or: $0 OPTION
|
|
|
5de29b |
+If SOURCE is different than DEST, then move it to DEST; else remove SOURCE.
|
|
|
5de29b |
+
|
|
|
5de29b |
+ --help display this help and exit
|
|
|
5de29b |
+ --version output version information and exit
|
|
|
5de29b |
+
|
|
|
5de29b |
+The variable CMPPROG can be used to specify an alternative to 'cmp'.
|
|
|
5de29b |
+
|
|
|
5de29b |
+Report bugs to <bug-gnulib@gnu.org>."
|
|
|
5de29b |
+
|
|
|
5de29b |
+version=`expr "$VERSION" : '\([^ ]*\)'`
|
|
|
5de29b |
+version="move-if-change (gnulib) $version
|
|
|
5de29b |
+Copyright (C) 2011 Free Software Foundation, Inc.
|
|
|
5de29b |
+License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
|
|
|
5de29b |
+This is free software: you are free to change and redistribute it.
|
|
|
5de29b |
+There is NO WARRANTY, to the extent permitted by law."
|
|
|
5de29b |
+
|
|
|
5de29b |
+cmpprog=${CMPPROG-cmp}
|
|
|
5de29b |
+
|
|
|
5de29b |
+for arg
|
|
|
5de29b |
+do
|
|
|
5de29b |
+ case $arg in
|
|
|
5de29b |
+ --help | --hel | --he | --h)
|
|
|
5de29b |
+ exec echo "$help" ;;
|
|
|
5de29b |
+ --version | --versio | --versi | --vers | --ver | --ve | --v)
|
|
|
5de29b |
+ exec echo "$version" ;;
|
|
|
5de29b |
+ --)
|
|
|
5de29b |
+ shift
|
|
|
5de29b |
+ break ;;
|
|
|
5de29b |
+ -*)
|
|
|
5de29b |
+ echo "$0: invalid option: $arg" >&2
|
|
|
5de29b |
+ exit 1 ;;
|
|
|
5de29b |
+ *)
|
|
|
5de29b |
+ break ;;
|
|
|
5de29b |
+ esac
|
|
|
5de29b |
+done
|
|
|
5de29b |
+
|
|
|
5de29b |
+test $# -eq 2 || { echo "$0: $usage" >&2; exit 1; }
|
|
|
5de29b |
+
|
|
|
5de29b |
+if test -r "$2" && $cmpprog -- "$1" "$2" >/dev/null; then
|
|
|
5de29b |
+ rm -f -- "$1"
|
|
|
5de29b |
else
|
|
|
5de29b |
-mv -f $1 $2
|
|
|
5de29b |
-fi
|
|
|
5de29b |
-else
|
|
|
5de29b |
-mv -f $1 $2
|
|
|
5de29b |
+ if mv -f -- "$1" "$2"; then :; else
|
|
|
5de29b |
+ # Ignore failure due to a concurrent move-if-change.
|
|
|
5de29b |
+ test -r "$2" && $cmpprog -- "$1" "$2" >/dev/null && rm -f -- "$1"
|
|
|
5de29b |
+ fi
|
|
|
5de29b |
fi
|
|
|
5de29b |
+
|
|
|
5de29b |
+## Local Variables:
|
|
|
5de29b |
+## eval: (add-hook 'write-file-hooks 'time-stamp)
|
|
|
5de29b |
+## time-stamp-start: "VERSION='"
|
|
|
5de29b |
+## time-stamp-format: "%:y-%02m-%02d %02H:%02M"
|
|
|
5de29b |
+## time-stamp-time-zone: "UTC"
|
|
|
5de29b |
+## time-stamp-end: "'; # UTC"
|
|
|
5de29b |
+## End:
|