+;;; Configuration variables.
+
+;; Set these four variables in "APEL-CFG" or in "Makefile".
+
+;; This variable will be detected automatically.
+(defvar PREFIX nil)
+
+;; This variable will be detected automatically using PREFIX.
+;; v18: (no standard site-lisp directory)
+;; Emacs 19.28 and earlier: "PREFIX/lib/emacs/site-lisp"
+;; Emacs 19.29 and later: "PREFIX/share/emacs/site-lisp"
+(defvar LISPDIR nil)
+
+;; This variable will be detected automatically using PREFIX.
+;; Emacs 19.31 and later: "PREFIX/share/emacs/VERSION/site-lisp"
+(defvar VERSION_SPECIFIC_LISPDIR nil)
+
+;; This variable will be detected automatically.
+;; XEmacs 21.0 and later: "/usr/local/lib/xemacs/xemacs-packages"
+(defvar PACKAGEDIR nil)
+
+;; Install APEL modules to "apel" subdirectory.
+(defvar APEL_PREFIX "apel")
+
+;; Install EMU modules to "emu" subdirectory if emacs supports some features.
+;; If your emacs does not have `normal-top-level-add-subdirs-to-load-path'
+;; but have `normal-top-level-add-to-load-path' and you want to use it in
+;; "subdirs.el", put the following line to "APEL-CFG".
+;; (setq EMU_PREFIX "emu")
+(defvar EMU_PREFIX
+ (if (or (featurep 'xemacs)
+ (fboundp 'normal-top-level-add-subdirs-to-load-path))
+ ;; Make "emu" subdirectory.
+ "emu"
+ ;; Don't make "emu" subdirectory.
+ ""))
+
+;; The directories where APEL and EMU modules will be installed.
+;; These two variables will be generated from other variables above.
+(defvar APEL_DIR nil) ; LISPDIR/APEL_PREFIX
+(defvar EMU_DIR nil) ; VERSION_SPECIFIC_LISPDIR/EMU_PREFIX
+
+
+;;; Utilities. (XXX: should be moved to install.el ?)
+
+(defun install-just-print-p ()
+ (let ((flag (getenv "MAKEFLAGS"))
+ (case-fold-search nil))
+ (princ (format "%s\n" flag))
+ (if flag
+ (string-match "^\\(\\(--[^ ]+ \\)+-\\|[^ =-]\\)*n" flag))))
+
+(defun install-update-package-files (package dir &optional just-print)
+ (cond
+ (just-print
+ (princ (format "Updating autoloads in directory %s..\n\n" dir))
+
+ (princ (format "Processing %s\n" dir))
+ (princ "Generating custom-load.el...\n\n")
+
+ (princ (format "Compiling %s...\n"
+ (expand-file-name "auto-autoloads.el" dir)))
+ (princ (format "Wrote %s\n"
+ (expand-file-name "auto-autoloads.elc" dir)))
+
+ (princ (format "Compiling %s...\n"
+ (expand-file-name "custom-load.el" dir)))
+ (princ (format "Wrote %s\n"
+ (expand-file-name "custom-load.elc" dir))))
+ (t
+ (setq autoload-package-name package)
+
+ (let ((command-line-args-left (list dir)))
+ (batch-update-directory))
+
+ (let ((command-line-args-left (list dir)))
+ (Custom-make-dependencies))
+
+ (byte-compile-file (expand-file-name "auto-autoloads.el" dir))
+ (byte-compile-file (expand-file-name "custom-load.el" dir)))))
+
+
+;;; Configure, Compile, and Install.
+