home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / misc / amicvs1-0.lha / AmiCVS / emacs / lisp-adds / pcl-cvs / compile-all.el next >
Encoding:
Text File  |  1994-11-02  |  1.8 KB  |  53 lines

  1. ;;;; @(#) Id: compile-all.el,v 1.11 1993/05/31 18:40:25 ceder Exp 
  2. ;;;; This file byte-compiles all .el files in pcl-cvs release 1.05.
  3. ;;;;
  4. ;;;; Copyright (C) 1991 Inge Wallin
  5. ;;;;
  6. ;;;; This file was once upon a time part of Elib, but have since been
  7. ;;;; modified by Per Cederqvist.
  8. ;;;;
  9. ;;;; GNU Elib is free software; you can redistribute it and/or modify
  10. ;;;; it under the terms of the GNU General Public License as published by
  11. ;;;; the Free Software Foundation; either version 1, or (at your option)
  12. ;;;; any later version.
  13. ;;;;
  14. ;;;; GNU Elib is distributed in the hope that it will be useful,
  15. ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17. ;;;; GNU General Public License for more details.
  18. ;;;;
  19. ;;;; You should have received a copy of the GNU General Public License
  20. ;;;; along with GNU Emacs; see the file COPYING.  If not, write to
  21. ;;;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  22. ;;;;
  23.  
  24.  
  25. (setq files-to-compile '("pcl-cvs" "pcl-cvs-lucid"))
  26.  
  27.  
  28. (defun compile-file-if-necessary (file)
  29.   "Compile FILE if necessary.
  30.  
  31. This is done if FILE.el is newer than FILE.elc or if FILE.elc doesn't exist."
  32.   (let ((el-name (concat file ".el"))
  33.     (elc-name (concat file ".elc")))
  34.     (if (or (not (file-exists-p elc-name))
  35.         (file-newer-than-file-p el-name elc-name))
  36.     (progn
  37.       (message (format "Byte-compiling %s..." el-name))
  38.       (byte-compile-file el-name)))))
  39.  
  40.  
  41. (defun compile-pcl-cvs ()
  42.   "Byte-compile all uncompiled files of pcl-cvs."
  43.  
  44.   (interactive)
  45.  
  46.   ;; Be sure to have . in load-path since a number of files
  47.   ;; depend on other files and we always want the newer one even if
  48.   ;; a previous version of pcl-cvs exists.
  49.   (let ((load-path (append '(".") load-path)))
  50.  
  51.     (mapcar (function compile-file-if-necessary)
  52.         files-to-compile)))
  53.