]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/generate-documentation.scm
patch::: 1.3.103.jcn3
[lilypond.git] / scm / generate-documentation.scm
index 14db4f9ce8d22e2274db26ede5885bfbadf4a52c..fa6d30246c7a18d3dafb1a3b19f447e66262ab89 100644 (file)
@@ -1,20 +1,45 @@
 
+;;; generate-documentation.scm -- Generate documentation
+;;;
+;;; source file of the GNU LilyPond music typesetter
+;;; 
+;;; (c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+;;; Jan Nieuwenhuizen <janneke@gnu.org>
 
-(define (urlfy x)
-  (string-append "<a href=" x ".html>" x "</a>"))
+;;; File entry point for generated documentation
 
-(define (human-listify l)
-  (cond
-   ((null? l) "none")
-   ((null? (cdr l)) (car l))
-   ((null? (cddr l)) (string-append (car l) " and " (cadr l)))
-   (else (string-append (car l) ", " (human-listify (cdr l))))
-   ))
+;;; Running LilyPond on this file generates the documentation
 
 
-(define (writing-wip x)
-      (display (string-append "Writing " x " ... \n") (current-error-port))
-      )
 
-(eval-string (ly-gulp-file "generate-engraver-documentation.scm"))
-(eval-string (ly-gulp-file "generate-backend-documentation.scm"))
+;; 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"))
+
+(let* ((doc (string-append
+           (document-paper "LilyPond interpretation contexts")
+           (document-all-engravers "LilyPond engravers")
+           (document-all-elements "LilyPond backend")))
+       (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 interpretation contexts" . "Hierarchy and grouping of Engravers")
+       ("LilyPond engravers" . "Engravers create Elements")
+       ("LilyPond backend" . "Detailed description of all Elements")))
+     
+     doc)
+    out))
+
+(newline (current-error-port))