6 (defun epg-compile-modules (modules)
7 (let ((load-path (cons nil load-path))
10 (let ((source (expand-file-name
11 (concat (symbol-name (car modules)) ".el"))))
12 (if (file-newer-than-file-p source (concat source "c"))
14 (byte-compile-file source)
16 (setq error-modules (cons (car modules) error-modules))))))
17 (setq modules (cdr modules)))
20 WARNING: ---------------------------------------------------------
21 WARNING: Couldn't compile following modules:
23 WARNING: " (mapconcat #'symbol-name error-modules ", ") "\n\
25 WARNING: You should probably stop here, try \"make distclean\" to clear
26 WARNING: the last build, and then reconfigure.
27 WARNING: ---------------------------------------------------------\n\n")))))
29 (defun epg-compile-module ()
30 (let ((load-path (cons nil load-path)))
31 (let ((source (expand-file-name
32 (concat (car command-line-args-left) ".el"))))
33 (if (file-newer-than-file-p source (concat source "c"))
34 (byte-compile-file source)))))
36 (defun epg-install-modules (modules dest just-print)
37 (unless (or just-print (file-exists-p dest))
38 (make-directory dest t))
40 (let ((name (symbol-name (car modules))))
41 (princ (format "%s.el -> %s\n" name dest))
43 (copy-file (expand-file-name (concat name ".el"))
44 (expand-file-name (concat name ".el") dest)
46 (princ (format "%s.elc -> %s\n" name dest))
48 (if (file-exists-p (expand-file-name (concat name ".elc")))
49 (copy-file (expand-file-name (concat name ".elc"))
50 (expand-file-name (concat name ".elc") dest)
52 (princ (format "(%s was not successfully compiled, ignored)\n"
54 (setq modules (cdr modules))))
56 (defun epg-install-just-print-p ()
57 (let ((flag (getenv "MAKEFLAGS"))
60 (string-match "^\\(\\(--[^ ]+ \\)+-\\|[^ =-]\\)*n" flag))))
63 (princ (mapconcat #'symbol-name epg-modules " ")))
66 (epg-compile-modules epg-modules))
71 (expand-file-name "epg" (car command-line-args-left))
72 (epg-install-just-print-p)))
74 (defun epg-compile-package ()
75 (setq autoload-package-name "epg")
76 (add-to-list 'command-line-args-left ".")
77 (batch-update-directory)
78 (add-to-list 'command-line-args-left ".")
79 (Custom-make-dependencies)
82 '(auto-autoloads custom-load))))
84 (defun epg-install-package ()
87 '(auto-autoloads custom-load))
88 (expand-file-name "lisp/epg" (car command-line-args-left))
89 (epg-install-just-print-p)))