From a95e40e4db96bdb764ba8be964226ba6a67354ac Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Sun, 10 Sep 2006 17:42:24 +0000 Subject: [PATCH] r11128: add init file processing --- umlisp.asd | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/umlisp.asd b/umlisp.asd index d3439e0..bc97895 100644 --- a/umlisp.asd +++ b/umlisp.asd @@ -19,6 +19,11 @@ (defpackage #:umlisp-system (:use #:asdf #:cl)) (in-package #:umlisp-system) +;; need to load uffi for below perform :after method +(eval-when (:compile-toplevel :load-toplevel :execute) + (unless (find-package 'uffi) + (asdf:operate 'asdf:load-op 'uffi))) + (defsystem umlisp :components ((:file "package") @@ -38,3 +43,17 @@ (defmethod perform ((o test-op) (c (eql (find-system 'umlisp)))) (operate 'load-op 'umlisp-tests) (operate 'test-op 'umlisp-tests :force t)) + +(defmethod perform :after ((o load-op) (c (eql (find-system 'umlisp)))) + (let* ((init-var (uffi:getenv "UMLISPRC")) + (init-file (or (when init-var (probe-file init-var)) + (probe-file + (merge-pathnames + (make-pathname :name ".umlisprc") + (user-homedir-pathname))) + #+(or mswin windows win32) + (probe-file "c:\\etc\\umlisp-init.lisp")))) + (when init-file + (format t "loading umlisp init file ~A~%" init-file) + (load init-file)))) + -- 2.34.1