Mercurial > hg > xemacs-beta
comparison lisp/update-elc.el @ 3511:1ee424086c62
[xemacs-hg @ 2006-07-16 12:23:57 by aidan]
Add docstrings to source-root, build-root, rename them
author | aidan |
---|---|
date | Sun, 16 Jul 2006 12:23:58 +0000 |
parents | c4c8a36043be |
children | 9fec7fedbf1b |
comparison
equal
deleted
inserted
replaced
3510:06a586083be3 | 3511:1ee424086c62 |
---|---|
77 ; src)))))) | 77 ; src)))))) |
78 ; ;; -batch gets filtered out. | 78 ; ;; -batch gets filtered out. |
79 ; (nthcdr 3 command-line-args)))) | 79 ; (nthcdr 3 command-line-args)))) |
80 | 80 |
81 | 81 |
82 (defvar build-root (expand-file-name ".." invocation-directory)) | 82 (defvar build-directory (expand-file-name ".." invocation-directory)) |
83 | |
83 (defvar source-lisp (file-name-directory (expand-file-name | 84 (defvar source-lisp (file-name-directory (expand-file-name |
84 (nth 2 command-line-args)))) | 85 (nth 2 command-line-args)))) |
86 | |
85 (defvar source-lisp-mule (expand-file-name "mule" source-lisp)) | 87 (defvar source-lisp-mule (expand-file-name "mule" source-lisp)) |
86 (defvar source-root (expand-file-name ".." source-lisp)) | 88 (defvar source-directory (expand-file-name ".." source-lisp)) |
87 (defvar aa-lisp (expand-file-name "auto-autoloads.el" source-lisp)) | 89 (defvar aa-lisp (expand-file-name "auto-autoloads.el" source-lisp)) |
88 (defvar aac-lisp (expand-file-name "auto-autoloads.elc" source-lisp)) | 90 (defvar aac-lisp (expand-file-name "auto-autoloads.elc" source-lisp)) |
89 (defvar aa-lisp-mule (expand-file-name "auto-autoloads.el" source-lisp-mule)) | 91 (defvar aa-lisp-mule (expand-file-name "auto-autoloads.el" source-lisp-mule)) |
90 (defvar aac-lisp-mule (expand-file-name "auto-autoloads.elc" source-lisp-mule)) | 92 (defvar aac-lisp-mule (expand-file-name "auto-autoloads.elc" source-lisp-mule)) |
91 | 93 |
163 dump-target "src/xemacs")) | 165 dump-target "src/xemacs")) |
164 (t | 166 (t |
165 (setq exe-target "src/xemacs" | 167 (setq exe-target "src/xemacs" |
166 dump-target "src/xemacs.dmp"))) | 168 dump-target "src/xemacs.dmp"))) |
167 | 169 |
168 (setq exe-target (expand-file-name exe-target build-root)) | 170 (setq exe-target (expand-file-name exe-target build-directory)) |
169 (setq dump-target (expand-file-name dump-target build-root)) | 171 (setq dump-target (expand-file-name dump-target build-directory)) |
170 | 172 |
171 ;; Not currently used. | 173 ;; Not currently used. |
172 ; (setq dump-target-out-of-date-wrt-exe-target | 174 ; (setq dump-target-out-of-date-wrt-exe-target |
173 ; (cond ((not dump-target) t) | 175 ; (cond ((not dump-target) t) |
174 ; (temacs-exe (file-newer-than-file-p temacs-exe dump-target)) | 176 ; (temacs-exe (file-newer-than-file-p temacs-exe dump-target)) |
184 (setq preloaded-file-list | 186 (setq preloaded-file-list |
185 (append package-preloaded-file-list | 187 (append package-preloaded-file-list |
186 preloaded-file-list | 188 preloaded-file-list |
187 packages-hardcoded-lisp))) | 189 packages-hardcoded-lisp))) |
188 | 190 |
189 (load (expand-file-name "site-packages" source-root) t t) | 191 (load (expand-file-name "site-packages" source-directory) t t) |
190 (setq preloaded-file-list | 192 (setq preloaded-file-list |
191 (append packages-hardcoded-lisp | 193 (append packages-hardcoded-lisp |
192 preloaded-file-list | 194 preloaded-file-list |
193 site-load-packages)) | 195 site-load-packages)) |
194 ;; bytecomp, byte-optimize, autoload, etc. are mentioned specially | 196 ;; bytecomp, byte-optimize, autoload, etc. are mentioned specially |
270 (setq dirs-to-check (cdr dirs-to-check)))) | 272 (setq dirs-to-check (cdr dirs-to-check)))) |
271 | 273 |
272 (if dump-target-out-of-date-wrt-dump-files | 274 (if dump-target-out-of-date-wrt-dump-files |
273 (condition-case nil | 275 (condition-case nil |
274 (write-region-internal | 276 (write-region-internal |
275 "foo" nil (expand-file-name "src/NEEDTODUMP" build-root)) | 277 "foo" nil (expand-file-name "src/NEEDTODUMP" build-directory)) |
276 (file-error nil))) | 278 (file-error nil))) |
277 | 279 |
278 ) | 280 ) |
279 | 281 |
280 (when (or need-to-rebuild-autoloads | 282 (when (or need-to-rebuild-autoloads |
322 aa-lisp)) | 324 aa-lisp)) |
323 (if need-to-recompile-mule-autoloads | 325 (if need-to-recompile-mule-autoloads |
324 (list "-f" "batch-byte-compile-one-file" | 326 (list "-f" "batch-byte-compile-one-file" |
325 aa-lisp-mule))))) | 327 aa-lisp-mule))))) |
326 (condition-case nil | 328 (condition-case nil |
327 (delete-file (expand-file-name "src/REBUILD_AUTOLOADS" build-root)) | 329 (delete-file (expand-file-name "src/REBUILD_AUTOLOADS" build-directory)) |
328 (file-error nil)) | 330 (file-error nil)) |
329 (cond ((and (not update-elc-files-to-compile) | 331 (cond ((and (not update-elc-files-to-compile) |
330 (not need-to-rebuild-autoloads) | 332 (not need-to-rebuild-autoloads) |
331 (not need-to-rebuild-mule-autoloads) | 333 (not need-to-rebuild-mule-autoloads) |
332 (not need-to-recompile-autoloads) | 334 (not need-to-recompile-autoloads) |
340 ;; all the .el's and doing it here. (We only need to rebuild | 342 ;; all the .el's and doing it here. (We only need to rebuild |
341 ;; the autoloads here when we have files to compile, since | 343 ;; the autoloads here when we have files to compile, since |
342 ;; they may depend on the updated autoloads.) | 344 ;; they may depend on the updated autoloads.) |
343 (condition-case nil | 345 (condition-case nil |
344 (write-region-internal | 346 (write-region-internal |
345 "foo" nil (expand-file-name "src/REBUILD_AUTOLOADS" build-root)) | 347 "foo" nil (expand-file-name "src/REBUILD_AUTOLOADS" build-directory)) |
346 (file-error nil)) | 348 (file-error nil)) |
347 ) | 349 ) |
348 (t | 350 (t |
349 (let ((bc-bootstrap | 351 (let ((bc-bootstrap |
350 (mapcar #'(lambda (arg) | 352 (mapcar #'(lambda (arg) |