-
;;; generate-documentation.scm -- Generate documentation
;;;
;;; source file of the GNU LilyPond music typesetter
;;;
-;;; (c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+;;; (c) 2000--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
;;; Jan Nieuwenhuizen <janneke@gnu.org>
;;; File entry point for generated documentation
;;; Running LilyPond on this file generates the documentation
+(debug-enable 'debug)
+(debug-enable 'backtrace)
+(read-enable 'positions)
+;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;; TODO : make modules of these!
+;;;;;;;;;;;;;;;;
-;; We use ly-gulp because these files live in
-;;
-;; PATH=$LILYPONDPREFIX/scm:<datadir>/scm
-;;
-(eval-string (ly-gulp-file "documentation-lib.scm"))
-(eval-string (ly-gulp-file "engraver-documentation-lib.scm"))
-(eval-string (ly-gulp-file "backend-documentation-lib.scm"))
-
+(define load-files '("documentation-lib.scm"
+ "function-documentation.scm"
+ "engraver-documentation-lib.scm"
+ "music-documentation-lib.scm"
+ "backend-documentation-lib.scm"
+ ))
+(map ly:load load-files)
;;(define no-copies #t) ; from 490 to 410K, but doesn't look nice yet
;; are described...
(define no-copies #f)
-(let* ((doc (string-append
- (document-paper "LilyPond interpretation contexts")
- (document-all-engravers "LilyPond engravers")
- (document-all-elements "LilyPond backend")
- (document-all-interfaces "LilyPond interfaces")
- )
- )
- (name "lilypond-internals")
- (outname (string-append name ".texi"))
- (out (open-output-file outname)))
-
- (writing-wip outname)
- (display
- (string-append
- (texi-file-head
-
- ;; we can't use (dir) and top if we're included by lilypond.tely
- "LilyPond internals" name "(lilypond.info)"
- '(("LilyPond interpretation contexts" . "Hierarchy and grouping of Engravers")
- ("LilyPond engravers" . "Engravers create Elements")
- ("LilyPond backend" . "Detailed description of all Elements")
- ("LilyPond interfaces" . "Element Interfaces")))
-
- doc
- "\n@bye")
- out))
+(define file-name "lilypond-internals")
+(define outname (string-append file-name ".texi"))
+(define out-port (open-output-file outname))
+
+(writing-wip outname)
+
+(display
+ (string-append
+ "@c -*-texinfo-*-"
+ (texi-file-head "LilyPond internals" outname "(lilypond.info)")
+ "
+
+@ifhtml
+@macro usermanref{NAME}
+@uref{../lilypond/\\NAME\\.html,\\NAME\\}
+@cindex \\NAME\\
+@end macro
+@end ifhtml
+
+@ifinfo
+@macro usermanref{NAME}
+@inforef{\\NAME\\,,lilypond}
+@cindex \\NAME\\
+@end macro
+@end ifinfo
+
+@ifhtml
+@macro glossaryref{NAME}
+@uref{../music-glossary/\\NAME\\.html,\\NAME\\}
+@cindex \\NAME\\
+@end macro
+@end ifhtml
+
+@ifinfo
+@macro glossaryref{NAME}
+@inforef{\\NAME\\,,music-glossary}
+@cindex \\NAME\\
+@end macro
+@end ifinfo
+
+
+@ignore
+@omftitle LilyPond internals
+@omfcreator Han-Wen Nienhuys and Jan Nieuwenhuizen
+@omfdescription Programmer's reference of the LilyPond music engraving system
+@omftype user manual
+@omfcategory Music
+@end ignore
+
+
+") out-port)
+
+(define top-node
+ (make <texi-node>
+ #:name "Top"
+ #:children
+ (list
+ (music-doc-node)
+ (translation-doc-node)
+ (backend-doc-node)
+ (all-scheme-functions-doc)
+ (make <texi-node>
+ #:name "Index"
+ #:text "
+@unnumbered Concept index
+
+@printindex cp
+
+@unnumbered Variable index
+
+@printindex vr
+
+@unnumbered Function index
+
+@printindex fn
+
+\n@bye"
+
+
+ )
+ )))
+
+(dump-node top-node out-port 0)
(newline (current-error-port))