comparison lisp/prim/update-elc.el @ 189:489f57a838ef r20-3b21

Import from CVS: tag r20-3b21
author cvs
date Mon, 13 Aug 2007 09:57:07 +0200
parents 3d6bfa290dbd
children
comparison
equal deleted inserted replaced
188:e29a8e7498d9 189:489f57a838ef
89 ;(load "cl") 89 ;(load "cl")
90 ;(load "featurep") 90 ;(load "featurep")
91 91
92 ;; (print (prin1-to-string update-elc-files-to-compile)) 92 ;; (print (prin1-to-string update-elc-files-to-compile))
93 93
94 (let (dumped-lisp-packages site-load-packages) 94 (let (preloaded-file-list site-load-packages)
95 (load (concat default-directory "../lisp/prim/dumped-lisp.el")) 95 (load (concat default-directory "../lisp/prim/dumped-lisp.el"))
96 ;; (print (prin1-to-string dumped-lisp-packages)) 96 ;; (print (prin1-to-string preloaded-file-list))
97 (load (concat default-directory "../site-packages") t t) 97 (load (concat default-directory "../site-packages") t t)
98 (setq dumped-lisp-packages 98 (setq preloaded-file-list
99 (append packages-hardcoded-lisp 99 (append packages-hardcoded-lisp
100 dumped-lisp-packages 100 preloaded-file-list
101 packages-useful-lisp 101 packages-useful-lisp
102 site-load-packages)) 102 site-load-packages))
103 (while dumped-lisp-packages 103 (while preloaded-file-list
104 (let ((arg (car dumped-lisp-packages))) 104 (let ((arg (car preloaded-file-list)))
105 ;; (print (prin1-to-string arg)) 105 ;; (print (prin1-to-string arg))
106 (if (null (member arg packages-unbytecompiled-lisp)) 106 (if (null (member arg packages-unbytecompiled-lisp))
107 (progn 107 (progn
108 (setq arg (locate-library arg)) 108 (setq arg (locate-library arg))
109 (if (null arg) 109 (if (null arg)
110 (progn 110 (progn
111 (print (format "Library file %s: not found" 111 (print (format "Library file %s: not found"
112 (car dumped-lisp-packages))) 112 (car preloaded-file-list)))
113 (kill-emacs))) 113 (kill-emacs)))
114 (if (string-match "\\.elc?\\'" arg) 114 (if (string-match "\\.elc?\\'" arg)
115 (setq arg (substring arg 0 (match-beginning 0)))) 115 (setq arg (substring arg 0 (match-beginning 0))))
116 (if (and (null (member arg processed)) 116 (if (and (null (member arg processed))
117 (file-exists-p (concat arg ".el")) 117 (file-exists-p (concat arg ".el"))
118 (file-newer-than-file-p (concat arg ".el") 118 (file-newer-than-file-p (concat arg ".el")
119 (concat arg ".elc"))) 119 (concat arg ".elc")))
120 (setq processed (cons (concat arg ".el") processed))))) 120 (setq processed (cons (concat arg ".el") processed)))))
121 (setq dumped-lisp-packages (cdr dumped-lisp-packages))))) 121 (setq preloaded-file-list (cdr preloaded-file-list)))))
122 122
123 (setq update-elc-files-to-compile (append update-elc-files-to-compile 123 (setq update-elc-files-to-compile (append update-elc-files-to-compile
124 processed)) 124 processed))
125 125
126 ;; (print (prin1-to-string update-elc-files-to-compile)) 126 ;; (print (prin1-to-string update-elc-files-to-compile))