Generalize installation vs. lisp implementation.
[clon.git] / doc / generate.cl
blobb05fc946323794539e27d74ffbedaa6d1613bac4
1 ;;; generate.cl --- Clon reference manual generation script
3 ;; Copyright (C) 2010 Didier Verna
5 ;; Author: Didier Verna <didier@lrde.epita.fr>
6 ;; Maintainer: Didier Verna <didier@lrde.epita.fr>
7 ;; Created: Tue Sep 21 15:26:35 2010
8 ;; Last Revision: Sun Nov 7 21:07:47 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 as published by
14 ;; the Free Software Foundation; either version 2 of the License, or
15 ;; (at your option) any later version.
17 ;; Clon is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;; GNU General Public License for more details.
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with this program; if not, write to the Free Software
24 ;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 ;;; Commentary:
29 ;; Contents management by FCM version 0.1.
32 ;;; Code:
34 (require :asdf)
36 (defconstant +introduction+
37 "@macro clon
38 @t{Clon}
39 @end macro
41 @macro cmdline
42 command-line
43 @end macro
45 @macro CmdLine
46 Command-Line
47 @end macro
49 @macro cl
50 Common-Lisp
51 @end macro
53 @macro tty
54 @t{tty}
55 @end macro
57 @macro etc
58 @i{etc.}
59 @end macro
61 @macro pxenduserref{node}
62 @ifinfo
63 @pxref{\\node\\, , , clon-enduser, The Clon End-User Manual}
64 @end ifinfo
65 @ifnotinfo
66 @pxref{\\node\\, , , enduser, The Clon End-User Manual}
67 @end ifnotinfo
68 @end macro
70 @macro pxuserref{node}
71 @ifinfo
72 @pxref{\\node\\, , , clon-user, The Clon User Manual}
73 @end ifinfo
74 @ifnotinfo
75 @pxref{\\node\\, , , user, The Clon User Manual}
76 @end ifnotinfo
77 @end macro
79 @clon{} is a library for managing @cmdline{} options in standalone @cl{}
80 applications. It provides a unified option syntax with both short and
81 long names, automatic completion of partial names and automatic
82 retrieval/conversion of option arguments from the @cmdline{}, associated
83 environment variables, fallback or default values. @clon{} comes with a
84 set of extensible option types (switches, paths, strings @etc{}).
85 @clon{} also provides automatic generation and formatting of help
86 strings, with support for highlighting on @tty{}'s through ISO/IEC 6429
87 SGR. This formatting is customizable through @emph{themes}.
89 Depending on the target audience, @clon{} stands for either ``The
90 @CmdLine{} Options Nuker'' or ``The @cl{} Options Nuker''. @clon{} also
91 has a recursive acronym: ``@clon{} Likes Options Nuking'', and a reverse
92 one: ``Never Omit to Link with @clon{}''. Other possible expansions of
93 the acronym are still being investigated.
95 This is the @clon{} reference manual, and as such, it is not meant to be
96 read. It may help you find sleep in case of insomnia though. @clon{}
97 comes with two human-readable manuals:
98 @itemize @bullet
99 @item
100 the ``end-user manual'' (@pxenduserref{Top}) is for the @clon{}
101 @emph{end-user}, that is, the user of an application powered by @clon{}.
102 It describes how to use the @cmdline{} of clonified@footnote{An
103 application using @clon{} for its @cmdline{} option management is said to
104 be @emph{clonified}. It is also possible to say @emph{clonfiscated}.
105 However, we advise against using @emph{clonistified}. The term
106 @emph{clonificated} is also considered bad style, and the use of
107 @emph{clonificationated} is strictly prohibited.} applications and how to
108 customize @clon{}'s output. Everybody should read this manual first.
109 @item
110 the ``user manual'' (@pxenduserref{Top}) is for the @clon{} @emph{user},
111 that is, the developer of a @cl{} application who wants to use @clon{} for
112 @cmdline{} option management. It describes how to clonify your application
113 and extend the library with your own option types.
114 @end itemize"
115 "The reference manual's introductory text.")
117 (asdf:operate 'asdf:load-op :com.dvlsoft.declt)
119 (if (and (second sb-ext:*posix-argv*)
120 (string= (second sb-ext:*posix-argv*) "--web"))
121 (com.dvlsoft.declt:declt :com.dvlsoft.clon
122 :library-name "Clon"
123 :texi-file "webreference.texi"
124 ;; but we don't care
125 :info-file "clon-webreference"
126 :introduction +introduction+
127 :link-files nil)
128 (com.dvlsoft.declt:declt :com.dvlsoft.clon
129 :library-name "Clon"
130 :texi-file "reference.texi"
131 :info-file "clon-reference"
132 :introduction +introduction+))
134 (sb-ext:quit)
137 ;;; generate.cl ends here