Next: guile-tools guile-config, Previous: guile-tools generate-METAINFO, Up: Miscellaneous Tools
Usage: generate-autoload [OPTIONS] FILE1 FILE2 ...
The autoload form is displayed to standard output:
(define-module (guile-user)
#:autoload (ZAR FOO) (FOO-1 FOO-2 ...)
:
:
#:autoload (ZAR BAR) (BAR-1 BAR-2 ...))
For each file, a symbol triggers an autoload if it is found in one
of these situations:
- in the `#:export' clause of a `define-module' form
- in a top-level `export' or `export-syntax' form
- in a `define-public' form
- in a `defmacro-public' form
The module name is inferred from the `define-module' form. If either the
module name or the exports list cannot be determined, no autoload entry is
generated for that file.
Options:
--target MODULE-NAME -- Use MODULE-NAME instead of `(guile-user)'.
Note that some shells may require you to
quote the argument to handle parentheses
and spaces.
--sexp -- Instead of the `define-module' form,
display a form (RESULT ...), with
each RESULT being the form produced
by `module-name/exports' (see below).
Usage examples from Scheme code as a module:
(use-modules (scripts generate-autoload))
(generate-autoload "generate-autoload")
(generate-autoload "--target" "(my module)" "generate-autoload")
(apply generate-autoload "--target" "(my module)" '("foo" "bar" "baz"))
This module also provides the procedure:
(module-name/exports REFERENCE) => (MODULE-NAME EXPORTS), or #f
REFERENCE is either a list of symbols to be taken as a module name,
like `(ice-9 q)', or a string that is taken to be a filename. Both
MODULE-NAME and EXPORTS are lists of symbols. If either the module
name cannot be determined, or the exports list is empty, return #f.