comparison lisp/update-elc.el @ 510:5bdbc721d46a

[xemacs-hg @ 2001-05-06 08:33:35 by ben] implement printing the selection when it's selected. force redisplay when set-charset-ccl-program called. if bytecomp or byte-optimize need recompiling, then load the .el version of them first, recompile them, and reload the .elc versions to recompile everything else (so we won't be waiting until the cows come home).
author ben
date Sun, 06 May 2001 08:33:41 +0000
parents abe6d1db359e
children ef4d2466a29c
comparison
equal deleted inserted replaced
509:68eb53e4b7e5 510:5bdbc721d46a
97 (packages-collect-package-dumped-lisps late-package-load-path))) 97 (packages-collect-package-dumped-lisps late-package-load-path)))
98 98
99 (setq preloaded-file-list 99 (setq preloaded-file-list
100 (append package-preloaded-file-list 100 (append package-preloaded-file-list
101 preloaded-file-list 101 preloaded-file-list
102 '("bytecomp") 102 '("bytecomp" "byte-optimize")
103 packages-hardcoded-lisp))) 103 packages-hardcoded-lisp)))
104 104
105 (load (concat default-directory "../site-packages") t t) 105 (load (concat default-directory "../site-packages") t t)
106 (setq preloaded-file-list 106 (setq preloaded-file-list
107 (append packages-hardcoded-lisp 107 (append packages-hardcoded-lisp
164 164
165 ;; (print (prin1-to-string update-elc-files-to-compile)) 165 ;; (print (prin1-to-string update-elc-files-to-compile))
166 166
167 (if update-elc-files-to-compile 167 (if update-elc-files-to-compile
168 (progn 168 (progn
169 (setq command-line-args 169 (let ((bytecomp-arg (locate-library "bytecomp"))
170 (append '("-l" "loadup-el.el" "run-temacs" 170 (byte-opt-arg (locate-library "byte-optimize")))
171 "-batch" "-q" "-no-site-file" 171 (if (string-match "\\.elc?\\'" bytecomp-arg)
172 "-l" "bytecomp" "-f" "batch-byte-compile") 172 (setq bytecomp-arg (substring bytecomp-arg 0
173 update-elc-files-to-compile)) 173 (match-beginning 0))))
174 (setq bytecomp-arg (concat bytecomp-arg ".el"))
175 (if (string-match "\\.elc?\\'" byte-opt-arg)
176 (setq byte-opt-arg (substring byte-opt-arg 0
177 (match-beginning 0))))
178 (setq byte-opt-arg (concat byte-opt-arg ".el"))
179 ;; if bytecomp or byte-optimize need recompiling, then load
180 ;; the .el version of them first, recompile them, and reload
181 ;; the .elc versions to recompile everything else (so we won't
182 ;; be waiting until the cows come home).
183 (setq command-line-args
184 (append '("-l" "loadup-el.el" "run-temacs"
185 "-batch" "-q" "-no-site-file")
186 (if (or
187 (member bytecomp-arg update-elc-files-to-compile)
188 (member byte-opt-arg update-elc-files-to-compile))
189 (append
190 '("-eval" "(setq load-ignore-elc-files t)"
191 "-l" "bytecomp")
192 (if (member bytecomp-arg
193 update-elc-files-to-compile)
194 (append '("-f" "batch-byte-compile-one-file")
195 (list bytecomp-arg)))
196 (if (member byte-opt-arg
197 update-elc-files-to-compile)
198 (append '("-f" "batch-byte-compile-one-file")
199 (list byte-opt-arg)))
200 '("-eval" "(setq load-ignore-elc-files nil)")))
201 '("-l" "bytecomp" "-f" "batch-byte-compile")
202 (delete byte-opt-arg
203 (delete bytecomp-arg
204 update-elc-files-to-compile)))))
174 (load "loadup-el.el")) 205 (load "loadup-el.el"))
175 (condition-case nil 206 (condition-case nil
176 (delete-file "../src/NOBYTECOMPILE") 207 (delete-file "../src/NOBYTECOMPILE")
177 (file-error nil))) 208 (file-error nil)))
178 209