Introduced dummy-*.lisp files to define dummy packages when required.

Pascal J. Bourguignon [2015-07-07 19:41]
Introduced dummy-*.lisp files to define dummy packages when required.
Filename
com.informatimago.asd
tools/asdf-file.lisp
tools/com.informatimago.tools.quicklisp.asd
tools/com.informatimago.tools.source.asd
tools/dummy-asdf.lisp
tools/dummy-quicklisp.lisp
tools/dummy-uiop.lisp
tools/quicklisp.lisp
diff --git a/com.informatimago.asd b/com.informatimago.asd
index 61930fe..1d78d3f 100644
--- a/com.informatimago.asd
+++ b/com.informatimago.asd
@@ -43,7 +43,7 @@
   ;; component attributes:
   :version "1.0.2"
   :properties ((#:author-email                   . "pjb@informatimago.com")
-               (#:date                           . "Winter 2014")
+               (#:date                           . "Summer 2015")
                ((#:albert #:output-dir)          . "/tmp/documentation/com.informatimago/")
                ((#:albert #:formats)             . ("docbook"))
                ((#:albert #:docbook #:template)  . "book")
@@ -58,7 +58,8 @@
                "com.informatimago.xcode"
                "com.informatimago.lispdoc"
                "com.informatimago.small-cl-pgms"
-               "com.informatimago.language.cpp"
+               "com.informatimago.languages.cpp"
+               ;; "com.informatimago.languages.c11" ; future
                "com.informatimago.future"
                "com.informatimago.editor" ; future
                "com.informatimago.objcl"  ; empty shell on non-ccl darwin
diff --git a/tools/asdf-file.lisp b/tools/asdf-file.lisp
index 54d2e97..d70fcda 100644
--- a/tools/asdf-file.lisp
+++ b/tools/asdf-file.lisp
@@ -33,13 +33,7 @@
 ;;;;    You should have received a copy of the GNU Affero General Public License
 ;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;**************************************************************************
-
-(eval-when (:compile-toplevel :load-toplevel :execute)
-  (unless (find-package "ASDF")
-    (defpackage "ASDF" (:use "COMMON-LISP") (:export "DEFSYSTEM")))
-  (unless (find-package "UIOP")
-    (defpackage "UIOP" (:use "COMMON-LISP") (:export "SYMBOL-CALL"))))
-
+(in-package "COMMON-LISP-USER")

 (defpackage "COM.INFORMATIMAGO.TOOLS.ASDF-FILE"
   (:use "COMMON-LISP"
diff --git a/tools/com.informatimago.tools.quicklisp.asd b/tools/com.informatimago.tools.quicklisp.asd
index c5bc27b..1c9c5a9 100644
--- a/tools/com.informatimago.tools.quicklisp.asd
+++ b/tools/com.informatimago.tools.quicklisp.asd
@@ -33,13 +33,16 @@
 ;;;;**************************************************************************

 (asdf:defsystem "com.informatimago.tools.quicklisp"
-    :description "Quicklisp tools."
-    :author "Pascal J. Bourguignon"
-    :version "1.0.2"
-    :license "GPL3"
-    :depends-on (;; assumed ;; "quicklisp"
-                 "com.informatimago.tools.pathname")
-    :components ((:file "quicklisp")
-                 (:file "asdf" :depends-on ("quicklisp"))))
+  :description "Quicklisp tools."
+  :author "Pascal J. Bourguignon"
+  :version "1.0.2"
+  :license "GPL3"
+  :depends-on ( ;; assumed ;; "quicklisp"
+               "com.informatimago.tools.pathname")
+
+  :components ((:file "dummy-quicklisp" :depends-on ())
+               (:file "dummy-asdf"      :depends-on ())
+               (:file "quicklisp"       :depends-on ("dummy-quicklisp"))
+               (:file "asdf"            :depends-on ("quicklisp" "dummy-asdf"))))

 ;;;; THE END ;;;;
diff --git a/tools/com.informatimago.tools.source.asd b/tools/com.informatimago.tools.source.asd
index 2d16a57..c07901c 100644
--- a/tools/com.informatimago.tools.source.asd
+++ b/tools/com.informatimago.tools.source.asd
@@ -60,7 +60,11 @@ This system would use closer-mop which is not available on MOCL.
                "split-sequence")
   :components ((:file "source")
                (:file "dependency-cycles")
-               (:file "asdf-file"  :depends-on ("dependency-cycles" "source"))
+               (:file "dummy-asdf")
+               (:file "dummy-uiop")
+               (:file "asdf-file"  :depends-on ("dependency-cycles"
+                                                "source"
+                                                "dummy-asdf" "dummy-uiop"))
                #-(and) (:file "analyse-patchwork")))


diff --git a/tools/dummy-asdf.lisp b/tools/dummy-asdf.lisp
new file mode 100644
index 0000000..89c0b8b
--- /dev/null
+++ b/tools/dummy-asdf.lisp
@@ -0,0 +1,58 @@
+;;;; -*- mode:lisp;coding:utf-8 -*-
+;;;;**************************************************************************
+;;;;FILE:               dummy-asdf.lisp
+;;;;LANGUAGE:           Common-Lisp
+;;;;SYSTEM:             Common-Lisp
+;;;;USER-INTERFACE:     NONE
+;;;;DESCRIPTION
+;;;;
+;;;;    Defines a dummy ASDF package to be able to compile packages
+;;;;    depending on ASDF even when ASDF is missing.
+;;;;
+;;;;AUTHORS
+;;;;    <PJB> Pascal J. Bourguignon <pjb@informatimago.com>
+;;;;MODIFICATIONS
+;;;;    2015-07-07 <PJB> Created.
+;;;;BUGS
+;;;;LEGAL
+;;;;    AGPL3
+;;;;
+;;;;    Copyright Pascal J. Bourguignon 2015 - 2015
+;;;;
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
+;;;;
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
+;;;;
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+;;;;**************************************************************************
+(in-package "COMMON-LISP-USER")
+
+#-asdf
+(defpackage "ASDF"
+  (:use "COMMON-LISP")
+  (:export "DEFSYSTEM" "LOAD-OP" "TEST-OP" "OOS" "OPERATE"
+           "*COMPILE-FILE-WARNINGS-BEHAVIOUR*"
+           "*SYSTEM-DEFINITION-SEARCH-FUNCTIONS*"
+           "*CENTRAL-REGISTRY*"
+           "FIND-SYSTEM" "SYSTEM"
+           "COMPONENT-NAME" "COMPONENT-DEPENDS-ON"
+           "RUN-SHELL-COMMAND")
+  (:intern "*VERBOSE-OUT*"
+           "NAME" "LICENCE"))
+
+#-asdf
+(progn
+  (defvar asdf:*compile-file-warnings-behaviour*    nil)
+  (defvar asdf:*system-definition-search-functions* nil)
+  (defvar asdf:*verbose-out*                        nil)
+  (defvar asdf:*central-registry*                   nil))
+
+
+;;;; THE END ;;;;
diff --git a/tools/dummy-quicklisp.lisp b/tools/dummy-quicklisp.lisp
new file mode 100644
index 0000000..75d3ab3
--- /dev/null
+++ b/tools/dummy-quicklisp.lisp
@@ -0,0 +1,68 @@
+;;;; -*- mode:lisp;coding:utf-8 -*-
+;;;;**************************************************************************
+;;;;FILE:               dummy-quicklisp.lisp
+;;;;LANGUAGE:           Common-Lisp
+;;;;SYSTEM:             Common-Lisp
+;;;;USER-INTERFACE:     NONE
+;;;;DESCRIPTION
+;;;;
+;;;;    Defines a dummy QUICKLISP package to be able to compile
+;;;;    packages depending on QUICKLISP even when it is not present.
+;;;;
+;;;;AUTHORS
+;;;;    <PJB> Pascal J. Bourguignon <pjb@informatimago.com>
+;;;;MODIFICATIONS
+;;;;    2015-07-07 <PJB> Extracted from quicklisp.lisp.
+;;;;BUGS
+;;;;LEGAL
+;;;;    AGPL3
+;;;;
+;;;;    Copyright Pascal J. Bourguignon 2015 - 2015
+;;;;
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
+;;;;
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
+;;;;
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+;;;;**************************************************************************
+(in-package "COMMON-LISP-USER")
+
+#-quicklisp
+(defpackage "QUICKLISP"
+  (:nicknames "QL-DIST" "QL" "QUICKLISP-CLIENT")
+  (:export "CLEAN" "DIST" "ENABLED-DISTS" "ENSURE-INSTALLED"
+           "INSTALLED-RELEASES" "NAME" "PROJECT-NAME"
+           "PROVIDED-RELEASES" "PROVIDED-SYSTEMS" "QUICKLOAD"
+           "REGISTER-LOCAL-PROJECTS" "RELEASE" "UNINSTALL"
+           "UPDATE-ALL-DISTS" "UPDATE-CLIENT" "WHERE-IS-SYSTEM"))
+
+#-quicklisp
+(defmacro generate-dummy-functions (&rest funames)
+  `(progn ,@(mapcar (lambda (funame)
+                      `(defun ,funame (&rest args) (declare (ignore args)) nil))
+                    funames)))
+
+#-quicklisp
+(generate-dummy-functions
+ QUICKLISP:DIST
+ QUICKLISP:ENABLED-DISTS
+ QUICKLISP:ENSURE-INSTALLED
+ QUICKLISP:INSTALLED-RELEASES
+ QUICKLISP:PROVIDED-RELEASES
+ QUICKLISP:PROVIDED-SYSTEMS
+ QUICKLISP:QUICKLOAD
+ QUICKLISP:REGISTER-LOCAL-PROJECTS
+ QUICKLISP:RELEASE
+ QUICKLISP:UNINSTALL
+ QUICKLISP:UPDATE-ALL-DISTS
+ QUICKLISP:UPDATE-CLIENT
+ QUICKLISP:WHERE-IS-SYSTEM)
+
+;;;; THE END ;;;;
diff --git a/tools/dummy-uiop.lisp b/tools/dummy-uiop.lisp
new file mode 100644
index 0000000..2c3b497
--- /dev/null
+++ b/tools/dummy-uiop.lisp
@@ -0,0 +1,44 @@
+;;;; -*- mode:lisp;coding:utf-8 -*-
+;;;;**************************************************************************
+;;;;FILE:               dummy-uiop.lisp
+;;;;LANGUAGE:           Common-Lisp
+;;;;SYSTEM:             Common-Lisp
+;;;;USER-INTERFACE:     NONE
+;;;;DESCRIPTION
+;;;;
+;;;;    Defines a dummy UIOP package to be able to compile packages
+;;;;    depending on UIOP even when it is not available.
+;;;;
+;;;;AUTHORS
+;;;;    <PJB> Pascal J. Bourguignon <pjb@informatimago.com>
+;;;;MODIFICATIONS
+;;;;    2015-07-07 <PJB> Created.
+;;;;BUGS
+;;;;LEGAL
+;;;;    AGPL3
+;;;;
+;;;;    Copyright Pascal J. Bourguignon 2015 - 2015
+;;;;
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
+;;;;
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
+;;;;
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+;;;;**************************************************************************
+(in-package "COMMON-LISP-USER")
+
+(unless (find-package "UIOP")
+  (defpackage "UIOP"
+    (:use "COMMON-LISP")
+    (:export "SYMBOL-CALL")))
+
+;;;; THE END ;;;;
+
+
diff --git a/tools/quicklisp.lisp b/tools/quicklisp.lisp
index 892e711..473bbd8 100644
--- a/tools/quicklisp.lisp
+++ b/tools/quicklisp.lisp
@@ -33,37 +33,6 @@
 ;;;;**************************************************************************
 (in-package "COMMON-LISP-USER")

-#-quicklisp
-(defpackage "QUICKLISP"
-  (:nicknames "QL-DIST" "QL" "QUICKLISP-CLIENT")
-  (:export "CLEAN" "DIST" "ENABLED-DISTS" "ENSURE-INSTALLED"
-           "INSTALLED-RELEASES" "NAME" "PROJECT-NAME"
-           "PROVIDED-RELEASES" "PROVIDED-SYSTEMS" "QUICKLOAD"
-           "REGISTER-LOCAL-PROJECTS" "RELEASE" "UNINSTALL"
-           "UPDATE-ALL-DISTS" "UPDATE-CLIENT" "WHERE-IS-SYSTEM"))
-
-#-quicklisp
-(defmacro generate-dummy-functions (&rest funames)
-  `(progn ,@(mapcar (lambda (funame)
-                      `(defun ,funame (&rest args) (declare (ignore args)) nil))
-                    funames)))
-
-#-quicklisp
-(generate-dummy-functions
- QUICKLISP:DIST
- QUICKLISP:ENABLED-DISTS
- QUICKLISP:ENSURE-INSTALLED
- QUICKLISP:INSTALLED-RELEASES
- QUICKLISP:PROVIDED-RELEASES
- QUICKLISP:PROVIDED-SYSTEMS
- QUICKLISP:QUICKLOAD
- QUICKLISP:REGISTER-LOCAL-PROJECTS
- QUICKLISP:RELEASE
- QUICKLISP:UNINSTALL
- QUICKLISP:UPDATE-ALL-DISTS
- QUICKLISP:UPDATE-CLIENT
- QUICKLISP:WHERE-IS-SYSTEM)
-

 (defpackage "COM.INFORMATIMAGO.TOOLS.QUICKLISP"
   (:use "COMMON-LISP"
ViewGit