Next: , Previous: guile-tools module-fan-in, Up: Miscellaneous Tools


13.30 guile-tools prep-Ptexi

See Doc Methodology Insinuation, for discussion.

Usage: prep-Ptexi [-d DEPSDIR] MAKEFILE [STEM ...]

Append to MAKEFILE a line

  include ./.deps/STEM.Ptexi

for each STEM.  Optional arg "-d DEPSDIR" specifies another
directory name to use instead of ".deps", the default.
Additionally, create the deps dir and each referenced .Ptexi file
if these do not already exist.

This program is meant to work around limitations in the GNU Automake
worldview that disallow specifying such "include" directives directly.
It is meant to be invoked using using post-config.status facilities
provided by recent versions of autoconf.  Here's how:

 - Create a file w/ a list of all .twerp file stems, one per line.
   For example, let's call it ".twerp-list" and assume it lives in
   the doc/ref/ subdirectory.

 - Add to configure.in:

     AC_CONFIG_COMMANDS([twerp-prep],[
       guile-tools prep-Ptexi doc/ref/Makefile \
                 `cat $srcdir/doc/ref/.twerp-list`
     ])

   Replace "doc/ref" with the relative path to your documentation
   dir, and don't forget to include $srcdir.  In the case where you
   have only a handful of stems, you could replace the `cat ...` part
   of the example with the stems directly (and forego the .twerp-list
   file entirely, as well).

This methodology is modelled after Automake's "depcomp" behavior, so
it's conceivable that this kind of preparation will eventually become
unnecessary as automake is extended to handle twerp processing either
directly or via some forthcoming doc-dependency-hook API.