1 ;;; com.dvlsoft.clon.asd --- ASDF system definition
3 ;; Copyright (C) 2010, 2011 Didier Verna
5 ;; Author: Didier Verna <didier@lrde.epita.fr>
6 ;; Maintainer: Didier Verna <didier@lrde.epita.fr>
8 ;; This file is part of clon.
10 ;; Permission to use, copy, modify, and distribute this software for any
11 ;; purpose with or without fee is hereby granted, provided that the above
12 ;; copyright notice and this permission notice appear in all copies.
14 ;; THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
15 ;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
16 ;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
17 ;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
18 ;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
19 ;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
20 ;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
25 ;; Contents management by FCM version 0.1.
32 (eval-when (:load-toplevel :execute)
33 #+sbcl (require :sb-grovel)
34 #+clisp (handler-case (asdf:operate 'asdf:load-op :cffi-grovel)
35 (asdf:missing-component ()
36 (format *error-output* "~
37 *********************************************************************
38 * WARNING: ASDF component CFFI-GROVEL not found. *
39 * Clon will be loaded without support for terminal autodetection. *
40 * See section A.1 of the user manual for more information. *
41 *********************************************************************"))))
43 (defpackage :com.dvlsoft.clon.asdf
44 (:documentation "The Command-Line Options Nuker package for ASDF.")
46 (:export :define-constant
47 :+release-major-level+
48 :+release-minor-level+
49 :+release-status+ :+release-status-level+
54 (in-package :com.dvlsoft.clon.asdf)
56 (defmacro define-constant (name value &optional doc)
57 `(defconstant ,name (if (boundp ',name) (symbol-value ',name) ,value)
58 ,@(when doc (list doc))))
60 (defconstant +release-major-level+ 1
61 "The major level of this release.")
63 (defconstant +release-minor-level+ 0
64 "The minor level of this release.")
66 (defconstant +release-status+ :beta
67 "The status of this release.")
69 (defconstant +release-status-level+ 20
70 "The status level of this release.")
72 (define-constant +release-name+ "Michael Brecker"
73 "The name of this release.")
75 ;; #### TODO: I'm sure the format strings can be improved
76 (defun %version (type major minor status level name)
82 (when (eq status :patchlevel)
106 release candidate ~*~S ~;~
107 ~:[patchlevel ~S ~;~*~]~
121 (defun version (&optional (type :number))
122 "Return the current version of Clon.
123 TYPE can be one of :number, :short or :long.
125 A version number is computed as major*10000 + minor*100 + patchlevel, leaving
126 two digits for each level. Alpha, beta and rc status are ignored in version
129 A short version is something like 1.3{a,b,rc}4, or 1.3.4 for patchlevel.
130 Alpha, beta or rc levels start at 1. Patchlevels start at 0 but are ignored
131 in the output, so that 1.3.0 appears as just 1.3.
133 A long version is something like
134 1.3 {alpha,beta,release candidate,patchlevel} 4 \"Michael Brecker\". As for
135 the short version, a patchlevel of 0 is ignored in the output."
136 (%version type +release-major-level+ +release-minor-level+
137 +release-status+ +release-status-level+
140 (asdf:defsystem :com.dvlsoft.clon
141 :description "The Command-Line Options Nuker."
142 :long-description "Clon is a library for command-line option management.
143 It is intended to ease the creation of standalone Common Lisp applications by
144 providing a powerful and uniform command-line option interface.
145 The most important features of Clon are:
146 - [from the programmer's point of view] Centralized command-line options
147 specification and management, including automatic generation of help
148 strings, conversion from command-line / environment strings to
149 application-level option values, global or on-demand option retrieval, and
150 extensibility (the programmer can define his own option types).
151 - [from the end-user's point of view] Uniform command-line option syntax
152 across Clonified applications, including customization of the help strings
153 layout (with optional ISO6429 coloring on terminals that support it),
154 possibly abbreviated option calls and short/long syntax."
155 :author "Didier Verna <didier@lrde.epita.fr>"
156 :maintainer "Didier Verna <didier@lrde.epita.fr>"
158 :version #.(version :long)
159 :depends-on (#+sbcl :sb-posix
160 #+(and clisp cffi) :cffi)
161 :components ((:file "package")
164 :depends-on ("package")
166 :components ((sb-grovel:grovel-constants-file
167 "constants" :package :com.dvlsoft.clon)
172 :depends-on ("package")
174 :components ((cffi-grovel:grovel-file "constants")
177 :depends-on (#+sbcl "sbcl"
178 #+(and clisp cffi) "clisp"
180 :components ((:file "util")
181 (:file "item" :depends-on ("util"))
182 (:file "text" :depends-on ("item"))
185 :components ((:file "option")
187 :depends-on ("option"))
189 :depends-on ("option"))
191 :depends-on ("valued"))
193 :depends-on ("negatable"))
198 :depends-on ("valued"))
200 :depends-on ("valued"))
202 :depends-on ("valued"))
206 ("valued" "enum-base"))
209 :depends-on ("valued"
212 (:file "container" :depends-on ("options"))
213 (:file "group" :depends-on ("container"))
215 :depends-on ("options")
216 :components ((:file "cmdline")
218 (:file "synopsis" :depends-on ("group"))
220 :depends-on ("synopsis" "retrieval")
221 :components ((:file "face")
223 :depends-on ("face"))))
224 (:file "context" :depends-on ("output"))))))
227 ;;; com.dvlsoft.clon.asd ends here