3 (defun mixi-compile-modules (modules)
4 (let ((load-path (cons nil load-path))
7 (let ((source (expand-file-name (car modules))))
8 (if (file-newer-than-file-p source (concat source "c"))
10 (byte-compile-file source)
12 (setq error-modules (cons (car modules) error-modules))))))
13 (setq modules (cdr modules)))
16 WARNING: ---------------------------------------------------------
17 WARNING: Couldn't compile following modules:
19 WARNING: " (mapconcat #'identity error-modules ", ") "\n\
21 WARNING: You should probably stop here, try \"make distclean\" to clear
22 WARNING: the last build, and then reconfigure.
23 WARNING: ---------------------------------------------------------\n\n")))))
25 (defun mixi-install-modules (modules dest just-print)
26 (unless (or just-print (file-exists-p dest))
27 (make-directory dest t))
29 (let ((name (car modules)))
30 (princ (format "%s -> %s\n" name dest))
32 (copy-file (expand-file-name name)
33 (expand-file-name name dest)
35 (princ (format "%sc -> %s\n" name dest))
37 (if (file-exists-p (expand-file-name (concat name "c")))
38 (copy-file (expand-file-name (concat name "c"))
39 (expand-file-name (concat name "c") dest)
41 (princ (format "(%s was not successfully compiled, ignored)\n"
43 (setq modules (cdr modules))))
45 (defun mixi-install-just-print-p ()
46 (let ((flag (getenv "MAKEFLAGS"))
49 (string-match "^\\(\\(--[^ ]+ \\)+-\\|[^ =-]\\)*n" flag))))
51 (defun mixi-compile ()
52 (mixi-compile-modules command-line-args-left))
54 (defun mixi-install ()
56 (cdr command-line-args-left)
57 (expand-file-name "mixi" (car command-line-args-left))
58 (mixi-install-just-print-p)))
60 (defun mixi-compile-package ()
61 (let ((modules (cdr command-line-args-left))
62 command-line-args-left)
63 (setq autoload-package-name "mixi")
64 (add-to-list 'command-line-args-left ".")
65 (batch-update-directory)
66 (add-to-list 'command-line-args-left ".")
67 (Custom-make-dependencies)
70 '("auto-autoloads.el" "custom-load.el")))))
72 (defun mixi-install-package ()
74 (append (cdr command-line-args-left)
75 '("auto-autoloads.el" "custom-load.el"))
76 (expand-file-name "lisp/mixi" (car command-line-args-left))
77 (mixi-install-just-print-p)))