annotate build-aux/install-sh @ 317:aab761616489 default tip

Rearrange some Autoconf files. Autoconf was failing to detect install-sh at the top level and needed some explicit directions. It also wants config.guess and config.sub to be provided too. A few other macros have also been updated.
author John "Elwin" Edwards
date Tue, 05 Sep 2023 20:05:24 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
317
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
1 #!/usr/bin/sh
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
2 # install - install a program, script, or datafile
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
3
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
4 scriptversion=2020-11-14.01; # UTC
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
5
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
6 # This originates from X11R5 (mit/util/scripts/install.sh), which was
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
7 # later released in X11R6 (xc/config/util/install.sh) with the
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
8 # following copyright and license.
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
9 #
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
10 # Copyright (C) 1994 X Consortium
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
11 #
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
12 # Permission is hereby granted, free of charge, to any person obtaining a copy
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
13 # of this software and associated documentation files (the "Software"), to
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
14 # deal in the Software without restriction, including without limitation the
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
15 # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
16 # sell copies of the Software, and to permit persons to whom the Software is
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
17 # furnished to do so, subject to the following conditions:
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
18 #
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
19 # The above copyright notice and this permission notice shall be included in
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
20 # all copies or substantial portions of the Software.
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
21 #
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
22 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
23 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
24 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
25 # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
26 # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
27 # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
28 #
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
29 # Except as contained in this notice, the name of the X Consortium shall not
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
30 # be used in advertising or otherwise to promote the sale, use or other deal-
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
31 # ings in this Software without prior written authorization from the X Consor-
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
32 # tium.
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
33 #
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
34 #
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
35 # FSF changes to this file are in the public domain.
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
36 #
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
37 # Calling this script install-sh is preferred over install.sh, to prevent
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
38 # 'make' implicit rules from creating a file called install from it
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
39 # when there is no Makefile.
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
40 #
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
41 # This script is compatible with the BSD install script, but was written
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
42 # from scratch.
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
43
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
44 tab=' '
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
45 nl='
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
46 '
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
47 IFS=" $tab$nl"
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
48
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
49 # Set DOITPROG to "echo" to test this script.
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
50
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
51 doit=${DOITPROG-}
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
52 doit_exec=${doit:-exec}
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
53
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
54 # Put in absolute file names if you don't have them in your path;
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
55 # or use environment vars.
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
56
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
57 chgrpprog=${CHGRPPROG-chgrp}
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
58 chmodprog=${CHMODPROG-chmod}
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
59 chownprog=${CHOWNPROG-chown}
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
60 cmpprog=${CMPPROG-cmp}
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
61 cpprog=${CPPROG-cp}
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
62 mkdirprog=${MKDIRPROG-mkdir}
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
63 mvprog=${MVPROG-mv}
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
64 rmprog=${RMPROG-rm}
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
65 stripprog=${STRIPPROG-strip}
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
66
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
67 posix_mkdir=
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
68
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
69 # Desired mode of installed file.
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
70 mode=0755
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
71
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
72 # Create dirs (including intermediate dirs) using mode 755.
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
73 # This is like GNU 'install' as of coreutils 8.32 (2020).
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
74 mkdir_umask=22
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
75
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
76 backupsuffix=
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
77 chgrpcmd=
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
78 chmodcmd=$chmodprog
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
79 chowncmd=
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
80 mvcmd=$mvprog
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
81 rmcmd="$rmprog -f"
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
82 stripcmd=
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
83
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
84 src=
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
85 dst=
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
86 dir_arg=
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
87 dst_arg=
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
88
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
89 copy_on_change=false
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
90 is_target_a_directory=possibly
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
91
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
92 usage="\
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
93 Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
aab761616489 Rearrange some Autoconf files.
John "Elwin" Edwards
parents:
diff changeset
94 or: $0 [OPTION]... SRCFILES... DIRECTORY