1 ;;; com.dvlsoft.clon.asd --- ASDF system definition
3 ;; Copyright (C) 2010, 2011, 2012 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 (if (featurep :ffi)
35 (handler-case (asdf:load-system :cffi-grovel)
36 (asdf:missing-component ()
37 (format *error-output* "~
38 *********************************************************************
39 * WARNING: ASDF component CFFI-GROVEL not found. *
40 * Clon will be loaded without support for terminal autodetection. *
41 * See section A.1 of the user manual for more information. *
42 *********************************************************************")))
43 (format *error-output* "~
44 *********************************************************************
45 * WARNING: CLISP is compiled without ffi support. *
46 * Clon will be loaded without support for terminal autodetection. *
47 * See section A.1 of the user manual for more information. *
48 *********************************************************************")))
50 (defpackage :com.dvlsoft.clon.asdf
51 (:documentation "The Command-Line Options Nuker package for ASDF.")
53 (:export :define-constant
54 :+release-major-level+
55 :+release-minor-level+
56 :+release-status+ :+release-status-level+
61 (in-package :com.dvlsoft.clon.asdf)
63 (defmacro define-constant (name value &optional doc)
64 `(defconstant ,name (if (boundp ',name) (symbol-value ',name) ,value)
65 ,@(when doc (list doc))))
67 (defconstant +release-major-level+ 1
68 "The major level of this release.")
70 (defconstant +release-minor-level+ 0
71 "The minor level of this release.")
73 (defconstant +release-status+ :beta
74 "The status of this release.")
76 (defconstant +release-status-level+ 20
77 "The status level of this release.")
79 (define-constant +release-name+ "Michael Brecker"
80 "The name of this release.")
82 ;; #### TODO: I'm sure the format strings can be improved
83 (defun %version (type major minor status level name)
89 (when (eq status :patchlevel)
113 release candidate ~*~S ~;~
114 ~:[patchlevel ~S ~;~*~]~
128 (defun version (&optional (type :number))
129 "Return the current version of Clon.
130 TYPE can be one of :number, :short or :long.
132 A version number is computed as major*10000 + minor*100 + patchlevel, leaving
133 two digits for each level. Alpha, beta and rc status are ignored in version
136 A short version is something like 1.3{a,b,rc}4, or 1.3.4 for patchlevel.
137 Alpha, beta or rc levels start at 1. Patchlevels start at 0 but are ignored
138 in the output, so that 1.3.0 appears as just 1.3.
140 A long version is something like
141 1.3 {alpha,beta,release candidate,patchlevel} 4 \"Michael Brecker\". As for
142 the short version, a patchlevel of 0 is ignored in the output."
143 (%version type +release-major-level+ +release-minor-level+
144 +release-status+ +release-status-level+
147 (asdf:defsystem :com.dvlsoft.clon
148 :description "The Command-Line Options Nuker."
149 :long-description "Clon is a library for command-line option management.
150 It is intended to ease the creation of standalone Common Lisp applications by
151 providing a powerful and uniform command-line option interface.
152 The most important features of Clon are:
153 - [from the programmer's point of view] Centralized command-line options
154 specification and management, including automatic generation of help
155 strings, conversion from command-line / environment strings to
156 application-level option values, global or on-demand option retrieval, and
157 extensibility (the programmer can define his own option types).
158 - [from the end-user's point of view] Uniform command-line option syntax
159 across Clonified applications, including customization of the help strings
160 layout (with optional ISO6429 coloring on terminals that support it),
161 possibly abbreviated option calls and short/long syntax."
162 :author "Didier Verna <didier@lrde.epita.fr>"
163 :maintainer "Didier Verna <didier@lrde.epita.fr>"
165 :version #.(version :long)
166 :depends-on (#+sbcl :sb-posix
167 #+(and clisp ffi cffi) :cffi)
168 :components ((:file "package")
170 :depends-on ("package")
176 :components ((sb-grovel:grovel-constants-file
177 "constants" :package :com.dvlsoft.clon)
182 :components ((cffi-grovel:grovel-file "constants")
186 :depends-on ("termio")
187 :components ((:file "util")
188 (:file "item" :depends-on ("util"))
189 (:file "text" :depends-on ("item"))
192 :components ((:file "option")
194 :depends-on ("option"))
196 :depends-on ("option"))
198 :depends-on ("valued"))
200 :depends-on ("negatable"))
205 :depends-on ("valued"))
207 :depends-on ("valued"))
209 :depends-on ("valued"))
217 :depends-on ("valued"
220 (:file "container" :depends-on ("options"))
221 (:file "group" :depends-on ("container"))
223 :depends-on ("options")
224 :components ((:file "cmdline")
226 (:file "synopsis" :depends-on ("group"))
228 :depends-on ("synopsis" "retrieval")
229 :components ((:file "face")
231 :depends-on ("face"))))
233 :depends-on ("output"))))))
236 ;;; com.dvlsoft.clon.asd ends here