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 #+sbcl (require :sb-grovel)
37 (defpackage :com.dvlsoft.clon.asdf
39 (:export :define-constant
40 :+release-major-level+
41 :+release-minor-level+
42 :+release-status+ :+release-status-level+
47 (in-package :com.dvlsoft.clon.asdf)
49 (defmacro define-constant (name value &optional doc)
50 `(defconstant ,name (if (boundp ',name) (symbol-value ',name) ,value)
51 ,@(when doc (list doc))))
53 (defconstant +release-major-level+ 1
54 "The major level of this release.")
56 (defconstant +release-minor-level+ 0
57 "The minor level of this release.")
59 (defconstant +release-status+ :beta
60 "The status of this release.")
62 (defconstant +release-status-level+ 14
63 "The status level of this release.")
65 (define-constant +release-name+ "Michael Brecker"
66 "The name of this release.")
68 ;; #### TODO: I'm sure the format strings can be improved
69 (defun %version (type major minor status level name)
75 (when (eq status :patchlevel)
99 release candidate ~*~S ~;~
100 ~:[patchlevel ~S ~;~*~]~
114 (defun version (&optional (type :number))
115 "Return the current version of Clon.
116 TYPE can be one of :number, :short or :long.
118 A version number is computed as major*10000 + minor*100 + patchlevel, leaving
119 two digits for each level. Alpha, beta and rc status are ignored in version
122 A short version is something like 1.3{a,b,rc}4, or 1.3.4 for patchlevel.
123 Alpha, beta or rc levels start at 1. Patchlevels start at 0 but are ignored
124 in the output, so that 1.3.0 appears as just 1.3.
126 A long version is something like
127 1.3 {alpha,beta,release candidate,patchlevel} 4 \"Michael Brecker\". As for
128 the short version, a patchlevel of 0 is ignored in the output."
129 (%version type +release-major-level+ +release-minor-level+
130 +release-status+ +release-status-level+
133 (asdf:defsystem :com.dvlsoft.clon
134 :description "The Command-Line Options Nuker."
135 :long-description "Clon is a library for command-line option management.
136 It is intended to ease the creation of standalone Common Lisp applications by
137 providing a powerful and uniform command-line option interface.
138 The most important features of Clon are:
139 - [from the programmer's point of view] Centralized command-line options
140 specification and management, including automatic generation of help
141 strings, conversion from command-line / environment strings to
142 application-level option values, global or on-demand option retrieval, and
143 extensibility (the programmer can define his own option types).
144 - [from the end-user's point of view] Uniform command-line option syntax
145 across Clonified applications, including customization of the help strings
146 layout (with optional ISO6429 coloring on terminals that support it),
147 possibly abbreviated option calls and short/long syntax."
148 :author "Didier Verna <didier@lrde.epita.fr>"
149 :maintainer "Didier Verna <didier@lrde.epita.fr>"
151 :version #.(version :long)
152 :depends-on (#+sbcl :sb-posix #+sbcl :sb-grovel)
153 :components ((:file "package")
154 #+sbcl (:module "sbcl"
155 :depends-on ("package")
156 :components ((sb-grovel:grovel-constants-file
157 "constants" :package :com.dvlsoft.clon)))
159 :depends-on (#+sbcl "sbcl"
161 :components ((:file "util")
162 (:file "item" :depends-on ("util"))
163 (:file "text" :depends-on ("item"))
166 :components ((:file "option")
168 :depends-on ("option"))
170 :depends-on ("option"))
172 :depends-on ("valued"))
174 :depends-on ("negatable"))
179 :depends-on ("valued"))
181 :depends-on ("valued"))
183 :depends-on ("valued"))
187 ("valued" "enum-base"))
190 :depends-on ("valued"
193 (:file "container" :depends-on ("options"))
194 (:file "group" :depends-on ("container"))
196 :depends-on ("options")
197 :components ((:file "cmdline")
199 (:file "synopsis" :depends-on ("group"))
201 :depends-on ("synopsis" "retrieval")
202 :components ((:file "face")
204 :depends-on ("face"))))
205 (:file "context" :depends-on ("output"))))))
208 ;;; com.dvlsoft.clon.asd ends here