diff options
author | Ludovic Courtes <ludo@chbouib.org> | 2007-06-01 00:45:58 +0200 |
---|---|---|
committer | Ludovic Courtes <ludo@chbouib.org> | 2007-06-01 00:45:58 +0200 |
commit | 76b313969e72860092441f54cc9a4f52c8eaba57 (patch) | |
tree | 4cda1a869b69374c53fb9aef1d3205de855a0fd9 /doc/extract-guile-c-doc.scm | |
parent | be1614e554969c35c5a58fdf0deff4b065cde1fe (diff) | |
download | gnutls-76b313969e72860092441f54cc9a4f52c8eaba57.tar.gz |
Tiny bug fixes in Guile's documentation extraction.
* doc/extract-guile-c-doc.scm (main): Use named arguments rather than
a single rest arg.
Fixed the order of arguments as passed to
`run-cpp-and-extract-snarfing' so that `ccache gcc -E' is really
passed as `("ccache" "gcc" "-E")' (in this order).
* guile/modules/system/documentation/c-snarf.scm
(run-cpp-and-extract-snarfing): Pass FILE as the last CPP argument.
Diffstat (limited to 'doc/extract-guile-c-doc.scm')
-rw-r--r-- | doc/extract-guile-c-doc.scm | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/doc/extract-guile-c-doc.scm b/doc/extract-guile-c-doc.scm index de90a158eb..aa80b63c47 100644 --- a/doc/extract-guile-c-doc.scm +++ b/doc/extract-guile-c-doc.scm @@ -24,7 +24,7 @@ (srfi srfi-1)) -(define (main . args) +(define (main file cpp+args cpp-flags . procs) ;; Arguments: ;; ;; 1. C file to be processed; @@ -34,13 +34,11 @@ ;; to be output. If no such list is passed, then documentation for ;; all the Scheme functions available in the C source file is issued. ;; - (let* ((file (car args)) - (cpp+args (string-tokenize (cadr args))) - (cpp (car cpp+args)) - (cpp-flags (apply string-append (caddr args) - " -DSCM_MAGIC_SNARF_DOCS " - (cdr cpp+args))) - (procs (cdddr args))) + (let* ((cpp+args (string-tokenize cpp+args)) + (cpp (car cpp+args)) + (cpp-flags (append (cdr cpp+args) + (string-tokenize cpp-flags) + (list "-DSCM_MAGIC_SNARF_DOCS ")))) ;;(format (current-error-port) "cpp-flags: ~a~%" cpp-flags) (format (current-error-port) "extracting Texinfo doc from `~a'... " file) @@ -49,18 +47,18 @@ (*document-c-functions?* #f) (let ((proc-doc-list - (run-cpp-and-extract-snarfing file cpp - (string-tokenize cpp-flags)))) - (display (apply string-append - (map procedure-texi-documentation - (if (null? procs) - proc-doc-list - (filter (lambda (proc-doc) - (let ((proc-name - (assq-ref proc-doc - 'scheme-name))) - (member proc-name procs))) - proc-doc-list)))))) + (run-cpp-and-extract-snarfing file cpp cpp-flags))) + (display "@c Automatically generated, do not edit.\n") + (display (string-concatenate + (map procedure-texi-documentation + (if (null? procs) + proc-doc-list + (filter (lambda (proc-doc) + (let ((proc-name + (assq-ref proc-doc + 'scheme-name))) + (member proc-name procs))) + proc-doc-list)))))) (format (current-error-port) "done.~%") (exit 0))) |