Remove dependency on cl-launch, because cl-launch affects an ASDF build too much.
authorFrancois-Rene Rideau <fare@tunes.org>
Fri, 11 Sep 2009 21:56:50 +0000 (17:56 -0400)
committerFrancois-Rene Rideau <fare@tunes.org>
Fri, 11 Sep 2009 21:56:50 +0000 (17:56 -0400)
command-line-arguments.asd
get-command-line-arguments.lisp

index b83646b..1409bae 100644 (file)
@@ -15,7 +15,7 @@
   :licence "MIT"
   :description "small library to deal with command-line arguments"
   :long-description "A library to abstract away the parsing of Unix-style command-line arguments"
-  :depends-on (:cl-launch)
+  ;;:depends-on (:cl-launch) ; cl-launch affects the build too much for unsuspecting ASDF users.
   :components
   ((:file "pkgdcl")
    (:file "get-command-line-arguments" :depends-on ("pkgdcl"))
index 9a8942a..207f188 100644 (file)
@@ -8,9 +8,25 @@
 ;;;                                                                  ;;;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-#+xcvb (module (:depends-on ((:build "cl-launch") "pkgdcl")))
+#+xcvb (module (:depends-on ("pkgdcl")))
+;; let's not DEPEND on (:build "/cl-launch") since
+;; that opens a can of worm for people using ASDF.
 
 (in-package :command-line-arguments)
 
+#+cl-launch
 (defun get-command-line-arguments ()
   cl-launch:*arguments*)
+
+#-cl-launch
+(defun get-command-line-arguments ()
+  #+sbcl (cdr sb-ext:*posix-argv*)
+  #+clozure (cdr (ccl::command-line-arguments))
+  #+gcl (cdr si:*command-args*)
+  #+ecl (loop for i from 1 below (si:argc) collect (si:argv i))
+  #+cmu (cdr extensions:*command-line-strings*)
+  #+allegro (cdr (sys:command-line-arguments))
+  #+lispworks (cdr sys:*line-arguments-list*)
+  #+clisp ext:*args*
+  #-(or sbcl clozure gcl ecl cmu allegro lispworks clisp)
+  (error "get-command-line-arguments not supported for your implementation"))