File: make-texinfo.scm

package info (click to toggle)
guile-lib 0.2.7-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,904 kB
  • sloc: lisp: 7,014; sh: 3,986; makefile: 191
file content (47 lines) | stat: -rwxr-xr-x 1,657 bytes parent folder | download | duplicates (6)
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
#!/bin/sh
# -*- scheme -*-
exec guile --debug -s $0 "$@"
!#

;; make-texinfo.scm -- document a set of scheme modules as texinfo
;; Copyright (C) 2006,2007,2009  Andy Wingo <wingo at pobox dot com>

;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program.  If not, see <http://www.gnu.org/licenses/>.

(use-modules (texinfo reflection)
             (texinfo serialize))

(define (main config-scm)
  (primitive-load config-scm)
  (display
   (stexi->texi
    (package-stexi-documentation
     (map car *modules*)
     *name*
     (string-append *texinfo-basename* ".info")
     (package-stexi-standard-prologue
      *name*
      (string-append *texinfo-basename* ".info")
      *texinfo-category*
      *description*
      (package-stexi-standard-copying
       *name* *version* *updated* *years* *copyright-holder* *permissions*)
      (package-stexi-standard-titlepage
       *name* *version* *updated* *authors*)
      (package-stexi-extended-menu
       *name* *modules* *scripts* *extra-texinfo-menu-entries*))
     *texinfo-epilogue*
     #:scripts (map car *scripts*)))))

(apply main (cdr (command-line)))