Subject: bug#7995: [PATCH 1/4] Documentation for Guile support.

From: [email-masked] (Ludovic Courtès)
Date: Sat, 26 Feb 2011 16:25:26 +0100

Hi Ralf,

Ralf Wildenhues <[email-masked]> writes:

> +@example
> +guile_GUILE = compiled-and-installed.scm
> +nodist_guile_GUILE = not-distributed.scm
> +guile_DATA = not-compiled.scm
> +noinst_GUILE = compiled-but-not-installed.scm
> +dist_noinst_DATA = just-distributed-blob.scm
> +
> +# object files will be installed in respective subdir of guileexecdir.
> +nobase_guile_GUILE = installed-in-subdir/foo.scm
> +
> +pkgguile_GUILE = installed-in-package-dir.scm
> +@end example

Looks good to me.

‘guile-tools compile’ supports flags, such as warnings.  How would the
user specify them?

Your other message mentioned GUILEFLAGS, which I thought is meant for
this.  Is it correct?

The name ‘GUILEFLAGS’ could be misleading since these are flags for
‘guile-tools compile’, not for ‘guile’.  ‘GUILECFLAGS’ is already taken,
so we need something else, non-ambiguous.  ‘GUILEC_FLAGS’?
‘GUILE_COMPILE_FLAGS’?  ‘GUILE_COMPILER_FLAGS’?  ‘GUILEGOFLAGS’?
None of them is 100% satisfactory but I don’t have a better idea.

Your other message mentioned per-target flags.  I think it’d be “nice to
have” so you can do things like:

  AM_GUILEGOFLAGS = -Wunused-toplevel -Wunused-variable
  guile_GUILE = foo.scm bar.scm baz.scm
  baz_scm_GOFLAGS = # turn off warnings for this one

> +@example
> +guileext_LTLIBRARIES = foo.la
> +foo_la_SOURCES = foo.c
> +foo_la_LDFLAGS = -module -avoid-version
> +foo_la_LIBADD = $(GUILELIBS)
> +AM_CFLAGS = $(GUILECFLAGS)
> +AM_CPPFLAGS = $(GUILECPPFLAGS)
> +@end example

OK.  In such a case, there would also be one or more companion .scm
files, which say “dlopen foo.la”.

(Later we can discuss all the tricky things associated with that, such
as the fact that foo.la will be installed in a dir that’s not in the
loader’s search path, so you can the companion .scm file to read “dlopen
@guileextdir@/foo.la”, which causes problems in the uninstalled tree...)

> +@defmac AM_PATH_GUILE (@ovar{version}, @ovar{action-if-found}, @
> +  @ovar{action-if-not-found})

OK.

> +@item guiledir
> +The directory name for the installation of user Guile source code.
> +By default, that is @samp{$(datarootdir)/guile/site/@var{x.y}} for
> +Guile versions @var{x.y} greater than 1.8, and
> +@samp{$(datarootdir)/guile/site} for version 1.8.
> +
> +@item pkgguiledir
> +This is the directory under @code{guiledir} that is named after the
> +package.  That is, it is @samp{$(guiledir)/$(PACKAGE)}.  It is provided
> +as a convenience.
> +
> +@item guileexecdir
> +This is the directory where compiled Guile source code will be installed.
> +The default is @samp{$(libdir)/guile/@var{x.y}/ccache} if a Guile Scheme
> +compiler is available, and @samp{$(libdir)} otherwise.
> +
> +@item guileextdir
> +This is the directory where Guile C extensions will be installed.
> +The default is @samp{$(libdir)/guile/@var{x.y}/extensions} for versions
> +@var{x.y} greater than 1.8, and @samp{$(libdir)} otherwise.

OK.

Thanks!

Ludo’.