+ (or just-print
+ (setq just-print (install-just-print-p)))
+ (install-elisp-modules emu-modules "." EMU_DIR just-print)
+ (install-elisp-modules apel-modules "." APEL_DIR just-print))
+
+;; For XEmacs package system.
+(defun config-apel-package ()
+ ;; Override everything you want.
+ (load-file "APEL-CFG")
+ ;; Override PACKAGEDIR with command-line option.
+ (let (package-dir)
+ (and (setq package-dir
+ ;; Avoid using `pop'.
+ ;; (pop command-line-args-left)
+ (prog1
+ (car command-line-args-left)
+ (setq command-line-args-left
+ (cdr command-line-args-left))))
+ (or (string= "NONE" package-dir)
+ (setq PACKAGEDIR package-dir))))
+ ;; Load some APEL modules from this directory.
+ (defvar default-load-path load-path)
+ (setq load-path (cons (expand-file-name ".") load-path))
+ (require 'poe)
+ (require 'path-util)
+ (require 'install)
+
+ ;; Import `apel-modules'.
+ (load-file "APEL-ELS")
+ ;; Import `emu-modules' and `emu-modules-to-compile'.
+ (load-file "EMU-ELS")
+
+ ;; Set PACKAGEDIR if not set yet.
+ (or PACKAGEDIR
+ (setq PACKAGEDIR (install-get-default-package-directory)))
+ (if PACKAGEDIR
+ (princ (format "\nPACKAGEDIR=%s\n" PACKAGEDIR))
+ (error "XEmacs package system is not available")))
+
+(defun compile-apel-package ()
+ (config-apel-package)
+ ;; Compile emu modules first.
+ (compile-elisp-modules emu-modules-to-compile ".")
+ (compile-elisp-modules apel-modules "."))
+
+(defun install-apel-package ()
+ (config-apel-package)
+ (let ((just-print (install-just-print-p))
+ (dir (expand-file-name APEL_PREFIX
+ (expand-file-name "lisp" PACKAGEDIR))))
+ (install-elisp-modules emu-modules "." dir just-print)
+ (install-elisp-modules apel-modules "." dir just-print)
+ (install-update-package-files "apel" dir just-print)))
+
+(defun what-where-apel ()
+ (install-apel 'just-print)
+ ;; (config-apel)
+;;; (princ (format "
+;;; The files that belong to the EMU modules:
+;;; %s
+;;; -> %s
+
+;;; The files that belong to the APEL modules:
+;;; %s
+;;; -> %s
+
+;;; Do `make elc', `make install', `make package', or `make install-package'.
+;;; "
+;;; (mapconcat (function symbol-name) emu-modules ", ")
+;;; EMU_DIR
+;;; (mapconcat (function symbol-name) apel-modules ", ")
+;;; APEL_DIR))