X-Git-Url: https://cgit.sxemacs.org/?p=riece;a=blobdiff_plain;f=lisp%2FCOMPILE;h=11c2f6af5ace8ff57aaa59c3697a17f9cc5c6d99;hp=577417b1d822c3ffe5e5ba4f779fb86af288158e;hb=2362928b17babcdeee7f1b4910cab1e816d5c93a;hpb=adf6b9176ef183dd7a398608611ad6a0899a4cac;ds=sidebyside diff --git a/lisp/COMPILE b/lisp/COMPILE index 577417b..11c2f6a 100644 --- a/lisp/COMPILE +++ b/lisp/COMPILE @@ -7,10 +7,12 @@ 'riece-emacs) '(riece-globals riece-options + riece-debug riece-version riece-coding riece-complete riece-addon + riece-ruby riece-mode ;; riece-identity -+-> riece-channel @@ -72,22 +74,54 @@ riece-biff riece-kakasi riece-yank - riece-toolbar)))) - -(defun riece-icons - '(riece-command-previous-channel - riece-command-next-channel)) + riece-toolbar + riece-eval + riece-google + riece-keepalive + riece-eval-ruby)))) + +(defvar riece-icons + '("riece-command-quit.xpm" + "riece-command-join.xpm" + "riece-command-part.xpm" + "riece-command-previous-channel.xpm" + "riece-command-next-channel.xpm" + "riece-command-change-layout.xpm" + "riece-submit-bug-report.xpm")) + +(defvar riece-scripts + '("server.rb" + "aproxy.rb")) (defun riece-compile-modules (modules) - (let ((load-path (cons nil load-path))) + (let ((load-path (cons nil load-path)) + error-modules) (while modules (let ((source (expand-file-name (concat (symbol-name (car modules)) ".el")))) (if (file-newer-than-file-p source (concat source "c")) (condition-case error (byte-compile-file source) - (error)))) - (setq modules (cdr modules))))) + (error + (setq error-modules (cons (car modules) error-modules)))))) + (setq modules (cdr modules))) + (if error-modules + (princ (concat "\n\ + WARNING: --------------------------------------------------------- + WARNING: Couldn't compile following modules: + WARNING: + WARNING: " (mapconcat #'symbol-name error-modules ", ") "\n\ + WARNING: + WARNING: You should probably stop here, try \"make distclean\" to clear + WARNING: the last build, and then reconfigure. + WARNING: ---------------------------------------------------------\n\n"))))) + +(defun riece-compile-module () + (let ((load-path (cons nil load-path))) + (let ((source (expand-file-name + (concat (car command-line-args-left) ".el")))) + (if (file-newer-than-file-p source (concat source "c")) + (byte-compile-file source))))) (defun riece-install-modules (modules dest just-print) (unless (or just-print (file-exists-p dest)) @@ -113,20 +147,35 @@ (unless (or just-print (file-exists-p dest)) (make-directory dest t)) (while icons - (let ((name (symbol-name (car icons)))) - (princ (format "%s.xpm -> %s\n" name dest)) + (when (file-exists-p (expand-file-name (car icons))) + (princ (format "%s -> %s\n" (car icons) dest)) (unless just-print - (copy-file (expand-file-name (concat name ".xpm")) - (expand-file-name (concat name ".xpm") dest) + (copy-file (expand-file-name (car icons)) + (expand-file-name (car icons) dest) t t))) (setq icons (cdr icons)))) +(defun riece-install-scripts (scripts dest just-print) + (unless (or just-print (file-exists-p dest)) + (make-directory dest t)) + (while scripts + (when (file-exists-p (expand-file-name (car scripts))) + (princ (format "%s -> %s\n" (car scripts) dest)) + (unless just-print + (copy-file (expand-file-name (car scripts)) + (expand-file-name (car scripts) dest) + t t))) + (setq scripts (cdr scripts)))) + (defun riece-install-just-print-p () (let ((flag (getenv "MAKEFLAGS")) case-fold-search) (if flag (string-match "^\\(\\(--[^ ]+ \\)+-\\|[^ =-]\\)*n" flag)))) +(defun riece-examine () + (princ (mapconcat #'symbol-name riece-modules " "))) + (defun riece-compile () (riece-compile-modules riece-modules)) @@ -138,6 +187,10 @@ (riece-install-icons riece-icons (expand-file-name "riece" (car command-line-args-left)) + (riece-install-just-print-p)) + (riece-install-scripts + riece-scripts + (expand-file-name "riece" (car command-line-args-left)) (riece-install-just-print-p))) (defun riece-compile-package () @@ -159,6 +212,11 @@ (riece-install-just-print-p)) (riece-install-icons riece-icons + (expand-file-name "riece" + (expand-file-name "lisp" (car command-line-args-left))) + (riece-install-just-print-p)) + (riece-install-scripts + riece-scripts (expand-file-name "riece" (expand-file-name "lisp" (car command-line-args-left))) (riece-install-just-print-p)))