Mercurial > emacs
annotate admin/quick-install-emacs @ 49612:407d6516031a
2003-02-05 Kai Gro?ohann <kai.grossjohann@uni-duisburg.de>
Version 2.0.29 released.
* net/tramp.el (tramp-send-region): Protect against
tramp-chunksize being nil.
2003-02-04 Michael Albinus <Michael.Albinus@alcatel.de>
* net/tramp.el (tramp-handle-directory-file-name): Handle the case
PATH is "".
(tramp-completion-handle-file-name-all-completions): Define
`tramp-current-user' locally. See `tramp-parse-passwd'.
(tramp-parse-passwd): For su-alike methods it would be desirable
to return "root@localhost" as default. Unfortunately, we have no
information whether any user name has been typed already. So we
(mis-)use tramp-current-user as indication, assuming it is set in
`tramp-completion-handle-file-name-all-completions'.
(tramp-send-region): Handle the case `tramp-chunksize' is equal
0. I did it accidently. Infinite loop ...
* net/tramp-ftp.el (top-level): eval-after-load "ange-ftp"
'(tramp-disable-ange-ftp). Suggested by Kai.
(tramp-ftp-file-name-handler): `tramp-disable-ange-ftp' not needed
any longer.
* net/tramp-smb.el (tramp-smb-file-name-handler-alist): Apply
`tramp-handle-directory-file-name' in order to profit from Kai's
yesterday changes.
2003-02-03 Kai Gro?ohann <kai.grossjohann@uni-duisburg.de>
* net/tramp.el (tramp-chunksize): Set default to 500 as workaround
for some ssh connections.
(tramp-handle-directory-file-name): New implementation. Not sure
if it works.
2003-01-28 Michael Albinus <Michael.Albinus@alcatel.de>
* net/tramp.el (tramp-get-device): `tramp-make-tramp-file-name'
must not be called with NIL path. It fails in case of
multi-method.
2003-01-27 Michael Albinus <Michael.Albinus@alcatel.de>
* net/tramp.el (tramp-file-name-for-operation): Apply
`expand-file-name' for relative file names only. Otherwise there
might be problems if the default directory is another Tramp
directory as the directory the file is based on.
(tramp-find-foreign-file-name-handler): Check whether FILENAME is
a Tramp file name. It isn't if it comes from an expanded file
name (like "/xx:yy//zz").
2003-01-25 Michael Albinus <Michael.Albinus@alcatel.de>
* net/tramp.el (tramp-devices): New variable. Keeps virtual
device numbers. Devices must distinguish physical file systems.
The device numbers provided by "lstat" aren't unique, because we
operate on different hosts. So we use virtual device numbers,
generated by `tramp-get-device'. Both Ange-FTP and EFS use device
number -1. In order to be different, we use device number (-1 x),
whereby "x" is unique for a given (multi-method method user host).
Suggested by Kai.
(tramp-perl-file-attributes): Always return device number -1.
There will be a virtual device number set in
`tramp-handle-file-attributes', which replaces this one.
(tramp-handle-file-attributes): Set virtual device number.
(tramp-get-device): New function. Returns the virtual device
number. If it doesn't exist, generate a new one.
(tramp-handle-file-regular-p): Use Emacs file name primitives
instead of calling tramp-handle-* equivalents directly. Needed
for tramp-smb.
* net/tramp-smb.el (tramp-smb-devices, tramp-smb-get-device): Removed.
Functionality moved to tramp.el.
(tramp-smb-handle-file-attributes): Apply
`tramp-get-device'. ATIME and CTIME are (0 0) now (= "don't
know"), which is more honest.
(tramp-smb-handle-make-directory): Use Emacs file name primitives
instead of calling tramp-smb-handle-* equivalents directly.
(tramp-smb-read-file-entry): Return size as a number but a string.
2003-01-24 Michael Albinus <Michael.Albinus@alcatel.de>
* net/tramp.el (tramp-completion-function-alist-ssh): Add parsing
of "/etc/ssh_config" and "~/.ssh/config". Suggested by Kai.
(tramp-completion-function-alist, tramp-set-completion-function):
Doc string update.
(tramp-parse-sconfig, tramp-parse-sconfig-group): New functions.
Provide parsing of "~/.ssh/config" style files.
2003-01-21 Michael Albinus <Michael.Albinus@alcatel.de>
* net/tramp.el (tramp-completion-handle-expand-file-name): Apply
`tramp-drop-volume-letter'. Otherwise, there are problems on W32
systems.
2003-01-21 Michael Albinus <Michael.Albinus@alcatel.de>
* net/tramp-smb.el (tramp-smb-get-device, tramp-smb-get-inode): New
functions. Device number and inode number don't exist for SMB
files. Therefore we must generate virtual ones.
(tramp-smb-devices, tramp-smb-inodes): New variables. Keep
generated virtual device numbers and inodes numbers for SMB files.
(tramp-smb-handle-file-attributes): Apply them.
2003-01-14 Kai Gro?ohann <kai.grossjohann@uni-duisburg.de>
* net/tramp.el (tramp-md5-function): Require md5 before checking
function md5. If using md5-encode, put wrapper around it that
converts vector of bytes to ascii text.
2003-01-13 Michael Albinus <Michael.Albinus@alcatel.de>
* net/tramp.el (tramp-completion-mode): Perform check (integerp
last-input-event) before (event-modifiers last-input-event) -
there might be problems if `last-input-event' is a mouse event.
2003-01-12 Michael Albinus <Michael.Albinus@alcatel.de>
* net/tramp.el (tramp-parse-rhosts, tramp-parse-shosts)
(tramp-parse-hosts, tramp-parse-passwd, tramp-parse-netrc): Use
`file-readable-p' instead of `file-exists-p'. Otherwise these
functions might block. Reported by <kin@neoscale.com>.
2003-01-02 Michael Albinus <Michael.Albinus@alcatel.de>
* net/tramp-ftp.el (top-level): Defaults for
`tramp-default-method-alist' must be a list.
* net/tramp-smb.el (top-level): Defaults for
`tramp-default-method-alist' must be a list.
2003-01-02 Kai Gro?ohann <kai.grossjohann@uni-duisburg.de>
* net/tramp.el (top-level): Avoid byte-compiler warnings of unused
variables if the byte-compiler supports this. This is for the
with-parsed-tramp-file-name macro which is wont to produce such
stuff.
author | Kai Großjohann <kgrossjo@eu.uu.net> |
---|---|
date | Wed, 05 Feb 2003 21:03:36 +0000 |
parents | 6f9b527df5c6 |
children | fe4a18479819 d7ddb3e565de |
rev | line source |
---|---|
39041 | 1 #!/bin/sh |
2 # quick-install-emacs -- do a halfway-decent job of installing emacs quickly | |
3 # Written by Miles Bader <miles@gnu.org> | |
4 | |
5 # This script is mainly intended for emacs maintainer or pretesters who | |
6 # install emacs very often. See the --help output for more details. | |
7 | |
8 PUBLIC_LIBSRC_BINARIES='b2m emacsclient etags ctags ebrowse' | |
9 PUBLIC_LIBSRC_SCRIPTS='grep-changelog rcs-checkin' | |
10 | |
40064
90451d9e7e0e
Exit if we can't find some variable.
Miles Bader <miles@gnu.org>
parents:
39041
diff
changeset
|
11 AVOID="CVS -DIC README COPYING ChangeLog ~ \.orig$ \.rej$ Makefile makefile stamp-subdir .cvsignore \.[cho]$ make-docfile testfile test-distrib" |
39041 | 12 |
13 # Prune old binaries lying around in the source tree | |
14 PRUNE=no | |
15 # Re-install files even if they already exist | |
16 FORCE=no | |
17 # Command verbose flag | |
18 VERBOSE='' | |
19 | |
20 me="`basename $0`" | |
21 | |
22 # Install commands (these commands are also expected to understand the | |
23 # GNU -v (--verbose) option) | |
24 LINK='cp -lf' | |
25 COPY='cp -f' | |
26 REMOVE='rm -r' | |
27 | |
28 # Used to execute commands once once we create them | |
29 EXEC='sh' | |
30 MKDIR='mkdir --verbose -p' | |
31 | |
32 NAWK=/usr/bin/nawk | |
33 | |
49088
a22f8991ae27
Unset LANG etc. to avoid non-standard command output from non-C locales.
Miles Bader <miles@gnu.org>
parents:
45539
diff
changeset
|
34 # 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
|
35 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
|
36 |
39041 | 37 # Some messages |
38 USAGE="Usage: $me [OPTION...] BUILD_TREE [PREFIX]" | |
39 TRY="Try "\`"$me --help' for more information." | |
40 | |
41 # Parse command-line options | |
42 while :; do | |
43 case "$1" in | |
44 -n|--dry-run) | |
45 EXEC=cat; shift;; | |
46 -p|--prune) | |
47 PRUNE=yes; shift;; | |
48 -P|--no-prune) | |
49 PRUNE=no; shift;; | |
50 --prune-only) | |
51 PRUNE=only; shift;; | |
52 -f|--force) | |
53 FORCE=yes; shift;; | |
54 -v|--verbose) | |
55 VERBOSE="-v"; shift;; | |
56 --help) | |
57 cat <<EOF | |
58 $USAGE | |
59 Install emacs quickly | |
60 | |
61 -n, --dry-run print installation commands instead of | |
62 executing them | |
63 | |
64 -f, --force install even files that haven't changed | |
65 -v, --verbose print messages describing what is done | |
66 | |
67 -p, --prune prune old generated files | |
68 -P, --no-prune don't prune old generated files (default) | |
69 --prune-only prune old generated files, but don't install | |
70 | |
71 --help display this help and exit | |
72 --version output version information and exit | |
73 | |
74 $me install emacs \`incrementally,' that is, it will | |
75 install only those files that have changed since the last time it was | |
76 invoked, and remove any obsolete files from the installation | |
77 directories. It also uses hard-links into the source and build trees to | |
78 do the install, so it uses much less space than the default Makefile | |
79 install target; however, this also means that $me can | |
80 not install onto a disk partition other than the one on which the source | |
81 and build directories reside. | |
82 | |
83 Optionally, $me can also remove old versions of | |
84 automatically generated files that are version-specific (such as the | |
85 versioned emacs executables in the \`src' directory, and the DOC-* files | |
86 in the \`etc' directory). The latter action is called \`pruning,' and | |
87 can be enabled using the \`-p' or \`--prune' options. | |
88 EOF | |
89 exit 0 | |
90 ;; | |
91 --version) | |
92 cat <<EOF | |
49089 | 93 $me 1.6 |
39041 | 94 |
95 Written by Miles Bader <miles@gnu.org> | |
96 EOF | |
97 exit 0 | |
98 ;; | |
99 -[^-]?*) | |
100 # split concatenated single-letter options apart | |
101 FIRST="$1"; shift | |
102 set -- `echo $FIRST | sed 's/-\(.\)\(.*\)/-\1 -\2/'` "$@" | |
103 ;; | |
104 -*) | |
105 echo 1>&2 "$me: unrecognized option "\`"$1'" | |
106 echo 1>&2 "$TRY" | |
107 exit 1 | |
108 ;; | |
109 *) | |
110 break; | |
111 esac | |
112 done | |
113 | |
114 LINK_CMD="$LINK $VERBOSE" | |
115 REMOVE_CMD="$REMOVE $VERBOSE" | |
116 | |
117 case $# in | |
118 1) BUILD="$1";; | |
119 2) BUILD="$1"; prefix="$2";; | |
120 *) | |
121 echo 1>&2 "$USAGE" | |
122 echo 1>&2 "$TRY" | |
123 exit 1 | |
124 ;; | |
125 esac | |
126 | |
127 if test ! -d "$BUILD"; then | |
128 echo 1>&2 "$me: $BUILD: Build tree not found" | |
129 exit 2 | |
130 elif test ! -r "$BUILD/config.status"; then | |
131 echo 1>&2 "$me: $BUILD: Not a proper build tree, config.status not found" | |
132 exit 2 | |
133 fi | |
134 | |
135 CONFIG_STATUS="$BUILD/config.status" | |
136 function get_config_var () { | |
44112
271a4f9d12fc
(PRUNED): Avoid "head -1" and "tail +2", as POSIX 1003.1-2001
Paul Eggert <eggert@twinsun.com>
parents:
40064
diff
changeset
|
137 if ! sed -n "s/^s\(.\)@$1@\1\(.*\)\1.*$/\2/p" $CONFIG_STATUS | sed q | grep '' |
39041 | 138 then |
139 echo 1>&2 "$me: $1: Configuration variable not found in $CONFIG_STATUS" | |
140 exit 4 | |
141 fi | |
142 } | |
143 | |
40064
90451d9e7e0e
Exit if we can't find some variable.
Miles Bader <miles@gnu.org>
parents:
39041
diff
changeset
|
144 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
|
145 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
|
146 test x"$ARCH" = x && { ARCH="`get_config_var host`" || exit 4 ; } |
39041 | 147 |
45539
99b2cc9b795c
(VERSION): Calculate using the same method that configure.in uses.
Miles Bader <miles@gnu.org>
parents:
44112
diff
changeset
|
148 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
|
149 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'` |
99b2cc9b795c
(VERSION): Calculate using the same method that configure.in uses.
Miles Bader <miles@gnu.org>
parents:
44112
diff
changeset
|
150 |
39041 | 151 DST_SHARE="$prefix/share/emacs/$VERSION" |
152 DST_BIN="$prefix/bin" | |
153 DST_LIBEXEC="$prefix/libexec/emacs/$VERSION/$ARCH" | |
154 DST_INFO="$prefix/info" | |
155 | |
156 function maybe_mkdir () { | |
157 if ! test -d "$1"; then | |
158 $MKDIR "$1" 2>&1 | sed "s/^mkdir:/$me:/" 1>&2 | |
159 fi | |
160 } | |
161 | |
162 maybe_mkdir "$DST_BIN" | |
163 maybe_mkdir "$DST_SHARE" | |
164 maybe_mkdir "$DST_SHARE/site-lisp" | |
165 maybe_mkdir "$DST_LIBEXEC" | |
166 maybe_mkdir "$DST_INFO" | |
167 | |
168 ( # start of command-generating sub-shell | |
169 | |
170 PRUNED="" | |
171 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
|
172 for D in `ls -1t $BUILD/etc/DOC-* | sed 1d`; do |
39041 | 173 echo $REMOVE_CMD $D |
174 PRUNED="$PRUNED $D" | |
175 done | |
44112
271a4f9d12fc
(PRUNED): Avoid "head -1" and "tail +2", as POSIX 1003.1-2001
Paul Eggert <eggert@twinsun.com>
parents:
40064
diff
changeset
|
176 for D in `ls -1t $BUILD/src/emacs-$VERSION.* | sed 1d`; do |
39041 | 177 echo $REMOVE_CMD $D |
178 PRUNED="$PRUNED $D" | |
179 done | |
44112
271a4f9d12fc
(PRUNED): Avoid "head -1" and "tail +2", as POSIX 1003.1-2001
Paul Eggert <eggert@twinsun.com>
parents:
40064
diff
changeset
|
180 for D in `ls -1t $BUILD/lib-src/fns-* | sed 1d`; do |
39041 | 181 echo $REMOVE_CMD $D |
182 PRUNED="$PRUNED $D" | |
183 done | |
184 fi | |
185 | |
186 test x"$PRUNE" = xonly && exit 0 | |
187 | |
188 function maybe_emit_copy () { | |
189 if test "$FORCE" = yes || ! cmp -s $1 $2; then | |
190 echo $LINK_CMD $1 $2 | |
191 fi | |
192 } | |
193 | |
194 maybe_emit_copy $BUILD/src/emacs $DST_BIN/emacs | |
195 maybe_emit_copy $BUILD/src/emacs $DST_BIN/emacs-$VERSION | |
196 | |
197 for F in $PUBLIC_LIBSRC_BINARIES; do | |
198 maybe_emit_copy $BUILD/lib-src/$F $DST_BIN/$F | |
199 done | |
200 for F in $PUBLIC_LIBSRC_SCRIPTS; do | |
201 maybe_emit_copy $SRC/lib-src/$F $DST_BIN/$F | |
202 done | |
203 | |
204 if test x"$SRC" = x"$BUILD"; then | |
205 PFXS="$BUILD" | |
206 else | |
207 PFXS="$SRC $BUILD" | |
208 fi | |
209 | |
210 for SUBDIR in lisp leim etc lib-src info; do | |
211 # defaults | |
212 SHARED=no | |
213 FORCED='' | |
214 AVOID_PAT="`echo "($AVOID)" | tr ' ' '|'`" | |
215 | |
216 # Set subdir-specific values | |
217 case $SUBDIR in | |
218 lisp|leim) | |
219 DST="$DST_SHARE/$SUBDIR" | |
220 ;; | |
221 etc) | |
222 DST="$DST_SHARE/$SUBDIR" | |
223 # COPYING is in the avoid list, but there should be a copy of it in | |
224 # the install etc dir, so make that here. | |
225 FORCED="$DST/COPYING" | |
226 ;; | |
227 lib-src) | |
228 DST="$DST_LIBEXEC" | |
229 AVOID_PAT="`echo "($AVOID ($PUBLIC_LIBSRC_BINARIES $PUBLIC_LIBSRC_SCRIPTS)\$)" | tr ' ' '|'`" | |
230 ;; | |
231 info) | |
232 DST="$DST_INFO" | |
233 SHARED=yes | |
234 ;; | |
235 esac | |
236 | |
237 for PFX in $PFXS; do | |
238 if [ -d $PFX/$SUBDIR ]; then | |
239 for DIR in `(cd $PFX/$SUBDIR; find . -type d -print | sed 's@^./@@')`; do | |
240 if [ -d $DST/$DIR ]; then | |
241 echo Directory $DST/$DIR exists | |
242 else | |
243 echo Directory $DST/$DIR non-existant | |
244 if [ "`echo $DIR | egrep -v "$AVOID_PAT"`" ]; then | |
245 maybe_mkdir $DST/$DIR | |
246 fi | |
247 fi | |
248 done | |
249 diff -sqr $PFX/$SUBDIR $DST | |
250 fi | |
251 done | $NAWK ' | |
252 BEGIN { | |
253 src_pat = "^'"$SRC"'/'"$SUBDIR"'/" | |
254 build_pat = "^'"$BUILD"'/'"$SUBDIR"'/" | |
255 dst_pat = "^'"$DST"'/" | |
256 dst_pfx = "'"$DST"'/" | |
257 avoid_pat = "'"$AVOID_PAT"'" | |
258 force = ("'"$FORCE"'" == "yes") | |
259 shared = ("'"$SHARED"'" == "yes") | |
260 init_bool_array(pruned, "'"$PRUNED"'") | |
261 init_bool_array(forced, "'"$FORCED"'") | |
262 } | |
263 function init_bool_array(array, string, a,k) | |
264 { | |
265 split (string, a) | |
266 for (k in a) | |
267 array[a[k]] = 1 | |
268 } | |
269 function install(src, dst) | |
270 { | |
271 if (! (src in pruned)) { | |
272 cp[src] = dst; | |
273 from[dst] = src; | |
274 delete rm[dst]; | |
275 } | |
276 } | |
277 function update(src, dst, copy) | |
278 { | |
279 if (src in pruned) { | |
280 rm[dst] = 1; | |
281 delete from[dst] | |
282 } else { | |
283 if (copy) | |
284 cp[src] = dst; | |
285 from[dst] = src; | |
286 delete rm[dst]; | |
287 } | |
288 } | |
289 function uninstall(dst) | |
290 { | |
291 if (!(dst in from)) | |
292 rm[dst] = 1; | |
293 } | |
294 /^Directory / { | |
295 if ($2 ~ avoid_pat) { | |
296 if ($NF == "exists") | |
297 uninstall($2) | |
298 } else | |
299 update(0, $2, 0) | |
300 next | |
301 } | |
302 /^Files / { | |
303 if ($4 ~ avoid_pat && !($4 in forced)) | |
304 uninstall($4) | |
305 else if ($NF == "identical") | |
306 update($2, $4, force) | |
307 else | |
308 update($2, $4, 1) | |
309 next | |
310 } | |
311 /^Only / { | |
312 pfx = $3 | |
313 sub (/:$/, "/", pfx) | |
314 | |
315 if (pfx ~ dst_pat) { | |
316 if (! shared) | |
317 uninstall(pfx $4) | |
318 } else { | |
319 subdir = pfx | |
320 if (subdir ~ src_pat) | |
321 sub (src_pat, "", subdir) | |
322 else | |
323 sub (build_pat, "", subdir) | |
324 | |
325 dst = dst_pfx subdir $4 | |
326 if (! (dst ~ avoid_pat)) | |
327 install(pfx $4, dst) | |
328 } | |
329 next | |
330 } | |
331 END { | |
332 for (f in rm) | |
333 print "'"$REMOVE_CMD"' " f | |
334 for (f in cp) | |
335 print "'"$LINK_CMD"' " f " " cp[f] | |
336 } | |
337 ' | |
338 done | |
339 | |
340 ) | eval $EXEC |