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