X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fgenerate-documentation.scm;h=d83a2b179636d4c6bfcba6b1b260eb5d5f146fa3;hb=de658c9789658317b265eb7f3fd34a87c7a8f953;hp=09a8a72ee6b4d34c8338ec07f3f2619a70192cbf;hpb=c802622f935af83bb791ded58056428d6be31d0a;p=lilypond.git diff --git a/scm/generate-documentation.scm b/scm/generate-documentation.scm index 09a8a72ee6..d83a2b1796 100644 --- a/scm/generate-documentation.scm +++ b/scm/generate-documentation.scm @@ -1,25 +1,29 @@ - ;;; generate-documentation.scm -- Generate documentation ;;; ;;; source file of the GNU LilyPond music typesetter ;;; -;;; (c) 2000 Han-Wen Nienhuys +;;; (c) 2000--2002 Han-Wen Nienhuys ;;; Jan Nieuwenhuizen ;;; 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:/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 @@ -29,30 +33,88 @@ ;; 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 + #:name "Top" + #:children + (list + (music-doc-node) + (translation-doc-node) + (backend-doc-node) + (all-scheme-functions-doc) + (make + #: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))