/usr/share/autogen/agtexi-file.tpl is in autogen 1:5.18-2ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 | [= AutoGen5 template -*- Mode: texinfo -*-
texi
# Documentation template
#
# This file is part of AutoOpts, a companion to AutoGen.
# AutoOpts is free software.
# AutoOpts is Copyright (C) 1992-2013 by Bruce Korb - all rights reserved
#
# AutoOpts is available under any one of two licenses. The license
# in use must be one of these two and the choice is under the control
# of the user of the license.
#
# The GNU Lesser General Public License, version 3 or later
# See the files "COPYING.lgplv3" and "COPYING.gplv3"
#
# The Modified Berkeley Software Distribution License
# See the file "COPYING.mbsd"
#
# These files have the following sha256 sums:
#
# 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
# 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
# 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
=][=
INVOKE initialization =][=
(out-push-new (string-substitute (out-name) ".texi" ".menu"))
(ag-fprintf 0 "* %-32s Notes about %s\n"
(string-append program-name " Notes::")
program-name )
(out-pop)
(if (exist? "explain")
(emit (string-append "\n" (get "explain") "\n")) )
(set! tmp-str (get "option-doc-format" "texi"))
(divert-convert tmp-str)
=][=
IF (match-value? == "doc-section.ds-type" "DESCRIPTION") =][=
FOR doc-section =][=
IF (== (get "ds-type") "DESCRIPTION") =][=
(define cvt-fn (get "ds-format" "texi"))
(if (not (== cvt-fn "texi"))
(divert-convert cvt-fn) ) =][=
(emit (string-append "\n" (get "ds-text") "\n"))
=][=
BREAK =][=
ENDIF =][=
ENDFOR =][=
ELSE =][=
(join "\n\n"
(if (exist? "prog-info-descrip")
(stack "prog-info-descrip")
(if (exist? "prog-man-descrip")
(stack "prog-man-descrip")
(if (exist? "prog-descrip")
(stack "prog-descrip")
(stack "detail")
) ) ) ) =][=
ENDIF =][=
(convert-divert) =]
This [=(string-downcase doc-level)=] was generated by @strong{AutoGen},
using the @code{agtexi-cmd} template and the option descriptions for the [=(.
coded-prog-name)=] program.[= (name-copyright) =]
@menu
[=
(out-push-new) (out-suspend "menu")
(out-push-new)
(define label-str (string-append
program-name " help/usage Something"))
=][=#
@c = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =][=
FOR flag =][=
(set! opt-name (string-tr! (get "name") optname-from optname-to))
(if (exist? "documentation")
(begin
(set! label-str (string-append opt-name " options"))
(ag-fprintf "menu" menu-entry-fmt
(string-append opt-name ":: ") label-str)
(print-node opt-name label-str)
(ag-fprintf 0 "\n%s." (get "descrip"))
(set! tmp-str (get "documentation"))
(if (> (string-length tmp-str) 1)
(ag-fprintf 0 "\n%s" tmp-str))
)
(begin
(set! tmp-str (get "doc" invalid-doc))
(if (< 0 (string-length tmp-str)) (begin
(set! label-str (string-append opt-name " option"
(if (exist? "value")
(string-append " (-" (get "value") ")")
"" ) ))
(if have-doc-options
(ag-fprintf 0 opt-node-fmt opt-name label-str)
(begin
(ag-fprintf "menu" menu-entry-fmt
(string-append opt-name ":: ") label-str)
(print-node opt-name label-str)
)
)
(ag-fprintf 0 "\n@cindex %s-%s" down-prog-name opt-name)
) )
)
) =][=
IF (and (not (exist? "documentation"))
(< 0 (string-length tmp-str)) )
=][=
ENDIF =][=
ENDFOR flag =][=
INVOKE emit-doc-sections =][=
(out-suspend "opt-desc")
(out-resume "menu")
(emit (out-pop #t))
(emit "@end menu\n")
(out-resume "opt-desc")
(out-pop #t) =][=#
@c = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =][=
DEFINE emit-doc-sections =][=
FOR doc-section =][=
IF (define opt-name (string-capitalize! (get "ds-type")))
(or (== opt-name "Exit Status")
(== opt-name "Description")
(exist? "omit-texi")) =][=
CONTINUE =][=
ENDIF =][=
(ag-fprintf "menu" menu-entry-fmt (string-append opt-name "::") opt-name)
=][=
(set! label-str (string-append
down-prog-name " " (string-capitalize opt-name)))
=][=
(print-node opt-name label-str)
=][=
(define cvt-fn (get "ds-format" "texi"))
=][=
(if (not (== cvt-fn "texi"))
(divert-convert cvt-fn) ) =][=
(emit (string-append "\n" (get "ds-text") "\n"))
(convert-divert) =][=
ENDFOR doc-section =][=
ENDDEF emit-doc-sections
@c = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =][=
DEFINE header \=]
\input texinfo
@c -*-texinfo-*-
@c %**start of header
@setfilename [= (string-append down-prog-name ".info") =]
@settitle [= (sprintf (if (exist? "package") "%2$s - %1$s" "%s")
(get "package") (get "prog-title")) =]
@c %**end of header
@setchapternewpage off
@titlepage
@sp 10
@comment The title is printed in a large font.
@center @titlefont{Sample Title}
@c The following two commands start the copyright page.
@page
@vskip 0pt plus 1filll
[= (name-copyright) =][=
IF (exist? "copyright.type") =]
[= (license-full (get "copyright.type") program-name ""
(get "copyright.owner" (get "copyright.author" ""))
(get "copyright.date") ) =][=
ENDIF =]
@end titlepage
@node Top, [= prog-name =] usage, , (dir)
@top [= prog-title =]
[=
ENDDEF header
@c = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =][=
DEFINE initialization =][=
;; divert-convert divert text for conversion to .texi format
;; convert-divert convert the diversion done with divert-convert
;;
(define divert-convert (lambda (diversion-type) (begin
(set! was-diverted
(not (or (== diversion-type "texi") (== diversion-type ""))))
(if was-diverted (begin
(set! cvt-script
(find-file (string-append diversion-type "2texi")))
(if (not (defined? 'cvt-script))
(error (sprintf "unknown source format type: %s"
diversion-type)) )
(out-push-new) )) )))
(define heredoc-marker "_Unlikely_Here_Doc_Marker_\n")
(define convert-divert (lambda ()
(if was-diverted (shell (string-append
cvt-script "<<\\" heredoc-marker (out-pop #t) "\n" heredoc-marker
)) )))
(define was-diverted #f)
(define diversion-type "")
(define cvt-script "")
(define tmp-str "")
(define name-copyright (lambda ()
(if (exist? "copyright")
(string-append "\nThis software is released under "
(license-name (get "copyright.type" "an unknown copyright"))
"." ) ) ))
(make-tmp-dir)
(define program-name (get "prog-name"))
(define down-prog-name (string-downcase program-name))
(define UP-PROG-NAME (string-upcase program-name))
(shell "export AG_DEF_PROG_NAME=" program-name
"\nCLexe=`echo ${AGexe} | sed 's@/autogen@/columns@'`")
(define doc-level (getenv "LEVEL"))
(if (not (string? doc-level))
(set! doc-level "section"))
(define file-name (string-append down-prog-name ".texi"))
(define coded-prog-name (string-append "@code{" down-prog-name "}"))
(define replace-prog-name (lambda (nm)
(string-substitute (get nm) down-prog-name coded-prog-name ) ))
(define have-doc-options (exist? "flag.documentation"))
(define print-menu #t)
(define do-doc-nodes #f)
(define menu-entry-fmt (string-append
"* " down-prog-name " %-24s %s\n"))
(define emit-menu-entry (lambda (is-doc) (not is-doc)))
(if have-doc-options
(set! emit-menu-entry (lambda (is-doc) is-doc)) )
(define chk-flag-val (exist? "flag.value"))
(define flag-string (lambda (v-nm v-df) (if (not chk-flag-val) ""
(string-append " (-"
(if (exist? v-nm) (get v-nm) v-df)
")") )))
=][=
CASE (. doc-level) =][=
== document =][= INVOKE header =][=
(define sub-level "chapter")
(define head-level "heading") =][=
== chapter =][=
(define sub-level "section")
(define head-level "subheading") =][=
== section =][=
(define sub-level "subsection")
(define head-level "subsubheading") =][=
== subsection =][=
(define sub-level "subsubsection")
(define head-level "subsubheading") =][=
* =][=(error (sprintf "invalid doc level: %s\n" doc-level)) =][=
ESAC doc level =][=
(define node-fmt (string-append
"\n@node " down-prog-name " %s\n@" sub-level " %s"))
(define print-node (lambda (a b) (ag-fprintf 0 node-fmt a b) ))
(define opt-node-fmt (if have-doc-options
(string-append "\n@" head-level
" %2$s.\n@anchor{" down-prog-name " %1$s}")
node-fmt
))
(define exit-sts-fmt "\n\n@node %1$s %2$s\n@%3$s %1$s %2$s\n")
=][=
IF (not (== doc-level "document")) =][=
(set! file-name (string-append "invoke-" file-name))
\=]
@node [= prog-name =] Notes
@[=(. doc-level) =] Notes about [= prog-name =]
@pindex [= prog-name =]
@cindex [= prog-title =][=
FOR concept =]
@cindex [= concept =][=
ENDFOR =][=
ENDIF document component
=]
@ignore
[=
(out-move file-name)
(dne "# " "# ")
=]
@end ignore
[=
ENDDEF initialization
@c agtexi-cmd.tpl ends here =]
|