1 ;;; com.dvlsoft.clon.asd --- ASDF system definition
3 ;; Copyright (C) 2010 Didier Verna
5 ;; Author: Didier Verna <didier@lrde.epita.fr>
6 ;; Maintainer: Didier Verna <didier@lrde.epita.fr>
7 ;; Created: Wed Jun 18 08:40:38 2008
8 ;; Last Revision: Sat Jun 12 17:53:54 2010
10 ;; This file is part of clon.
12 ;; Clon is free software; you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License version 3,
14 ;; as published by the Free Software Foundation.
16 ;; Clon is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;; GNU General Public License for more details.
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with this program; if not, write to the Free Software
23 ;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28 ;; Contents management by FCM version 0.1.
35 (eval-when (:load-toplevel :execute)
36 #+sbcl (require :sb-grovel)
37 #+clisp (handler-case (asdf:operate 'asdf:load-op :cffi-grovel)
38 (asdf:missing-component ()
39 (format *error-output* "~
40 *********************************************************************
41 * WARNING: ASDF component CFFI-GROVEL not found. *
42 * Clon will be loaded without support for terminal autodetection. *
43 * See section A.1 of the user manual for more information. *
44 *********************************************************************"))))
46 (defpackage :com.dvlsoft.clon.asdf
47 (:documentation "The Command-Line Options Nuker package for ASDF.")
49 (:export :define-constant
50 :+release-major-level+
51 :+release-minor-level+
52 :+release-status+ :+release-status-level+
57 (in-package :com.dvlsoft.clon.asdf)
59 (defmacro define-constant (name value &optional doc)
60 `(defconstant ,name (if (boundp ',name) (symbol-value ',name) ,value)
61 ,@(when doc (list doc))))
63 (defconstant +release-major-level+ 1
64 "The major level of this release.")
66 (defconstant +release-minor-level+ 0
67 "The minor level of this release.")
69 (defconstant +release-status+ :beta
70 "The status of this release.")
72 (defconstant +release-status-level+ 18
73 "The status level of this release.")
75 (define-constant +release-name+ "Michael Brecker"
76 "The name of this release.")
78 ;; #### TODO: I'm sure the format strings can be improved
79 (defun %version (type major minor status level name)
85 (when (eq status :patchlevel)
109 release candidate ~*~S ~;~
110 ~:[patchlevel ~S ~;~*~]~
124 (defun version (&optional (type :number))
125 "Return the current version of Clon.
126 TYPE can be one of :number, :short or :long.
128 A version number is computed as major*10000 + minor*100 + patchlevel, leaving
129 two digits for each level. Alpha, beta and rc status are ignored in version
132 A short version is something like 1.3{a,b,rc}4, or 1.3.4 for patchlevel.
133 Alpha, beta or rc levels start at 1. Patchlevels start at 0 but are ignored
134 in the output, so that 1.3.0 appears as just 1.3.
136 A long version is something like
137 1.3 {alpha,beta,release candidate,patchlevel} 4 \"Michael Brecker\". As for
138 the short version, a patchlevel of 0 is ignored in the output."
139 (%version type +release-major-level+ +release-minor-level+
140 +release-status+ +release-status-level+
143 (asdf:defsystem :com.dvlsoft.clon
144 :description "The Command-Line Options Nuker."
145 :long-description "Clon is a library for command-line option management.
146 It is intended to ease the creation of standalone Common Lisp applications by
147 providing a powerful and uniform command-line option interface.
148 The most important features of Clon are:
149 - [from the programmer's point of view] Centralized command-line options
150 specification and management, including automatic generation of help
151 strings, conversion from command-line / environment strings to
152 application-level option values, global or on-demand option retrieval, and
153 extensibility (the programmer can define his own option types).
154 - [from the end-user's point of view] Uniform command-line option syntax
155 across Clonified applications, including customization of the help strings
156 layout (with optional ISO6429 coloring on terminals that support it),
157 possibly abbreviated option calls and short/long syntax."
158 :author "Didier Verna <didier@lrde.epita.fr>"
159 :maintainer "Didier Verna <didier@lrde.epita.fr>"
161 :version #.(version :long)
162 :depends-on (#+sbcl :sb-posix
163 #+(and clisp cffi) :cffi)
164 :components ((:file "package")
167 :depends-on ("package")
169 :components ((sb-grovel:grovel-constants-file
170 "constants" :package :com.dvlsoft.clon)
175 :depends-on ("package")
177 :components ((cffi-grovel:grovel-file "constants")
180 :depends-on (#+sbcl "sbcl"
181 #+(and clisp cffi) "clisp"
183 :components ((:file "util")
184 (:file "item" :depends-on ("util"))
185 (:file "text" :depends-on ("item"))
188 :components ((:file "option")
190 :depends-on ("option"))
192 :depends-on ("option"))
194 :depends-on ("valued"))
196 :depends-on ("negatable"))
201 :depends-on ("valued"))
203 :depends-on ("valued"))
205 :depends-on ("valued"))
209 ("valued" "enum-base"))
212 :depends-on ("valued"
215 (:file "container" :depends-on ("options"))
216 (:file "group" :depends-on ("container"))
218 :depends-on ("options")
219 :components ((:file "cmdline")
221 (:file "synopsis" :depends-on ("group"))
223 :depends-on ("synopsis" "retrieval")
224 :components ((:file "face")
226 :depends-on ("face"))))
227 (:file "context" :depends-on ("output"))))))
230 ;;; com.dvlsoft.clon.asd ends here