X-Git-Url: https://cgit.sxemacs.org/?p=riece;a=blobdiff_plain;f=lisp%2FCOMPILE;h=655c5e11928e4dc6a4ce70008ca396ad01eecf72;hp=5937bbb306805de412788f374db0e4e45cd91d62;hb=99c733d6c3830ec7aae806fe88b8911c4ff13f64;hpb=001732c4ce463b7efc992781b49c397511df4346 diff --git a/lisp/COMPILE b/lisp/COMPILE index 5937bbb..655c5e1 100644 --- a/lisp/COMPILE +++ b/lisp/COMPILE @@ -12,6 +12,7 @@ riece-coding riece-complete riece-addon + riece-ruby riece-mode ;; riece-identity -+-> riece-channel @@ -76,24 +77,51 @@ riece-toolbar riece-eval riece-google - riece-keepalive)))) + riece-keepalive + riece-eval-ruby)))) (defvar riece-icons - '(riece-command-quit - riece-command-previous-channel - riece-command-next-channel - riece-submit-bug-report)) + '("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)) @@ -119,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)) @@ -144,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 () @@ -160,13 +207,15 @@ (riece-install-modules (append riece-modules '(auto-autoloads custom-load)) - (expand-file-name "riece" - (expand-file-name "lisp" (car command-line-args-left))) + (expand-file-name "lisp/riece" (car command-line-args-left)) (riece-install-just-print-p)) (riece-install-icons riece-icons - (expand-file-name "riece" - (expand-file-name "lisp" (car command-line-args-left))) + (expand-file-name "etc/riece" (car command-line-args-left)) + (riece-install-just-print-p)) + (riece-install-scripts + riece-scripts + (expand-file-name "etc/riece" (car command-line-args-left)) (riece-install-just-print-p))) (defun riece-test ()