Bump version number to 1.0b15.
[clon.git] / com.dvlsoft.clon.asd
blob1036ff58f465bde9a2c783f2ae20a865690c5bb3
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.
26 ;;; Commentary:
28 ;; Contents management by FCM version 0.1.
31 ;;; Code:
33 (in-package :cl-user)
35 #+sbcl (require :sb-grovel)
37 (defpackage :com.dvlsoft.clon.asdf
38     (:use :cl)
39   (:export :define-constant
40            :+release-major-level+
41            :+release-minor-level+
42            :+release-status+ :+release-status-level+
43            :+release-name+
44            :version))
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+ 15
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)
70   (ecase type
71     (:number
72      (apply #'+
73        (* major 10000)
74        (* minor 100)
75        (when (eq status :patchlevel)
76          (list level))))
77     (:short
78      (format nil "~S.~S~
79                  ~[~
80                    a~*~S~;~
81                    b~*~S~;~
82                    rc~*~S~;~
83                    ~:[.~S~;~*~]~
84                  ~]"
85        major
86        minor
87        (ecase status
88          (:alpha 0)
89          (:beta 1)
90          (:rc 2)
91          (:patchlevel 3))
92        (zerop level)
93        level))
94     (:long
95      (format nil "~S.~S ~
96                  ~[~
97                    alpha ~*~S ~;~
98                    beta ~*~S ~;~
99                    release candidate ~*~S ~;~
100                    ~:[patchlevel ~S ~;~*~]~
101                  ~]~
102                  ~S"
103        major
104        minor
105        (ecase status
106          (:alpha 0)
107          (:beta 1)
108          (:rc 2)
109          (:patchlevel 3))
110        (zerop level)
111        level
112        name))))
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
120 numbers.
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+
131             +release-name+))
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>"
150   :license "GNU GPL"
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)))
158                (module "src"
159                  :depends-on (#+sbcl "sbcl"
160                               "package")
161                  :components ((:file "util")
162                               (:file "item" :depends-on ("util"))
163                               (:file "text" :depends-on ("item"))
164                               (:module "options"
165                                 :depends-on ("text")
166                                 :components ((:file "option")
167                                              (:file "flag"
168                                                     :depends-on ("option"))
169                                              (:file "valued"
170                                                     :depends-on ("option"))
171                                              (:file "negatable"
172                                                     :depends-on ("valued"))
173                                              (:file "switch-base"
174                                                     :depends-on ("negatable"))
175                                              (:file "switch"
176                                                     :depends-on
177                                                     ("switch-base"))
178                                              (:file "stropt"
179                                                     :depends-on ("valued"))
180                                              (:file "lispobj"
181                                                     :depends-on ("valued"))
182                                              (:file "path"
183                                                     :depends-on ("valued"))
184                                              (:file "enum-base")
185                                              (:file "enum"
186                                                     :depends-on
187                                                     ("valued" "enum-base"))
188                                              (:file
189                                               "xswitch"
190                                               :depends-on ("valued"
191                                                            "switch-base"
192                                                            "enum-base"))))
193                               (:file "container" :depends-on ("options"))
194                               (:file "group" :depends-on ("container"))
195                               (:module "retrieval"
196                                 :depends-on ("options")
197                                 :components ((:file "cmdline")
198                                              (:file "environ")))
199                               (:file "synopsis" :depends-on ("group"))
200                               (:module "output"
201                                 :depends-on ("synopsis" "retrieval")
202                                 :components ((:file "face")
203                                              (:file "sheet"
204                                                     :depends-on ("face"))))
205                               (:file "context" :depends-on ("output"))))))
208 ;;; com.dvlsoft.clon.asd ends here