6 (defun mixi-compile-modules (modules)
7 (let ((load-path (cons nil load-path))
10 (let ((source (expand-file-name
11 (symbol-name (car modules)))))
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 mixi-compile-module ()
30 (let ((load-path (cons nil load-path)))
31 (let ((source (expand-file-name
32 (car command-line-args-left))))
33 (if (file-newer-than-file-p source (concat source "c"))
34 (byte-compile-file source)))))
36 (defun mixi-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 -> %s\n" name dest))
43 (copy-file (expand-file-name name)
44 (expand-file-name name dest)
46 (princ (format "%sc -> %s\n" name dest))
48 (if (file-exists-p (expand-file-name (concat name "c")))
49 (copy-file (expand-file-name (concat name "c"))
50 (expand-file-name (concat name "c") dest)
52 (princ (format "(%s was not successfully compiled, ignored)\n"
54 (setq modules (cdr modules))))
56 (defun mixi-install-just-print-p ()
57 (let ((flag (getenv "MAKEFLAGS"))
60 (string-match "^\\(\\(--[^ ]+ \\)+-\\|[^ =-]\\)*n" flag))))
62 (defun mixi-examine ()
63 (princ (mapconcat #'symbol-name mixi-modules " ")))
65 (defun mixi-compile ()
66 (mixi-compile-modules mixi-modules))
68 (defun mixi-install ()
71 (expand-file-name "mixi" (car command-line-args-left))
72 (mixi-install-just-print-p)))
74 (defun mixi-compile-package ()
75 (setq autoload-package-name "mixi")
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.el custom-load.el))))
84 (defun mixi-install-package ()
87 '(auto-autoloads.el custom-load.el))
88 (expand-file-name "lisp/mixi" (car command-line-args-left))
89 (mixi-install-just-print-p)))