From 21be1b40216e1e4ca8009fb030e549bdf4a5364d Mon Sep 17 00:00:00 2001 From: Lorenz Moesenlechner Date: Tue, 27 Apr 2010 22:11:54 +0000 Subject: [PATCH] Improved lisp wrapper script generation. * Added a per-node instead of a per-package init file that lies in $ROS_HOME/roslisp//-init.lisp * Removed loading of the global ~/.sbclrc-ros init file. --- core/roslisp/scripts/make-roslisp-exec.lisp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/core/roslisp/scripts/make-roslisp-exec.lisp b/core/roslisp/scripts/make-roslisp-exec.lisp index 4b72046d..620506e9 100644 --- a/core/roslisp/scripts/make-roslisp-exec.lisp +++ b/core/roslisp/scripts/make-roslisp-exec.lisp @@ -8,7 +8,8 @@ (let ((p (sb-ext:posix-getenv "ROS_ROOT"))) (unless p (error "ROS_ROOT not set")) (let ((roslisp-path (merge-pathnames (make-pathname :directory '(:relative "asdf")) - (ros-load:ros-package-path "roslisp")))) + (ros-load:ros-package-path "roslisp"))) + (output-filename (pathname (fifth sb-ext:*posix-argv*)))) (handler-case (let ((ros-load:*current-ros-package* (second sb-ext:*posix-argv*))) (asdf:operate 'asdf:compile-op (third sb-ext:*posix-argv*))) @@ -16,7 +17,7 @@ (format *error-output* "Compilation failed due to condition: ~a~&" e) (sb-ext:quit :unix-status 1))) - (with-open-file (strm (fifth sb-ext:*posix-argv*) :if-exists :supersede :direction :output) + (with-open-file (strm output-filename :if-exists :supersede :direction :output) (let ((*standard-output* strm)) (pprint '(require :asdf)) (pprint '(defmethod asdf:perform :around ((o asdf:load-op) @@ -28,7 +29,6 @@ (call-next-method))))) (pprint '(push :roslisp-standalone-executable *features*)) (pprint '(declaim (sb-ext:muffle-conditions sb-ext:compiler-note))) - (pprint '(load (format nil "~a/.sbclrc-roslisp" (sb-ext:posix-getenv "HOME")) :if-does-not-exist nil)) (pprint `(push ,roslisp-path asdf:*central-registry*)) (pprint '(defun roslisp-debugger-hook (condition me) (declare (ignore me)) @@ -52,14 +52,14 @@ ,(second sb-ext:*posix-argv*)) (let ((*standard-output* (make-broadcast-stream)) (sys ,(third sb-ext:*posix-argv*))) - (handler-case (asdf:operate 'asdf:load-op sys :verbose nil) + (handler-case (asdf:operate 'asdf:load-op sys :verbose nil) (asdf:missing-component (c) (error "Couldn't find asdf system (filename ~a.asd and system name ~a) or some dependency. Original condition was ~a." - sys sys c)))) - (load (merge-pathnames (make-pathname :name ,(format nil "~a-init.lisp" (third sb-ext:*posix-argv*)) + sys sys c)))) + (load (merge-pathnames (make-pathname :name ,(format nil "~a-init.lisp" (pathname-name output-filename)) :directory '(:relative "roslisp" ,(second sb-ext:*posix-argv*))) (funcall (symbol-function (intern "ROS-HOME" :ros-load)))) :if-does-not-exist nil) (funcall (symbol-function (read-from-string ,(fourth sb-ext:*posix-argv*)))) - (sb-ext:quit))))))) -(sb-ext:quit) \ No newline at end of file + (sb-ext:quit)))))) + (sb-ext:quit))