X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=APEL-MK;h=09ea4c2cf019855ae78233b25b6b375083236a1d;hb=dba46404b432c10a5b5c49d0cdd30887591a5faf;hp=61902fefb20ab7b372c797cb169561813b2c9398;hpb=1a7da2dc62ba0251a1f829c692ee19afff607ca1;p=elisp%2Fapel.git diff --git a/APEL-MK b/APEL-MK index 61902fe..09ea4c2 100644 --- a/APEL-MK +++ b/APEL-MK @@ -1,17 +1,29 @@ ;;; -*-Emacs-Lisp-*- -;;; -;;; $Id: APEL-MK,v 0.2 1997-03-20 02:12:39 morioka Exp $ -;;; + +;; APEL-MK: installer for APEL. + +;;; Code: (defun config-apel () - (let (prefix) - (setq prefix (car command-line-args-left)) - (and prefix - (not (string-equal "NONE" prefix)) - (progn - (defvar PREFIX prefix) - (setq command-line-args-left (cdr command-line-args-left)) - )) + (let (prefix lisp-dir version-specific-lisp-dir) + (and (setq prefix (car command-line-args-left)) + (or (string-equal "NONE" prefix) + (defvar PREFIX prefix) + )) + (setq command-line-args-left (cdr command-line-args-left)) + (and (setq lisp-dir (car command-line-args-left)) + (or (string-equal "NONE" lisp-dir) + (defvar LISPDIR lisp-dir) + )) + (setq command-line-args-left (cdr command-line-args-left)) + (and (setq version-specific-lisp-dir (car command-line-args-left)) + (or (string-equal "NONE" version-specific-lisp-dir) + (progn + (defvar VERSION_SPECIFIC_LISPDIR version-specific-lisp-dir) + (princ (format "VERSION_SPECIFIC_LISPDIR=%s\n" + VERSION_SPECIFIC_LISPDIR))) + )) + (setq command-line-args-left (cdr command-line-args-left)) (load-file "APEL-CFG") (or (boundp 'apel-modules) (load-file "APEL-ELS") @@ -20,18 +32,71 @@ )) (defun compile-apel () - (add-to-list 'load-path (expand-file-name "../emu")) - (add-to-list 'load-path ".") - (require 'install) + (config-apel) + (load "EMU-ELS") (load-file "APEL-ELS") + (compile-elisp-modules emu-modules ".") (compile-elisp-modules apel-modules ".") ) (defun install-apel () (compile-apel) - (config-apel) - (compile-elisp-modules apel-modules ".") + (install-elisp-modules emu-modules "." EMU_DIR) (install-elisp-modules apel-modules "." APEL_DIR) ) +(defun config-apel-package () + (let (package-dir) + (and (setq package-dir (car command-line-args-left)) + (or (string= "NONE" package-dir) + (defvar PACKAGEDIR package-dir) + )) + (setq command-line-args-left (cdr command-line-args-left)) + (load-file "APEL-CFG") + (load-file "APEL-ELS") + + (princ (format "PACKAGEDIR=%s\n" PACKAGEDIR)) + )) + +(defun install-apel-package () + (config-apel-package) + (load "EMU-ELS") + + (compile-elisp-modules emu-modules ".") + (compile-elisp-modules apel-modules ".") + + (let ((dir (expand-file-name APEL_PREFIX + (expand-file-name "lisp" + PACKAGEDIR)))) + (install-elisp-modules emu-modules "." dir) + (install-elisp-modules apel-modules "." dir) + + (setq autoload-package-name "apel") + (add-to-list 'command-line-args-left dir) + (batch-update-directory) + + (add-to-list 'command-line-args-left dir) + (Custom-make-dependencies) + + (byte-compile-file (expand-file-name "auto-autoloads.el" dir)) + (byte-compile-file (expand-file-name "custom-load.el" dir)) + )) + +(defun what-where-apel () + (config-apel) + (load "EMU-ELS") + (princ (format " +The files that belong to the EMU modules: + %s + -> %s + +The files that belong to the APEL modules: + %s + -> %s +" + (mapconcat 'symbol-name emu-modules ", ") + EMU_DIR + (mapconcat 'symbol-name apel-modules ", ") + APEL_DIR))) + ;;; APEL-MK ends here