annotate admin/quick-install-emacs @ 78627:e8ce4af3f42d

(byte-optimize-featurep): Also handle `sxemacs'.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 23 Aug 2007 15:11:31 +0000
parents 450fa81c5930
children cde444d03b82 f55f9811f5d7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
39041
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
1 #!/bin/sh
75454
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
2 ### quick-install-emacs --- do a halfway-decent job of installing emacs quickly
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
3
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
4 ## Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
5 ## Free Software Foundation, Inc.
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
6
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
7 ## Author: Miles Bader <miles@gnu.org>
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
8
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
9 ## This file is part of GNU Emacs.
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
10
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
11 ## GNU Emacs is free software; you can redistribute it and/or modify
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
12 ## it under the terms of the GNU General Public License as published by
78240
450fa81c5930 Switch license to GPLv3 or later.
Glenn Morris <rgm@gnu.org>
parents: 75454
diff changeset
13 ## the Free Software Foundation; either version 3, or (at your option)
75454
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
14 ## any later version.
39041
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
15
75454
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
16 ## GNU Emacs is distributed in the hope that it will be useful,
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
17 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
18 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
19 ## GNU General Public License for more details.
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
20
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
21 ## You should have received a copy of the GNU General Public License
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
22 ## along with GNU Emacs; see the file COPYING. If not, write to the
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
23 ## Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
24 ## Boston, MA 02110-1301, USA.
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
25
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
26 ### Commentary:
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
27
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
28 ## This script is mainly intended for emacs maintainer or pretesters who
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
29 ## install emacs very often. See the --help output for more details.
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
30
39041
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
31
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
32 PUBLIC_LIBSRC_BINARIES='b2m emacsclient etags ctags ebrowse'
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
33 PUBLIC_LIBSRC_SCRIPTS='grep-changelog rcs-checkin'
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
34
52634
bb955cc088f9 Revision: miles@gnu.org--gnu-2003/emacs--cvs-trunk--0--patch-62
Miles Bader <miles@gnu.org>
parents: 52506
diff changeset
35 AVOID="CVS -DIC README COPYING ChangeLog ~ [.]orig$ [.]rej$ Makefile makefile stamp-subdir [.]cvsignore [.]arch-ids [{]arch[}] [.][cho]$ make-docfile testfile test-distrib"
39041
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
36
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
37 # Prune old binaries lying around in the source tree
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
38 PRUNE=no
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
39 # Re-install files even if they already exist
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
40 FORCE=no
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
41 # Command verbose flag
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
42 VERBOSE=''
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
43
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
44 me="`basename $0`"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
45
60340
f6384702a1b6 Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-146
Miles Bader <miles@gnu.org>
parents: 52708
diff changeset
46 # Install commands (if the user specifies the `--verbose' option, it is
f6384702a1b6 Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-146
Miles Bader <miles@gnu.org>
parents: 52708
diff changeset
47 # passed to these commands, so that feature only works if these commands
f6384702a1b6 Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-146
Miles Bader <miles@gnu.org>
parents: 52708
diff changeset
48 # implement it too)
39041
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
49 LINK='cp -lf'
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
50 COPY='cp -f'
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
51 REMOVE='rm -r'
60340
f6384702a1b6 Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-146
Miles Bader <miles@gnu.org>
parents: 52708
diff changeset
52 MKDIR='mkdir -p'
39041
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
53
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
54 # Used to execute commands once once we create them
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
55 EXEC='sh'
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
56
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
57 NAWK=/usr/bin/nawk
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
58
49088
a22f8991ae27 Unset LANG etc. to avoid non-standard command output from non-C locales.
Miles Bader <miles@gnu.org>
parents: 45539
diff changeset
59 # avoid non-standard command output from non-C locales
a22f8991ae27 Unset LANG etc. to avoid non-standard command output from non-C locales.
Miles Bader <miles@gnu.org>
parents: 45539
diff changeset
60 unset LANG LC_ALL LC_MESSAGES
a22f8991ae27 Unset LANG etc. to avoid non-standard command output from non-C locales.
Miles Bader <miles@gnu.org>
parents: 45539
diff changeset
61
39041
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
62 # Some messages
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
63 USAGE="Usage: $me [OPTION...] BUILD_TREE [PREFIX]"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
64 TRY="Try "\`"$me --help' for more information."
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
65
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
66 # Parse command-line options
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
67 while :; do
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
68 case "$1" in
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
69 -n|--dry-run)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
70 EXEC=cat; shift;;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
71 -p|--prune)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
72 PRUNE=yes; shift;;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
73 -P|--no-prune)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
74 PRUNE=no; shift;;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
75 --prune-only)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
76 PRUNE=only; shift;;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
77 -f|--force)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
78 FORCE=yes; shift;;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
79 -v|--verbose)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
80 VERBOSE="-v"; shift;;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
81 --help)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
82 cat <<EOF
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
83 $USAGE
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
84 Install emacs quickly
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
85
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
86 -n, --dry-run print installation commands instead of
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
87 executing them
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
88
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
89 -f, --force install even files that haven't changed
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
90 -v, --verbose print messages describing what is done
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
91
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
92 -p, --prune prune old generated files
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
93 -P, --no-prune don't prune old generated files (default)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
94 --prune-only prune old generated files, but don't install
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
95
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
96 --help display this help and exit
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
97 --version output version information and exit
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
98
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
99 $me install emacs \`incrementally,' that is, it will
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
100 install only those files that have changed since the last time it was
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
101 invoked, and remove any obsolete files from the installation
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
102 directories. It also uses hard-links into the source and build trees to
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
103 do the install, so it uses much less space than the default Makefile
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
104 install target; however, this also means that $me can
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
105 not install onto a disk partition other than the one on which the source
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
106 and build directories reside.
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
107
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
108 Optionally, $me can also remove old versions of
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
109 automatically generated files that are version-specific (such as the
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
110 versioned emacs executables in the \`src' directory, and the DOC-* files
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
111 in the \`etc' directory). The latter action is called \`pruning,' and
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
112 can be enabled using the \`-p' or \`--prune' options.
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
113 EOF
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
114 exit 0
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
115 ;;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
116 --version)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
117 cat <<EOF
49089
6f9b527df5c6 Update version number.
Miles Bader <miles@gnu.org>
parents: 49088
diff changeset
118 $me 1.6
39041
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
119
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
120 Written by Miles Bader <miles@gnu.org>
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
121 EOF
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
122 exit 0
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
123 ;;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
124 -[^-]?*)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
125 # split concatenated single-letter options apart
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
126 FIRST="$1"; shift
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
127 set -- `echo $FIRST | sed 's/-\(.\)\(.*\)/-\1 -\2/'` "$@"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
128 ;;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
129 -*)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
130 echo 1>&2 "$me: unrecognized option "\`"$1'"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
131 echo 1>&2 "$TRY"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
132 exit 1
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
133 ;;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
134 *)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
135 break;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
136 esac
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
137 done
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
138
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
139 LINK_CMD="$LINK $VERBOSE"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
140 REMOVE_CMD="$REMOVE $VERBOSE"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
141
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
142 case $# in
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
143 1) BUILD="$1";;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
144 2) BUILD="$1"; prefix="$2";;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
145 *)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
146 echo 1>&2 "$USAGE"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
147 echo 1>&2 "$TRY"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
148 exit 1
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
149 ;;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
150 esac
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
151
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
152 if test ! -d "$BUILD"; then
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
153 echo 1>&2 "$me: $BUILD: Build tree not found"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
154 exit 2
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
155 elif test ! -r "$BUILD/config.status"; then
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
156 echo 1>&2 "$me: $BUILD: Not a proper build tree, config.status not found"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
157 exit 2
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
158 fi
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
159
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
160 CONFIG_STATUS="$BUILD/config.status"
52708
8f70aecafdb5 Revision: miles@gnu.org--gnu-2003/emacs--cvs-trunk--0--patch-68
Miles Bader <miles@gnu.org>
parents: 52634
diff changeset
161 get_config_var ()
8f70aecafdb5 Revision: miles@gnu.org--gnu-2003/emacs--cvs-trunk--0--patch-68
Miles Bader <miles@gnu.org>
parents: 52634
diff changeset
162 {
75015
65f7f7adff78 Fix admin/quick-install-emacs to work with recent versions of autoconf
Miles Bader <miles@gnu.org>
parents: 60340
diff changeset
163 if ! sed -n "s/^s\(.\)@$1@\1\(|#_!!_#|\)*\(.*\)\1.*$/\3/p" $CONFIG_STATUS | sed q | grep ''
39041
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
164 then
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
165 echo 1>&2 "$me: $1: Configuration variable not found in $CONFIG_STATUS"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
166 exit 4
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
167 fi
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
168 }
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
169
40064
90451d9e7e0e Exit if we can't find some variable.
Miles Bader <miles@gnu.org>
parents: 39041
diff changeset
170 test x"$SRC" = x && { SRC="`get_config_var srcdir`" || exit 4 ; }
90451d9e7e0e Exit if we can't find some variable.
Miles Bader <miles@gnu.org>
parents: 39041
diff changeset
171 test x"$prefix" = x && { prefix="`get_config_var prefix`" || exit 4 ; }
90451d9e7e0e Exit if we can't find some variable.
Miles Bader <miles@gnu.org>
parents: 39041
diff changeset
172 test x"$ARCH" = x && { ARCH="`get_config_var host`" || exit 4 ; }
39041
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
173
45539
99b2cc9b795c (VERSION): Calculate using the same method that configure.in uses.
Miles Bader <miles@gnu.org>
parents: 44112
diff changeset
174 VERSION=`grep 'defconst[ ]*emacs-version' $SRC/lisp/version.el \
99b2cc9b795c (VERSION): Calculate using the same method that configure.in uses.
Miles Bader <miles@gnu.org>
parents: 44112
diff changeset
175 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
99b2cc9b795c (VERSION): Calculate using the same method that configure.in uses.
Miles Bader <miles@gnu.org>
parents: 44112
diff changeset
176
39041
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
177 DST_SHARE="$prefix/share/emacs/$VERSION"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
178 DST_BIN="$prefix/bin"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
179 DST_LIBEXEC="$prefix/libexec/emacs/$VERSION/$ARCH"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
180 DST_INFO="$prefix/info"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
181
52708
8f70aecafdb5 Revision: miles@gnu.org--gnu-2003/emacs--cvs-trunk--0--patch-68
Miles Bader <miles@gnu.org>
parents: 52634
diff changeset
182 maybe_mkdir ()
8f70aecafdb5 Revision: miles@gnu.org--gnu-2003/emacs--cvs-trunk--0--patch-68
Miles Bader <miles@gnu.org>
parents: 52634
diff changeset
183 {
39041
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
184 if ! test -d "$1"; then
60340
f6384702a1b6 Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-146
Miles Bader <miles@gnu.org>
parents: 52708
diff changeset
185 $MKDIR $VERBOSE "$1" 2>&1 | sed "s/^mkdir:/$me:/" 1>&2
39041
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
186 fi
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
187 }
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
188
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
189 maybe_mkdir "$DST_BIN"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
190 maybe_mkdir "$DST_SHARE"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
191 maybe_mkdir "$DST_SHARE/site-lisp"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
192 maybe_mkdir "$DST_LIBEXEC"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
193 maybe_mkdir "$DST_INFO"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
194
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
195 ( # start of command-generating sub-shell
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
196
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
197 PRUNED=""
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
198 if test x"$PRUNE" != xno; then
44112
271a4f9d12fc (PRUNED): Avoid "head -1" and "tail +2", as POSIX 1003.1-2001
Paul Eggert <eggert@twinsun.com>
parents: 40064
diff changeset
199 for D in `ls -1t $BUILD/etc/DOC-* | sed 1d`; do
39041
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
200 echo $REMOVE_CMD $D
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
201 PRUNED="$PRUNED $D"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
202 done
44112
271a4f9d12fc (PRUNED): Avoid "head -1" and "tail +2", as POSIX 1003.1-2001
Paul Eggert <eggert@twinsun.com>
parents: 40064
diff changeset
203 for D in `ls -1t $BUILD/src/emacs-$VERSION.* | sed 1d`; do
39041
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
204 echo $REMOVE_CMD $D
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
205 PRUNED="$PRUNED $D"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
206 done
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
207 fi
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
208
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
209 test x"$PRUNE" = xonly && exit 0
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
210
52708
8f70aecafdb5 Revision: miles@gnu.org--gnu-2003/emacs--cvs-trunk--0--patch-68
Miles Bader <miles@gnu.org>
parents: 52634
diff changeset
211 maybe_emit_copy ()
8f70aecafdb5 Revision: miles@gnu.org--gnu-2003/emacs--cvs-trunk--0--patch-68
Miles Bader <miles@gnu.org>
parents: 52634
diff changeset
212 {
39041
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
213 if test "$FORCE" = yes || ! cmp -s $1 $2; then
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
214 echo $LINK_CMD $1 $2
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
215 fi
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
216 }
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
217
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
218 maybe_emit_copy $BUILD/src/emacs $DST_BIN/emacs
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
219 maybe_emit_copy $BUILD/src/emacs $DST_BIN/emacs-$VERSION
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
220
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
221 for F in $PUBLIC_LIBSRC_BINARIES; do
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
222 maybe_emit_copy $BUILD/lib-src/$F $DST_BIN/$F
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
223 done
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
224 for F in $PUBLIC_LIBSRC_SCRIPTS; do
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
225 maybe_emit_copy $SRC/lib-src/$F $DST_BIN/$F
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
226 done
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
227
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
228 if test x"$SRC" = x"$BUILD"; then
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
229 PFXS="$BUILD"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
230 else
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
231 PFXS="$SRC $BUILD"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
232 fi
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
233
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
234 for SUBDIR in lisp leim etc lib-src info; do
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
235 # defaults
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
236 SHARED=no
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
237 FORCED=''
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
238 AVOID_PAT="`echo "($AVOID)" | tr ' ' '|'`"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
239
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
240 # Set subdir-specific values
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
241 case $SUBDIR in
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
242 lisp|leim)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
243 DST="$DST_SHARE/$SUBDIR"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
244 ;;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
245 etc)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
246 DST="$DST_SHARE/$SUBDIR"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
247 # COPYING is in the avoid list, but there should be a copy of it in
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
248 # the install etc dir, so make that here.
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
249 FORCED="$DST/COPYING"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
250 ;;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
251 lib-src)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
252 DST="$DST_LIBEXEC"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
253 AVOID_PAT="`echo "($AVOID ($PUBLIC_LIBSRC_BINARIES $PUBLIC_LIBSRC_SCRIPTS)\$)" | tr ' ' '|'`"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
254 ;;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
255 info)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
256 DST="$DST_INFO"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
257 SHARED=yes
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
258 ;;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
259 esac
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
260
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
261 for PFX in $PFXS; do
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
262 if [ -d $PFX/$SUBDIR ]; then
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
263 for DIR in `(cd $PFX/$SUBDIR; find . -type d -print | sed 's@^./@@')`; do
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
264 if [ -d $DST/$DIR ]; then
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
265 echo Directory $DST/$DIR exists
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
266 else
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
267 echo Directory $DST/$DIR non-existant
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
268 if [ "`echo $DIR | egrep -v "$AVOID_PAT"`" ]; then
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
269 maybe_mkdir $DST/$DIR
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
270 fi
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
271 fi
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
272 done
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
273 diff -sqr $PFX/$SUBDIR $DST
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
274 fi
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
275 done | $NAWK '
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
276 BEGIN {
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
277 src_pat = "^'"$SRC"'/'"$SUBDIR"'/"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
278 build_pat = "^'"$BUILD"'/'"$SUBDIR"'/"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
279 dst_pat = "^'"$DST"'/"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
280 dst_pfx = "'"$DST"'/"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
281 avoid_pat = "'"$AVOID_PAT"'"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
282 force = ("'"$FORCE"'" == "yes")
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
283 shared = ("'"$SHARED"'" == "yes")
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
284 init_bool_array(pruned, "'"$PRUNED"'")
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
285 init_bool_array(forced, "'"$FORCED"'")
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
286 }
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
287 function init_bool_array(array, string, a,k)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
288 {
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
289 split (string, a)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
290 for (k in a)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
291 array[a[k]] = 1
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
292 }
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
293 function install(src, dst)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
294 {
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
295 if (! (src in pruned)) {
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
296 cp[src] = dst;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
297 from[dst] = src;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
298 delete rm[dst];
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
299 }
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
300 }
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
301 function update(src, dst, copy)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
302 {
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
303 if (src in pruned) {
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
304 rm[dst] = 1;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
305 delete from[dst]
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
306 } else {
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
307 if (copy)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
308 cp[src] = dst;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
309 from[dst] = src;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
310 delete rm[dst];
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
311 }
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
312 }
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
313 function uninstall(dst)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
314 {
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
315 if (!(dst in from))
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
316 rm[dst] = 1;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
317 }
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
318 /^Directory / {
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
319 if ($2 ~ avoid_pat) {
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
320 if ($NF == "exists")
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
321 uninstall($2)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
322 } else
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
323 update(0, $2, 0)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
324 next
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
325 }
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
326 /^Files / {
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
327 if ($4 ~ avoid_pat && !($4 in forced))
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
328 uninstall($4)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
329 else if ($NF == "identical")
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
330 update($2, $4, force)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
331 else
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
332 update($2, $4, 1)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
333 next
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
334 }
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
335 /^Only / {
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
336 pfx = $3
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
337 sub (/:$/, "/", pfx)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
338
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
339 if (pfx ~ dst_pat) {
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
340 if (! shared)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
341 uninstall(pfx $4)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
342 } else {
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
343 subdir = pfx
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
344 if (subdir ~ src_pat)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
345 sub (src_pat, "", subdir)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
346 else
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
347 sub (build_pat, "", subdir)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
348
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
349 dst = dst_pfx subdir $4
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
350 if (! (dst ~ avoid_pat))
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
351 install(pfx $4, dst)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
352 }
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
353 next
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
354 }
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
355 END {
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
356 for (f in rm)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
357 print "'"$REMOVE_CMD"' " f
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
358 for (f in cp)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
359 print "'"$LINK_CMD"' " f " " cp[f]
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
360 }
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
361 '
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
362 done
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
363
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
364 ) | eval $EXEC
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 52260
diff changeset
365
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 52260
diff changeset
366 # arch-tag: 9322b572-9755-4cf7-a67a-21e6505f1477