0
|
1 ;; This file is part of XEmacs.
|
|
2
|
|
3 ;; XEmacs is free software; you can redistribute it and/or modify it
|
|
4 ;; under the terms of the GNU General Public License as published by
|
|
5 ;; the Free Software Foundation; either version 2, or (at your option)
|
|
6 ;; any later version.
|
|
7
|
|
8 ;; XEmacs is distributed in the hope that it will be useful, but
|
|
9 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
10 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
11 ;; General Public License for more details.
|
|
12
|
|
13 ;; You should have received a copy of the GNU General Public License
|
16
|
14 ;; along with XEmacs; see the file COPYING. If not, write to the
|
|
15 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
16 ;; Boston, MA 02111-1307, USA.
|
0
|
17
|
|
18 ;;; Synched up with: Not in FSF.
|
|
19
|
|
20 ;; Byte compile the .EL files necessary to dump out xemacs.
|
|
21 ;; Use this file like this:
|
|
22 ;;
|
|
23 ;; temacs -batch -l ../lisp/prim/update-elc.el $lisp
|
|
24 ;;
|
|
25 ;; where $lisp comes from the Makefile. .elc files listed in $lisp will
|
|
26 ;; cause the corresponding .el file to be compiled. .el files listed in
|
|
27 ;; $lisp will be ignored.
|
|
28 ;;
|
|
29 ;; (the idea here is that you can bootstrap if your .ELC files
|
|
30 ;; are missing or badly out-of-date)
|
|
31
|
|
32 (setq update-elc-files-to-compile
|
|
33 (delq nil
|
|
34 (mapcar (function
|
|
35 (lambda (x)
|
|
36 (if (string-match "\.elc$" x)
|
|
37 (let ((src (substring x 0 -1)))
|
|
38 (if (file-newer-than-file-p src x)
|
|
39 (progn
|
|
40 (and (file-exists-p x)
|
|
41 (null (file-writable-p x))
|
|
42 (set-file-modes x (logior (file-modes x) 128)))
|
|
43 src))))))
|
|
44 ;; -batch gets filtered out.
|
|
45 (nthcdr 3 command-line-args))))
|
|
46
|
|
47 (if update-elc-files-to-compile
|
|
48 (progn
|
|
49 (setq command-line-args
|
|
50 (cons (car command-line-args)
|
12
|
51 (append
|
|
52 '("-l" "loadup-el.el" "run-temacs"
|
|
53 "-batch" "-q" "-no-site-file"
|
|
54 "-l" "bytecomp" "-f" "batch-byte-compile")
|
|
55 update-elc-files-to-compile)))
|
0
|
56 (load "loadup-el.el")))
|
|
57
|
|
58 (kill-emacs)
|