GNU bug report logs - #7995
Guile support in Automake

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: automake; Severity: wishlist; Reported by: Ralf Wildenhues <Ralf.Wildenhues@HIDDEN>; dated Sun, 6 Feb 2011 22:15:02 UTC; Maintainer for automake is bug-automake@HIDDEN.
Severity set to 'wishlist' from 'normal' Request was from Stefano Lattarini <stefano.lattarini@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 7995 <at> debbugs.gnu.org:


Received: (at 7995) by debbugs.gnu.org; 26 Feb 2011 15:25:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 26 10:25:38 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1PtM1a-0006Ks-0B
	for submit <at> debbugs.gnu.org; Sat, 26 Feb 2011 10:25:38 -0500
Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <ludo@HIDDEN>) id 1PtM1X-0006Ke-Cj
	for 7995 <at> debbugs.gnu.org; Sat, 26 Feb 2011 10:25:36 -0500
X-IronPort-AV: E=Sophos;i="4.62,232,1297033200"; d="scan'208";a="92140285"
Received: from reverse-83.fdn.fr (HELO nixey) ([80.67.176.83])
	by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA;
	26 Feb 2011 16:25:28 +0100
From: ludo@HIDDEN (Ludovic =?iso-8859-1?Q?Court=E8s?=)
To: Ralf Wildenhues <Ralf.Wildenhues@HIDDEN>
Subject: Re: [PATCH 1/4] Documentation for Guile support.
References: <20110206222257.GF18450@HIDDEN> <20110220073036.GB19081@HIDDEN>
	<20110220073138.GC19081@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 8 =?iso-8859-1?Q?Vent=F4se?= an 219 de la
	=?iso-8859-1?Q?R=E9volution?=
X-PGP-Key-ID: 0xEA52ECF4
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA  D15D 77DD 95E2 EA52 ECF4
X-OS: x86_64-unknown-linux-gnu
Date: Sat, 26 Feb 2011 16:25:26 +0100
In-Reply-To: <20110220073138.GC19081@HIDDEN> (Ralf Wildenhues's message of
	"Sun, 20 Feb 2011 08:31:38 +0100")
Message-ID: <874o7qu8bd.fsf@HIDDEN>
User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -8.7 (--------)
X-Debbugs-Envelope-To: 7995
Cc: Andy Wingo <wingo@HIDDEN>, 7995 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -8.9 (--------)

Hi Ralf,

Ralf Wildenhues <Ralf.Wildenhues@HIDDEN> writes:

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

Looks good to me.

=E2=80=98guile-tools compile=E2=80=99 supports flags, such as warnings.  Ho=
w would the
user specify them?

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

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

Your other message mentioned per-target flags.  I think it=E2=80=99d be =E2=
=80=9Cnice to
have=E2=80=9D so you can do things like:

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

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

OK.  In such a case, there would also be one or more companion .scm
files, which say =E2=80=9Cdlopen foo.la=E2=80=9D.

(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=E2=80=99s not in the
loader=E2=80=99s search path, so you can the companion .scm file to read =
=E2=80=9Cdlopen
@guileextdir@/foo.la=E2=80=9D, which causes problems in the uninstalled tre=
e...)

> +@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=E2=80=99.




Information forwarded to owner <at> debbugs.gnu.org, bug-automake@HIDDEN:
bug#7995; Package automake. Full text available.

Message received at 7995 <at> debbugs.gnu.org:


Received: (at 7995) by debbugs.gnu.org; 26 Feb 2011 15:02:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 26 10:02:47 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1PtLfT-0005p1-0p
	for submit <at> debbugs.gnu.org; Sat, 26 Feb 2011 10:02:47 -0500
Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <ludo@HIDDEN>) id 1PtLfQ-0005op-MU
	for 7995 <at> debbugs.gnu.org; Sat, 26 Feb 2011 10:02:45 -0500
X-IronPort-AV: E=Sophos;i="4.62,232,1297033200"; d="scan'208";a="92139841"
Received: from reverse-83.fdn.fr (HELO nixey) ([80.67.176.83])
	by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA;
	26 Feb 2011 16:02:37 +0100
From: ludo@HIDDEN (Ludovic =?iso-8859-1?Q?Court=E8s?=)
To: Ralf Wildenhues <Ralf.Wildenhues@HIDDEN>
Subject: Re: bug#7995: Guile support in Automake
References: <20110206222257.GF18450@HIDDEN> <20110220073036.GB19081@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 8 =?iso-8859-1?Q?Vent=F4se?= an 219 de la
	=?iso-8859-1?Q?R=E9volution?=
X-PGP-Key-ID: 0xEA52ECF4
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA  D15D 77DD 95E2 EA52 ECF4
X-OS: x86_64-unknown-linux-gnu
Date: Sat, 26 Feb 2011 16:02:37 +0100
In-Reply-To: <20110220073036.GB19081@HIDDEN> (Ralf Wildenhues's message of
	"Sun, 20 Feb 2011 08:30:36 +0100")
Message-ID: <8762s6vnxu.fsf@HIDDEN>
User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -8.0 (--------)
X-Debbugs-Envelope-To: 7995
Cc: Andy Wingo <wingo@HIDDEN>, 7995 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -8.4 (--------)

Hi Ralf,

Andy already answered most of your questions, I think.

Ralf Wildenhues <Ralf.Wildenhues@HIDDEN> writes:

> - The current tests assume _GUILE sources are distributed by default;
>   OTOH, _LISP are not.  Rationale for this semantic difference?

In a typical project, 90% of the .scm files are hand-written, and 10%
are not (generated by AC_CONFIG_FILES, for instance.)  The hand-written
source files must of course be distributed.

So I think it makes sense to have =E2=80=98dist_=E2=80=99 be the default.

Thanks,
Ludo=E2=80=99.




Information forwarded to owner <at> debbugs.gnu.org, bug-automake@HIDDEN:
bug#7995; Package automake. Full text available.

Message received at 7995 <at> debbugs.gnu.org:


Received: (at 7995) by debbugs.gnu.org; 20 Feb 2011 12:43:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 20 07:43:28 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Pr8dL-0004GI-UL
	for submit <at> debbugs.gnu.org; Sun, 20 Feb 2011 07:43:28 -0500
Received: from a-pb-sasl-sd.pobox.com ([64.74.157.62] helo=sasl.smtp.pobox.com)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <wingo@HIDDEN>) id 1Pr7lB-0002Ji-7D
	for 7995 <at> debbugs.gnu.org; Sun, 20 Feb 2011 06:47:30 -0500
Received: from sasl.smtp.pobox.com (unknown [127.0.0.1])
	by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 9C7742CAF;
	Sun, 20 Feb 2011 06:48:34 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc
	:subject:references:date:in-reply-to:message-id:mime-version
	:content-type; s=sasl; bh=K0txOfO3RM3WeGD1s89oFLh5emk=; b=u+ualw
	Pc3rpdvQYIpMzMXq+qk0e/0KVF432+OAuigmWkDROrGZbLRx6o4N3IuuH46Q8S2J
	1oEMajwEkrIZT0Ol3bNwbqZJ4NkMnNtOzczow2u0thxtCkuq1R4UFfC5CE9juX3m
	llccvJgKXijWQgfW6iUL8/ENLbSmQIVKUp/2Q=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc
	:subject:references:date:in-reply-to:message-id:mime-version
	:content-type; q=dns; s=sasl; b=wjRo4zdax0X4HEIJ8keGLxS2Zc4j+TSQ
	+hG359GZAatiPokKs/wlyOfVW090c/U6VSsqTzWQ3nASvojQgV+b7SNGFlRZ5nlv
	zKiFDVo7r+VA626PqmjMx29Th6yrwlJdEqWznK0juSkxQyNPuCpZ4rDwFszPeIMy
	NCZEdf1XjNs=
Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1])
	by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 01B4F2CAE;
	Sun, 20 Feb 2011 06:48:31 -0500 (EST)
Received: from unquote.localdomain (unknown [90.164.198.39]) (using TLSv1
	with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate
	requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id
	EDFAE2CAD; Sun, 20 Feb 2011 06:48:28 -0500 (EST)
From: Andy Wingo <wingo@HIDDEN>
To: Ralf Wildenhues <Ralf.Wildenhues@HIDDEN>
Subject: Re: bug#7995: Guile support in Automake
References: <20110206222257.GF18450@HIDDEN> <20110220073036.GB19081@HIDDEN>
Date: Sun, 20 Feb 2011 12:52:32 +0100
In-Reply-To: <20110220073036.GB19081@HIDDEN> (Ralf Wildenhues's message of
	"Sun, 20 Feb 2011 08:30:36 +0100")
Message-ID: <m3oc66zzwf.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Pobox-Relay-ID: 573A3B8C-3CE7-11E0-838B-AF401E47CF6F-02397024!a-pb-sasl-sd.pobox.com
X-Spam-Score: -2.6 (--)
X-Debbugs-Envelope-To: 7995
X-Mailman-Approved-At: Sun, 20 Feb 2011 07:43:26 -0500
Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 7995 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.6 (--)

Ralf, you are a hero.

On Sun 20 Feb 2011 08:30, Ralf Wildenhues <Ralf.Wildenhues@HIDDEN> writes:

> So what I would like to ask from readers at this point is:
> please go through the doc changes and let's discuss them first.

Will reply to that patch.

> Also, it is important to not step on guile/meta/guile.m4 toes (or vice
> versa), so some checking for that is prodent.  When we know what is
> desired, the tests should be amended/fixed to cover that, and then we
> can fix the implementation to follow.

What would it mean for AM_PATH_GUILE to step on guile.m4's toes?

FWIW guile.m4 almost never gets updates, but today was one of those
exceptions:

  http://git.savannah.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=1867d3e0195168a34cf2269c2137ac561d03a252

Basically it's something from Bruno to add GUILE_LIBS as opposed to
GUILE_LTLIBS, getting the rpath stuff right.

Later you say:

> - The Guile manual documents Autoconf macros distributed in
>   $datarootdir/aclocal/guile.m4.  The names in there are a bit
>   unfortunate in that the macros more or less use the same GUILE_*
>   namespace that we would like to use for some variables (which means
>   you cannot easily turn on checking for unexpanded macro names through
>   something like
>     m4_pattern_forbid([^GUILE_])dnl
>
>   and there is even overlap in the semantics and shell variable names.
>   We need to address that; esp. since the macros shipped with Guile have
>   been out there for long, we cannot just expect them to disappear
>   instantly.  There should be a clear, backward-compatible upgrade path,
>   and a clear intent on how usage should be in the future, for Guile
>   users both with and without Automake.

Hmmm.

So guile.m4 defines the following macros:

    GUILE_PROGS
    GUILE_FLAGS
    GUILE_SITE_DIR
    GUILE_CHECK
    GUILE_MODULE_CHECK
    GUILE_MODULE_AVAILABLE
    GUILE_MODULE_REQUIRED
    GUILE_MODULE_EXPORTS
    GUILE_MODULE_REQUIRED_EXPORT

Of these, only the first three do any AC_SUBST operations; so we can
safely say the rest don't affect this discussion, no?

GUILE_PROGS does this:

      AC_SUBST(GUILE)
      AC_SUBST(GUILE_CONFIG)
      AC_SUBST(GUILE_TOOLS)

Here AM_PATH_GUILE also defines GUILE_TOOLS, but it does the same
AC_PATH_PROG check for it, so calling both macros should not present a
problem.

GUILE_SITE_DIR only defines GUILE_SITE, so that doesn't conflict.

GUILE_FLAGS is the only one that's tricky.  It defines:

  AC_SUBST([GUILE_CFLAGS])
  AC_SUBST([GUILE_LDFLAGS])
  AC_SUBST([GUILE_LIBS])
  AC_SUBST([GUILE_LTLIBS])

These are all for compiling C code.  Ideally one would not even have to
check for these if you're not compiling C extensions.  Is that possible?
In any case these variables' definitions should be exactly the same as
those that GUILE_FLAGS defines; though it is tough to ensure that a
"guile-config compile" or "pkg-config --cflags guile-2.0" corresponds to
the "guile-tools compile" output.  Hummm.

> If you prefer, I can also put them in a temporary branch (which for the
> moment I would expect to be rewound at some point later).

Please do, if it's not very much trouble.

> - Why guile_GUILE and not guile_LISP?  What's the rationale for naming
>   it differently, and what's the rationale for actually treating it
>   differently?  This question has two parts: LISP is treated by emacs
>   not guile-tools, and IIUC then the idea was that GUILE is compiled
>   already at 'make all' time and not just at 'make install' time, right?
>   Is the latter part just "nice to have" or an important feature?

I think that it is useful to compile at "make all" time, yes.  You can
run programs uninstalled in many cases, with an environment that picks
up the compiled ".go" files from the uninstalled tree.  Compiling can
also show warnings -- of course if it doesn't compile at all, that's
useful to know; but furthermore there are the -W warnings.

> - The current tests assume _GUILE sources are distributed by default;
>   OTOH, _LISP are not.  Rationale for this semantic difference?

It seems more useful.  I don't see any particular affinity between Guile
and Elisp, by the way; we might as well compare to Python, which does
dist by default.

> - I renamed guileextensiondir from earlier suggestions to guileextdir,
>   both for brevity, and to avoid the question of whether there is a
>   trailing 's' in the name.  OK?

Sounds good.

> - I haven't yet considered the handling of flags to uninstalled module
>   stuff.  This is just TODO.

Yeah, indeed.

> - My current plan is to either not provide something like
>     foo_scm_GUILEFLAGS = override for $(AM_GUILEFLAGS)
>
>   or to not let it cause renamed .go files.  Do you think users will
>   need per-target guile-tools compile flags?  Because if they do, then
>   we need to document this stuff, and that it's not in line with how
>   Automake operates elsewhere, etc.

I think we would be fine without per-target compile flags.

Regards,

Andy
-- 
http://wingolog.org/




Information forwarded to owner <at> debbugs.gnu.org, bug-automake@HIDDEN:
bug#7995; Package automake. Full text available.

Message received at 7995 <at> debbugs.gnu.org:


Received: (at 7995) by debbugs.gnu.org; 20 Feb 2011 11:49:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 20 06:49:38 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Pr7nF-0002Mu-Lo
	for submit <at> debbugs.gnu.org; Sun, 20 Feb 2011 06:49:38 -0500
Received: from mail-ew0-f44.google.com ([209.85.215.44])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <stefano.lattarini@HIDDEN>) id 1Pr7nC-0002Mh-UO
	for 7995 <at> debbugs.gnu.org; Sun, 20 Feb 2011 06:49:36 -0500
Received: by ewy8 with SMTP id 8so2297068ewy.3
	for <7995 <at> debbugs.gnu.org>; Sun, 20 Feb 2011 03:49:29 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:from:to:subject:date:user-agent:cc:references
	:in-reply-to:mime-version:content-type:content-transfer-encoding
	:message-id; bh=XfkZlMEH/PVmnOPHYwHBtlBH8qOOn1JutnWCGygUueo=;
	b=oV5BPxMu2U5x7GcIY0vRBWEPQiXYDWbLqysxTPdJqvA64uy4OEPm53hhS61+DWLygN
	3MWhLQOXmYhEezSa9lyhDvEMHx+lcT9W0BndA2A123/VPEfvXDyEzyrlxkJMivIaxLMx
	5gCeoEuM1Jy5TPUkGYADxsEb/W5SlCTIUJLLg=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=from:to:subject:date:user-agent:cc:references:in-reply-to
	:mime-version:content-type:content-transfer-encoding:message-id;
	b=xhQto17YYTkw0tRWbcQjRXSQLjKL9upLXHBougepcp/zzf3MopOs8uBycTeyMmnLkx
	NAGsyhXo49dGQC8aPAnxuusQsO5O1/dFi2BvqCdulFlalesh4JOsjMVpoORu8aoMiH4s
	Afa7Ojljj1cBWZzK4nAb9OTcLi9e7SYclANS0=
Received: by 10.213.9.66 with SMTP id k2mr308145ebk.40.1298202567974;
	Sun, 20 Feb 2011 03:49:27 -0800 (PST)
Received: from bigio.localnet
	(host158-37-dynamic.116-80-r.retail.telecomitalia.it [80.116.37.158])
	by mx.google.com with ESMTPS id t5sm3816021eeh.14.2011.02.20.03.49.25
	(version=TLSv1/SSLv3 cipher=OTHER);
	Sun, 20 Feb 2011 03:49:26 -0800 (PST)
From: Stefano Lattarini <stefano.lattarini@HIDDEN>
To: 7995 <at> debbugs.gnu.org
Subject: Re: bug#7995: [PATCH 2/4] Testsuite coverage for Guile support.
Date: Sun, 20 Feb 2011 12:49:13 +0100
User-Agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )
References: <20110206222257.GF18450@HIDDEN> <20110220073036.GB19081@HIDDEN>
	<20110220073158.GD19081@HIDDEN>
In-Reply-To: <20110220073158.GD19081@HIDDEN>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-Id: <201102201249.14216.stefano.lattarini@HIDDEN>
X-Spam-Score: -3.8 (---)
X-Debbugs-Envelope-To: 7995
Cc: Andy Wingo <wingo@HIDDEN>, Ralf Wildenhues <Ralf.Wildenhues@HIDDEN>,
	=?iso-8859-1?q?Court=E8s?= <ludo@HIDDEN>, Ludovic
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.8 (---)

Hi Ralf.

Knowing almost nothing about guile, I'm not able to help in the
discussion of design/implementation, but I'll throw in my two cents
w.r.t. the testsuite additions ...

On Sunday 20 February 2011, Ralf Wildenhues wrote:
> * tests/guile1.test, tests/guile2.test, tests/guile3.test,
> tests/guile4.test: New tests.
> * tests/Makefile.am (TESTS, XFAIL_TESTS): Update.
> ---
>  ChangeLog         |    5 ++
>  tests/Makefile.am |    8 +++
>  tests/Makefile.in |    7 ++-
>  tests/guile1.test |   54 ++++++++++++++++++++++
>  tests/guile2.test |  132 +++++++++++++++++++++++++++++++++++++++++++++++++++++
>  tests/guile3.test |   91 ++++++++++++++++++++++++++++++++++++
>  tests/guile4.test |   48 +++++++++++++++++++
>
Couldn't we use more expressive/clean names for the tests?
Suggestions below.

>  7 files changed, 344 insertions(+), 1 deletions(-)
>  create mode 100755 tests/guile1.test
>  create mode 100755 tests/guile2.test
>  create mode 100755 tests/guile3.test
>  create mode 100755 tests/guile4.test
> 
> diff --git a/ChangeLog b/ChangeLog
> index c338e8a..5483ce4 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,5 +1,10 @@
>  2011-02-20  Ralf Wildenhues  <Ralf.Wildenhues@HIDDEN>
>  
> +	Testsuite coverage for Guile support.
> +	* tests/guile1.test, tests/guile2.test, tests/guile3.test,
> +	tests/guile4.test: New tests.
> +	* tests/Makefile.am (TESTS, XFAIL_TESTS): Update.
> +
>  	Documentation for Guile support.
>  	* doc/automake.texi (Guile): New chapter.
>  	(Top, Other GNU Tools): Update menus.
> diff --git a/tests/Makefile.am b/tests/Makefile.am
> index e3eb9e9..b993678 100644
> --- a/tests/Makefile.am
> +++ b/tests/Makefile.am
> @@ -24,6 +24,10 @@ all.test \
>  auxdir2.test \
>  cond17.test \
>  gcj6.test \
> +guile1.test \
> +guile2.test \
> +guile3.test \
> +guile4.test \
>  override-conditional-2.test \
>  txinfo5.test
>  
> @@ -460,6 +464,10 @@ gnuwarn2.test \
>  gnits.test \
>  gnits2.test \
>  gnits3.test \
> +guile1.test \
> +guile2.test \
> +guile3.test \
> +guile4.test \
>  header.test \
>  help.test \
>  help2.test \
> diff --git a/tests/Makefile.in b/tests/Makefile.in
> index 1f367cd..e449137 100644
> --- a/tests/Makefile.in
> +++ b/tests/Makefile.in
> @@ -284,7 +284,8 @@ top_srcdir = @top_srcdir@
>  MAINTAINERCLEANFILES = $(parallel_tests) $(instspc_tests)
>  EXTRA_DIST = ChangeLog-old gen-parallel-tests instspc-tests.sh \
>  	$(TESTS)
> -XFAIL_TESTS = all.test auxdir2.test cond17.test gcj6.test \
> +XFAIL_TESTS = all.test auxdir2.test cond17.test gcj6.test guile1.test \
> +	guile2.test guile3.test guile4.test \
>  	override-conditional-2.test txinfo5.test \
>  	$(instspc_xfail_tests)
>  parallel_tests = backcompat5-p.test check-exported-srcdir-p.test \
> @@ -722,6 +723,10 @@ gnuwarn2.test \
>  gnits.test \
>  gnits2.test \
>  gnits3.test \
> +guile1.test \
> +guile2.test \
> +guile3.test \
> +guile4.test \
>  header.test \
>  help.test \
>  help2.test \


> diff --git a/tests/guile1.test b/tests/guile1.test
> new file mode 100755
> index 0000000..94efa82
> --- /dev/null
> +++ b/tests/guile1.test
> @@ -0,0 +1,54 @@
> +#! /bin/sh
> +# Copyright (C) 2011 Free Software Foundation, Inc.
> +#
> +# This program is free software; you can redistribute it and/or modify
> +# it under the terms of the GNU General Public License as published by
> +# the Free Software Foundation; either version 2, or (at your option)
> +# any later version.
> +#
> +# This program is distributed in the hope that it will be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +# GNU General Public License for more details.
> +#
> +# You should have received a copy of the GNU General Public License
> +# along with this program.  If not, see <http://www.gnu.org/licenses/>.
> +
> +# Basic Guile support: guile_GUILE.
> +
What about calling this test `guile-basic.test'?

> +. ./defs || Exit 1
> +
> +set -e
> +
> +cat >>configure.in <<\END
> +AM_PATH_GUILE
> +AC_OUTPUT
> +END
> +
> +cat > Makefile.am <<\END
> +guile_GUILE = foo.scm bar.scm baz.scm
> +END
> +
> +: >foo.scm
> +: >bar.scm
> +: >baz.scm
> +
> +$ACLOCAL
> +$AUTOCONF
> +$AUTOMAKE --add-missing
> +
> +grep '^GUILECOMPILE' Makefile.in
>
grep '^GUILECOMPILE *=' ?

> +grep '^GUILEFLAGS' Makefile.in
> +
Similarly.

> +inst=`pwd`/inst
> +./configure --prefix="$inst"
> +
> +env GUILE_TOOLS=false $MAKE -e && Exit 1
> +env AM_GUILEFLAGS=--nosuchflag $MAKE -e && Exit 1
> +env GUILEFLAGS=--nosuchflag $MAKE -e && Exit 1
> +
What if guile-tools is not installed, and `GUILE_TOOLS' gets
defined to `:'?  Won't the commands above succed in this case?

Also, maybe we could ensure also that really GUILEFLAGS really takes
precedence over AM_GUILEFLAGS, and that GUILE_TOOLS can be successfully
overridden by a "fake script", similarly to what is done by tests
`ylflags.test' and `lflags.test'.  That might be done in another test
`guile-flags.test' maybe.

> +$MAKE
> +$MAKE install
> +$MAKE distcheck
> +
> +:


> diff --git a/tests/guile2.test b/tests/guile2.test
> new file mode 100755
> index 0000000..d355518
> --- /dev/null
> +++ b/tests/guile2.test
> @@ -0,0 +1,132 @@
> +#! /bin/sh
> +# Copyright (C) 2011 Free Software Foundation, Inc.
> +#
> +# This program is free software; you can redistribute it and/or modify
> +# it under the terms of the GNU General Public License as published by
> +# the Free Software Foundation; either version 2, or (at your option)
> +# any later version.
> +#
> +# This program is distributed in the hope that it will be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +# GNU General Public License for more details.
> +#
> +# You should have received a copy of the GNU General Public License
> +# along with this program.  If not, see <http://www.gnu.org/licenses/>.
> +
> +# Ensure that we compile and install Guile sources properly.
> +
What about calling this test `guile-inst-and-dist.test'?

> +required='guile-tools'
> +. ./defs || Exit 1
> +
> +set -e
> +
> +cat >>configure.in <<\END
> +AM_PATH_GUILE([1.8],,
> +  [AC_MSG_ERROR([Guile installation missing or too old for compilation],
> +		[77])])
> +AC_OUTPUT
> +END
> +
> +cat > Makefile.am <<\END
> +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
> +nobase_guile_GUILE = installed-in-subdir/foo.scm
> +pkgguile_GUILE = installed-in-package-dir.scm
> +
> +not-distributed.scm:
> +	: >$@
> +
> +CLEANFILES = not-distributed.scm
> +
> +check-dist:
> +	test -f $(distdir)/compiled-and-installed.scm
> +	test ! -f $(distdir)/not-distributed.scm
> +	test -f $(distdir)/not-compiled.scm
> +	test -f $(distdir)/compiled-but-not-installed.scm
> +	test -f $(distdir)/just-distributed-blob.scm
> +	test -f $(distdir)/installed-in-subdir/foo.scm
> +	test -f $(distdir)/installed-in-package-dir.scm
> +	test -z "`find $(distdir) -name \*.go`"
> +
I'd suggest to use:
	find $(distdir) -name \*.go | grep . && exit 1; :
here, so that in case of failure we obtain the names/paths of the
unexpected *.go files.

> +END
> +
> +mkdir installed-in-subdir
> +
> +: >compiled-and-installed.scm
> +: >not-compiled.scm
> +: >compiled-but-not-installed.scm
> +: >just-distributed-blob.scm
> +: >installed-in-subdir/foo.scm
> +: >installed-in-package-dir.scm
> +
> +$ACLOCAL
> +$AUTOCONF
> +$AUTOMAKE --add-missing
> +
> +inst=`pwd`/inst
> +./configure --prefix="$inst"
> +$MAKE
> +test -f compiled-and-installed.go
> +test -f not-distributed.go
> +test ! -f not-compiled.go
> +test -f compiled-but-not-installed.go
> +test ! -f just-distributed-blob.go
> +test -f installed-in-subdir/foo.go
> +test -f installed-in-package-dir.go
> +
> +guile_version=
> +if : new install layout; then
> +  guiledir=$inst/share/guile/site/$guile_version
> +  guileexecdir=$inst/lib/guile/$guile_version/ccache
> +else
> +  guiledir=$inst/share/guile/site
> +  guileexecdir=$inst/lib
> +fi
> +
> +$MAKE install-data
> +test -f "$guiledir/compiled-and-installed.scm"
> +test -f "$guiledir/not-distributed.scm"
> +test ! -f "$guiledir/not-compiled.scm"
> +test ! -f "$guiledir/compiled-but-not-installed.scm"
> +test ! -f "$guiledir/just-distributed-blob.scm"
> +test -f "$guiledir/installed-in-subdir/foo.scm"
> +test -f "$guiledir/$me/installed-in-package-dir.scm"
> +
> +installed_go=`find "$inst" -name \*.go`
> +test -z "$installed_go"
>
Bikeshedding here, but I'd substitue this two lines with:
  find "$inst" -name \*.go | grep . && Exit 1

> +$MAKE uninstall
> +
> +$MAKE install-exec
> +if : can compile; then
> +  test -f "$guileexecdir/compiled-and-installed.go"
> +  test -f "$guileexecdir/not-distributed.go"
> +  test ! -f "$guileexecdir/not-compiled.go"
> +  test ! -f "$guileexecdir/compiled-but-not-installed.go"
> +  test ! -f "$guileexecdir/just-distributed-blob.go"
> +  test -f "$guileexecdir/installed-in-subdir/foo.go"
> +  test -f "$guileexecdir/$me/installed-in-package-dir.go"
> +  installed_scm=`find "$inst" -name \*.scm`
> +  test -z "$installed_scm"
> +else
> +  installed_go=`find "$inst" -name \*.go`
> +  test -z "$installed_go"
>
See above.

> +fi
> +
> +$MAKE clean
> +
> +test ! -f compiled-and-installed.go
> +test ! -f not-distributed.go
> +test ! -f not-compiled.go
> +test ! -f compiled-but-not-installed.go
> +test ! -f just-distributed-blob.go
> +test ! -f installed-in-subdir/foo.go
> +test ! -f installed-in-package-dir.go
> +
> +$MAKE check-dist
> +
> +$MAKE distcheck
> +
> +:


> diff --git a/tests/guile3.test b/tests/guile3.test
> new file mode 100755
> index 0000000..4be3c82
> --- /dev/null
> +++ b/tests/guile3.test
> @@ -0,0 +1,91 @@
> +#! /bin/sh
> +# Copyright (C) 2011 Free Software Foundation, Inc.
> +#
> +# This program is free software; you can redistribute it and/or modify
> +# it under the terms of the GNU General Public License as published by
> +# the Free Software Foundation; either version 2, or (at your option)
> +# any later version.
> +#
> +# This program is distributed in the hope that it will be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +# GNU General Public License for more details.
> +#
> +# You should have received a copy of the GNU General Public License
> +# along with this program.  If not, see <http://www.gnu.org/licenses/>.
> +
> +# Check for Guile compiled extensions.
> +
What about calling this test `guile-compiled-ext.test'?

> +required='guile-tools libtoolize'
> +. ./defs || Exit 1
> +
> +set -e
> +
> +cat >>configure.in <<\END
> +AC_PROG_CC
> +AC_PROG_LIBTOOL
> +AM_PATH_GUILE
> +AC_PATH_PROG([GUILE], [guile], [exit 77])
> +: "${GUILECPPFLAGS=`guile-config compile`}"
> +: "${GUILECFLAGS=`guile-config compile`}"
> +: "${GUILELIBS=`guile-config link`}"
> +AC_SUBST([GUILECPPFLAGS])
> +AC_SUBST([GUILECFLAGS])
> +AC_SUBST([GUILELIBS])
> +AC_OUTPUT
> +END
> +
> +cat > Makefile.am <<\END
> +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)
> +
> +guile_GUILE = load-foo.scm
> +
> +# Try out the uninstalled module.
> +check-local:
> +	$(LIBTOOL) --mode=execute -dlopen foo.la $(GUILE) load-foo.scm
> +# Try out the installed module.
> +installcheck-local:
> +	$(GUILE) load-foo.scm
> +END
> +
> +cat > load-foo.scm <<\END
> +(dynamic-call "init_the_answer" (dynamic-link "foo"))
> +(answer)
> +END
> +
> +cat >foo.c <<\END
> +#include <libguile.h>
> +
> +SCM
> +the_answer (void)
> +{
> +  return scm_int2num (42);
> +}
> +
> +void
> +init_the_answer (void)
> +{
> +  scm_c_define_gsubr ("answer", 0, 0, 0, the_answer);
> +}
> +END
> +
> +inst=`pwd`/inst
> +
> +libtoolize --force
> +$ACLOCAL
> +$AUTOMAKE --add-missing
> +$AUTOCONF
> +./configure --prefix="$inst"
> +$MAKE
> +$MAKE check
> +$MAKE install
> +$MAKE clean
> +$MAKE installcheck
> +$MAKE distcheck
> +
> +:


> diff --git a/tests/guile4.test b/tests/guile4.test
> new file mode 100755
> index 0000000..47a0ad9
> --- /dev/null
> +++ b/tests/guile4.test
> @@ -0,0 +1,48 @@
> +#! /bin/sh
> +# Copyright (C) 2011 Free Software Foundation, Inc.
> +#
> +# This program is free software; you can redistribute it and/or modify
> +# it under the terms of the GNU General Public License as published by
> +# the Free Software Foundation; either version 2, or (at your option)
> +# any later version.
> +#
> +# This program is distributed in the hope that it will be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +# GNU General Public License for more details.
> +#
> +# You should have received a copy of the GNU General Public License
> +# along with this program.  If not, see <http://www.gnu.org/licenses/>.
> +
> +# Per-target flags should not cause compiled Guile sources to be renamed.
> +
What about calling this test `guile-per-target-flags.test'?  Or if that
seems too long, `guile-spcflg.test'? 

> +required=guile-tools
> +. ./defs || Exit 1
> +
> +set -e
> +
> +cat >>configure.in <<\END
> +AM_PATH_GUILE
> +AC_OUTPUT
> +END
> +
> +cat > Makefile.am <<\END
> +guile_GUILE = foo.scm
> +foo_scm_GUILEFLAGS = ...
> +END
> +
> +: >foo.scm
> +
> +$ACLOCAL
> +$AUTOCONF
> +$AUTOMAKE --add-missing
> +
> +inst=`pwd`/inst
> +./configure --prefix="$inst"
> +$MAKE
> +test -f foo.go
> +test ! -f foo_go_foo.go
> +
IMHO you could err on the side of caution here, and tighten this to:

  test -f foo.go
  ls *.go | grep -v '^foo\.go$' | grep . && Exit 1

or even:

  test -f foo.go
  find . -name \*.go | grep -v '^\./foo\.go$' | grep . && Exit 1

> +$MAKE distcheck
> +
> +:
> 

Also, IMHO, some deeper tests about the code in m4/guile.m4 would be
required (similarly for what is done for python).

Regards,
     Stefano




Information forwarded to owner <at> debbugs.gnu.org, bug-automake@HIDDEN:
bug#7995; Package automake. Full text available.

Message received at 7995 <at> debbugs.gnu.org:


Received: (at 7995) by debbugs.gnu.org; 20 Feb 2011 07:32:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 20 02:32:50 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Pr3mj-0005DO-GD
	for submit <at> debbugs.gnu.org; Sun, 20 Feb 2011 02:32:49 -0500
Received: from mailout-de.gmx.net ([213.165.64.23])
	by debbugs.gnu.org with smtp (Exim 4.69)
	(envelope-from <Ralf.Wildenhues@HIDDEN>) id 1Pr3ma-0005D6-M6
	for 7995 <at> debbugs.gnu.org; Sun, 20 Feb 2011 02:32:48 -0500
Received: (qmail invoked by alias); 20 Feb 2011 07:32:34 -0000
Received: from xdsl-89-0-72-128.netcologne.de (EHLO localhost.localdomain)
	[89.0.72.128]
	by mail.gmx.net (mp037) with SMTP; 20 Feb 2011 08:32:34 +0100
X-Authenticated: #13673931
X-Provags-ID: V01U2FsdGVkX19XWlIrGaZX6hPGSCPaH1yKZ0W36p8IF1uAd526W0
	Tq29anMLcQKEiO
Received: from ralf by localhost.localdomain with local (Exim 4.69)
	(envelope-from <Ralf.Wildenhues@HIDDEN>)
	id 1Pr3mT-0005qR-Kg; Sun, 20 Feb 2011 08:32:33 +0100
Date: Sun, 20 Feb 2011 08:32:33 +0100
From: Ralf Wildenhues <Ralf.Wildenhues@HIDDEN>
To: 7995 <at> debbugs.gnu.org, Ludovic =?iso-8859-1?Q?Court=E8s?= <ludo@HIDDEN>,
	Andy Wingo <wingo@HIDDEN>
Subject: [PATCH 4/4] Implement Guile support.
Message-ID: <20110220073233.GF19081@HIDDEN>
References: <20110206222257.GF18450@HIDDEN>
 <20110220073036.GB19081@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20110220073036.GB19081@HIDDEN>
Organization: Institute for Numerical Simulation, University of Bonn
User-Agent: Mutt/1.5.20 (2010-08-04)
X-Y-GMX-Trusted: 0
X-Spam-Score: -2.8 (--)
X-Debbugs-Envelope-To: 7995
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.8 (--)

* automake.in: Register new language 'Guile'.
(handle_guile): New function.
(generate_makefile): Call it.
(am_install_var): Treat 'GUILE' primary like JAVA and PYTHON.
* lib/am/guile.am: New file.
* lib/am/Makefile.am (dist_am_DATA): Add guile.am.
---
 ChangeLog          |    8 ++++++++
 automake.in        |   36 ++++++++++++++++++++++++++++++++----
 lib/am/Makefile.am |    3 ++-
 lib/am/Makefile.in |    3 ++-
 lib/am/guile.am    |   35 +++++++++++++++++++++++++++++++++++
 5 files changed, 79 insertions(+), 6 deletions(-)
 create mode 100644 lib/am/guile.am

diff --git a/ChangeLog b/ChangeLog
index bd27a05..bff6c15 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2011-02-20  Ralf Wildenhues  <Ralf.Wildenhues@HIDDEN>
 
+	Implement Guile support.
+	* automake.in: Register new language 'Guile'.
+	(handle_guile): New function.
+	(generate_makefile): Call it.
+	(am_install_var): Treat 'GUILE' primary like JAVA and PYTHON.
+	* lib/am/guile.am: New file.
+	* lib/am/Makefile.am (dist_am_DATA): Add guile.am.
+
 	Guile macro AM_PATH_GUILE.
 	* m4/guile.m4 (AM_PATH_GUILE): New file, new macro.
 	* m4/Makefile.am (dist_m4data_DATA): Add guile.m4.
diff --git a/automake.in b/automake.in
index ef3b8a6..240dc7f 100644
--- a/automake.in
+++ b/automake.in
@@ -1041,6 +1041,18 @@ register_language ('name' => 'java',
 		   'pure' => 1,
 		   'extensions' => ['.java', '.class', '.zip', '.jar']);
 
+# Guile.
+register_language ('name' => 'guile',
+		   'Name' => 'Guile',
+		   'config_vars' => ['GUILE_TOOLS'],
+		   'flags' => ['GUILEFLAGS'],
+		   'compile' => '$(GUILE_TOOLS) compile $(AM_GUILEFLAGS) $(GUILEFLAGS)',
+		   'output_flag' => '-o',
+		   'ccer' => 'GUILE_TOOLS',
+		   'compiler' => 'GUILECOMPILE',
+		   'pure' => 1,
+		   'extensions' => ['.scm', '.sls', '.sps', '.ss']);
+
 ################################################################
 
 # Error reporting functions.
@@ -5122,6 +5134,16 @@ sub handle_python
   &define_variable ('py_compile', "$am_config_aux_dir/py-compile", INTERNAL);
 }
 
+# Handle Guile
+sub handle_guile
+{
+  my @guilefiles = &am_install_var ('-defaultdist', 'guile', 'GUILE',
+				    'noinst');
+  return if ! @guilefiles;
+
+  require_variables ($guilefiles[0][0], "Guile sources seen", TRUE, 'GUILE_TOOLS');
+}
+
 # Handle Java.
 sub handle_java
 {
@@ -7541,9 +7563,11 @@ sub am_install_var
   # variables, it is an error to actually define the primary.  We
   # allow `JAVA', as it is customarily used to mean the Java
   # interpreter.  This is but one of several Java hacks.  Similarly,
-  # `PYTHON' is customarily used to mean the Python interpreter.
+  # `PYTHON' is customarily used to mean the Python interpreter,
+  # and `GUILE' is set by the Autoconf macros from Guile.
   reject_var $primary, "`$primary' is an anachronism"
-    unless $primary eq 'JAVA' || $primary eq 'PYTHON';
+    unless $primary eq 'JAVA' || $primary eq 'PYTHON'
+    || $primary eq 'GUILE';
 
   # Get the prefixes which are valid and actually used.
   @prefix = am_primary_prefixes ($primary, $can_dist, @prefix);
@@ -7674,7 +7698,9 @@ sub am_install_var
 
   # The JAVA variable is used as the name of the Java interpreter.
   # The PYTHON variable is used as the name of the Python interpreter.
-  if (@used && $primary ne 'JAVA' && $primary ne 'PYTHON')
+  # The GUILE variable is used as the name of the Guile interpreter.
+  if (@used && $primary ne 'JAVA' && $primary ne 'PYTHON'
+      && $primary ne 'GUILE')
     {
       # Define it.
       define_pretty_variable ($primary, TRUE, INTERNAL, @used);
@@ -7688,7 +7714,8 @@ sub am_install_var
 
   # Push here because PRIMARY might be configure time determined.
   push (@all, '$(' . $primary . ')')
-    if @used && $primary ne 'JAVA' && $primary ne 'PYTHON';
+    if @used && $primary ne 'JAVA' && $primary ne 'PYTHON'
+       && $primary ne 'GUILE';
 
   # Make the result unique.  This lets the user use conditionals in
   # a natural way, but still lets us program lazily -- we don't have
@@ -8260,6 +8287,7 @@ sub generate_makefile ($$)
   handle_texinfo;
   handle_emacs_lisp;
   handle_python;
+  handle_guile;
   handle_java;
   handle_man_pages;
   handle_data;
diff --git a/lib/am/Makefile.am b/lib/am/Makefile.am
index a255f70..ad08582 100644
--- a/lib/am/Makefile.am
+++ b/lib/am/Makefile.am
@@ -3,7 +3,7 @@
 ## Makefile for Automake lib/am.
 
 # Copyright (C) 1995, 1996, 1997, 1998, 1999, 2001, 2003, 2004, 2008,
-# 2009  Free Software Foundation, Inc.
+# 2009, 2011 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -34,6 +34,7 @@ depend.am \
 depend2.am \
 distdir.am \
 footer.am \
+guile.am \
 header-vars.am \
 header.am \
 install.am \
diff --git a/lib/am/Makefile.in b/lib/am/Makefile.in
index 059ae97..f0cf036 100644
--- a/lib/am/Makefile.in
+++ b/lib/am/Makefile.in
@@ -16,7 +16,7 @@
 @SET_MAKE@
 
 # Copyright (C) 1995, 1996, 1997, 1998, 1999, 2001, 2003, 2004, 2008,
-# 2009  Free Software Foundation, Inc.
+# 2009, 2011 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -204,6 +204,7 @@ depend.am \
 depend2.am \
 distdir.am \
 footer.am \
+guile.am \
 header-vars.am \
 header.am \
 install.am \
diff --git a/lib/am/guile.am b/lib/am/guile.am
new file mode 100644
index 0000000..26d92d2
--- /dev/null
+++ b/lib/am/guile.am
@@ -0,0 +1,35 @@
+## automake - create Makefile.in from Makefile.am
+## Copyright (C) 2011 Free Software Foundation, Inc.
+
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+if %?INSTALL%
+include inst-vars.am
+endif %?INSTALL%
+
+
+## Exactly the same as data.am.
+include data.am
+
+## ---------- ##
+## Cleaning.  ##
+## ---------- ##
+
+## -------------- ##
+## Distributing.  ##
+## -------------- ##
+
+if %?DIST%
+DIST_COMMON += %DISTVAR%
+endif %?DIST%
-- 
1.7.4.1.48.g5673d





Information forwarded to owner <at> debbugs.gnu.org, bug-automake@HIDDEN:
bug#7995; Package automake. Full text available.

Message received at 7995 <at> debbugs.gnu.org:


Received: (at 7995) by debbugs.gnu.org; 20 Feb 2011 07:32:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 20 02:32:26 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Pr3mM-0005Cq-4z
	for submit <at> debbugs.gnu.org; Sun, 20 Feb 2011 02:32:26 -0500
Received: from mailout-de.gmx.net ([213.165.64.22])
	by debbugs.gnu.org with smtp (Exim 4.69)
	(envelope-from <Ralf.Wildenhues@HIDDEN>) id 1Pr3mK-0005Cf-Tr
	for 7995 <at> debbugs.gnu.org; Sun, 20 Feb 2011 02:32:25 -0500
Received: (qmail invoked by alias); 20 Feb 2011 07:32:18 -0000
Received: from xdsl-89-0-72-128.netcologne.de (EHLO localhost.localdomain)
	[89.0.72.128]
	by mail.gmx.net (mp044) with SMTP; 20 Feb 2011 08:32:18 +0100
X-Authenticated: #13673931
X-Provags-ID: V01U2FsdGVkX197shllydp74lJCWF1szlpPMHNMPDeMuB8gJWXuwK
	alDkZ2eNBXLXtv
Received: from ralf by localhost.localdomain with local (Exim 4.69)
	(envelope-from <Ralf.Wildenhues@HIDDEN>)
	id 1Pr3mD-0005qL-U5; Sun, 20 Feb 2011 08:32:17 +0100
Date: Sun, 20 Feb 2011 08:32:17 +0100
From: Ralf Wildenhues <Ralf.Wildenhues@HIDDEN>
To: 7995 <at> debbugs.gnu.org, Ludovic =?iso-8859-1?Q?Court=E8s?= <ludo@HIDDEN>,
	Andy Wingo <wingo@HIDDEN>
Subject: [PATCH 3/4] Guile macro AM_PATH_GUILE.
Message-ID: <20110220073217.GE19081@HIDDEN>
References: <20110206222257.GF18450@HIDDEN>
 <20110220073036.GB19081@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20110220073036.GB19081@HIDDEN>
Organization: Institute for Numerical Simulation, University of Bonn
User-Agent: Mutt/1.5.20 (2010-08-04)
X-Y-GMX-Trusted: 0
X-Spam-Score: -2.8 (--)
X-Debbugs-Envelope-To: 7995
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.8 (--)

* m4/guile.m4 (AM_PATH_GUILE): New file, new macro.
* m4/Makefile.am (dist_m4data_DATA): Add guile.m4.
---
 ChangeLog      |    4 +++
 m4/Makefile.am |    3 +-
 m4/Makefile.in |    3 +-
 m4/guile.m4    |   63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 71 insertions(+), 2 deletions(-)
 create mode 100644 m4/guile.m4

diff --git a/ChangeLog b/ChangeLog
index 5483ce4..bd27a05 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2011-02-20  Ralf Wildenhues  <Ralf.Wildenhues@HIDDEN>
 
+	Guile macro AM_PATH_GUILE.
+	* m4/guile.m4 (AM_PATH_GUILE): New file, new macro.
+	* m4/Makefile.am (dist_m4data_DATA): Add guile.m4.
+
 	Testsuite coverage for Guile support.
 	* tests/guile1.test, tests/guile2.test, tests/guile3.test,
 	tests/guile4.test: New tests.
diff --git a/m4/Makefile.am b/m4/Makefile.am
index 0cf074b..fe7a8d6 100644
--- a/m4/Makefile.am
+++ b/m4/Makefile.am
@@ -3,7 +3,7 @@
 ## Makefile for Automake m4.
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2006,
-# 2008, 2009 Free Software Foundation, Inc.
+# 2008, 2009, 2011 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,6 +31,7 @@ depend.m4 \
 depout.m4 \
 dmalloc.m4 \
 gcj.m4 \
+guile.m4 \
 header.m4 \
 init.m4 \
 install-sh.m4 \
diff --git a/m4/Makefile.in b/m4/Makefile.in
index e508848..49f46a7 100644
--- a/m4/Makefile.in
+++ b/m4/Makefile.in
@@ -16,7 +16,7 @@
 @SET_MAKE@
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2006,
-# 2008, 2009 Free Software Foundation, Inc.
+# 2008, 2009, 2011 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -201,6 +201,7 @@ depend.m4 \
 depout.m4 \
 dmalloc.m4 \
 gcj.m4 \
+guile.m4 \
 header.m4 \
 init.m4 \
 install-sh.m4 \
diff --git a/m4/guile.m4 b/m4/guile.m4
new file mode 100644
index 0000000..d16da79
--- /dev/null
+++ b/m4/guile.m4
@@ -0,0 +1,63 @@
+# Guile file handling                                      -*- Autoconf -*-
+
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PATH_GUILE([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# --------------------------------------------------------------------------
+# Adds support for distributing Guile source files and compiled sources.
+# To install files, copy them to $(guiledir), using the guile_GUILE
+# automake variable.  To install a package with the same name as the
+# automake package, install to $(pkgguiledir), or use the
+# pkgguile_GUILE automake variable.
+#
+# The variables $(guileexecdir) and $(guileextensiondir) are provided as
+# locations to install Guile extension modules (shared libraries).
+# The XXX macro is required to find the appropriate flags to compile
+# extension modules.
+#
+# If the MINIMUM-VERSION argument is passed, AM_PATH_GUILE will
+# cause an error if the version of python installed on the system
+# doesn't meet the requirement.  MINIMUM-VERSION should consist of
+# numbers and dots only.
+AC_DEFUN([AM_PATH_GUILE],
+[AC_PATH_PROG([GUILE_TOOLS], [guile-tools], [:])
+am__guile_apiversion=1.6
+if test "$GUILE_TOOLS" != :; then
+  GUILE_VERSION=`$GUILE_TOOLS --version | sed '[s/.*\([1-9][0-9.]*\).*/\1/]'`
+  AS_VERSION_COMPARE([$GUILE_VERSION], [1.8],
+    [am__guile_apiversion=1.6],
+    [am__guile_apiversion=1.8],
+    [am__guile_apiversion=2.0])
+fi
+AC_SUBST([GUILE_VERSION])
+case $am__guile_apiversion in #(
+1.6) ;; #(
+1.8)
+  guiledir='${datarootdir}'/guile/site/$GUILE_VERSION
+  guileexecdir='${libdir}'/guile/$GUILE_VERSION/ccache
+  guileextdir='${libdir}'/guile/$GUILE_VERSION/extensions
+  ;; #(
+*)
+  guiledir='${datarootdir}'/guile/site/$GUILE_VERSION
+  guileexecdir='${libdir}'
+  guileextdir='${libdir}'
+  ;;
+esac
+case $am__guile_apiversion in #(
+1.6)
+  m4_default([$3], [AC_MSG_ERROR([no working Guile installation found])])
+  ;; #(
+*)
+  $2
+  ;;
+esac
+AC_SUBST([guiledir])dnl
+AC_SUBST([pkgguiledir], ['${guiledir}'/$PACKAGE])dnl
+AC_SUBST([guileexecdir])dnl
+AC_SUBST([guileextdir])dnl
+AC_ARG_VAR([GUILEFLAGS], [Flags for compilation of Guile source files])dnl
+])
-- 
1.7.4.1.48.g5673d





Information forwarded to owner <at> debbugs.gnu.org, bug-automake@HIDDEN:
bug#7995; Package automake. Full text available.

Message received at 7995 <at> debbugs.gnu.org:


Received: (at 7995) by debbugs.gnu.org; 20 Feb 2011 07:32:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 20 02:32:09 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Pr3m4-0005CP-HX
	for submit <at> debbugs.gnu.org; Sun, 20 Feb 2011 02:32:09 -0500
Received: from mailout-de.gmx.net ([213.165.64.23])
	by debbugs.gnu.org with smtp (Exim 4.69)
	(envelope-from <Ralf.Wildenhues@HIDDEN>) id 1Pr3m1-0005Bs-TL
	for 7995 <at> debbugs.gnu.org; Sun, 20 Feb 2011 02:32:07 -0500
Received: (qmail invoked by alias); 20 Feb 2011 07:31:59 -0000
Received: from xdsl-89-0-72-128.netcologne.de (EHLO localhost.localdomain)
	[89.0.72.128]
	by mail.gmx.net (mp001) with SMTP; 20 Feb 2011 08:31:59 +0100
X-Authenticated: #13673931
X-Provags-ID: V01U2FsdGVkX18mbZFJWtkmWVi4O8hdg/tMYGrFciWTJYvlnUHCjL
	0wIWDAGtBKgyYv
Received: from ralf by localhost.localdomain with local (Exim 4.69)
	(envelope-from <Ralf.Wildenhues@HIDDEN>)
	id 1Pr3lv-0005qF-2u; Sun, 20 Feb 2011 08:31:59 +0100
Date: Sun, 20 Feb 2011 08:31:59 +0100
From: Ralf Wildenhues <Ralf.Wildenhues@HIDDEN>
To: 7995 <at> debbugs.gnu.org, Ludovic =?iso-8859-1?Q?Court=E8s?= <ludo@HIDDEN>,
	Andy Wingo <wingo@HIDDEN>
Subject: [PATCH 2/4] Testsuite coverage for Guile support.
Message-ID: <20110220073158.GD19081@HIDDEN>
References: <20110206222257.GF18450@HIDDEN>
 <20110220073036.GB19081@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20110220073036.GB19081@HIDDEN>
Organization: Institute for Numerical Simulation, University of Bonn
User-Agent: Mutt/1.5.20 (2010-08-04)
X-Y-GMX-Trusted: 0
X-Spam-Score: -2.8 (--)
X-Debbugs-Envelope-To: 7995
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.8 (--)

* tests/guile1.test, tests/guile2.test, tests/guile3.test,
tests/guile4.test: New tests.
* tests/Makefile.am (TESTS, XFAIL_TESTS): Update.
---
 ChangeLog         |    5 ++
 tests/Makefile.am |    8 +++
 tests/Makefile.in |    7 ++-
 tests/guile1.test |   54 ++++++++++++++++++++++
 tests/guile2.test |  132 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/guile3.test |   91 ++++++++++++++++++++++++++++++++++++
 tests/guile4.test |   48 +++++++++++++++++++
 7 files changed, 344 insertions(+), 1 deletions(-)
 create mode 100755 tests/guile1.test
 create mode 100755 tests/guile2.test
 create mode 100755 tests/guile3.test
 create mode 100755 tests/guile4.test

diff --git a/ChangeLog b/ChangeLog
index c338e8a..5483ce4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2011-02-20  Ralf Wildenhues  <Ralf.Wildenhues@HIDDEN>
 
+	Testsuite coverage for Guile support.
+	* tests/guile1.test, tests/guile2.test, tests/guile3.test,
+	tests/guile4.test: New tests.
+	* tests/Makefile.am (TESTS, XFAIL_TESTS): Update.
+
 	Documentation for Guile support.
 	* doc/automake.texi (Guile): New chapter.
 	(Top, Other GNU Tools): Update menus.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index e3eb9e9..b993678 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -24,6 +24,10 @@ all.test \
 auxdir2.test \
 cond17.test \
 gcj6.test \
+guile1.test \
+guile2.test \
+guile3.test \
+guile4.test \
 override-conditional-2.test \
 txinfo5.test
 
@@ -460,6 +464,10 @@ gnuwarn2.test \
 gnits.test \
 gnits2.test \
 gnits3.test \
+guile1.test \
+guile2.test \
+guile3.test \
+guile4.test \
 header.test \
 help.test \
 help2.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 1f367cd..e449137 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -284,7 +284,8 @@ top_srcdir = @top_srcdir@
 MAINTAINERCLEANFILES = $(parallel_tests) $(instspc_tests)
 EXTRA_DIST = ChangeLog-old gen-parallel-tests instspc-tests.sh \
 	$(TESTS)
-XFAIL_TESTS = all.test auxdir2.test cond17.test gcj6.test \
+XFAIL_TESTS = all.test auxdir2.test cond17.test gcj6.test guile1.test \
+	guile2.test guile3.test guile4.test \
 	override-conditional-2.test txinfo5.test \
 	$(instspc_xfail_tests)
 parallel_tests = backcompat5-p.test check-exported-srcdir-p.test \
@@ -722,6 +723,10 @@ gnuwarn2.test \
 gnits.test \
 gnits2.test \
 gnits3.test \
+guile1.test \
+guile2.test \
+guile3.test \
+guile4.test \
 header.test \
 help.test \
 help2.test \
diff --git a/tests/guile1.test b/tests/guile1.test
new file mode 100755
index 0000000..94efa82
--- /dev/null
+++ b/tests/guile1.test
@@ -0,0 +1,54 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Basic Guile support: guile_GUILE.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<\END
+AM_PATH_GUILE
+AC_OUTPUT
+END
+
+cat > Makefile.am <<\END
+guile_GUILE = foo.scm bar.scm baz.scm
+END
+
+: >foo.scm
+: >bar.scm
+: >baz.scm
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+grep '^GUILECOMPILE' Makefile.in
+grep '^GUILEFLAGS' Makefile.in
+
+inst=`pwd`/inst
+./configure --prefix="$inst"
+
+env GUILE_TOOLS=false $MAKE -e && Exit 1
+env AM_GUILEFLAGS=--nosuchflag $MAKE -e && Exit 1
+env GUILEFLAGS=--nosuchflag $MAKE -e && Exit 1
+
+$MAKE
+$MAKE install
+$MAKE distcheck
+
+:
diff --git a/tests/guile2.test b/tests/guile2.test
new file mode 100755
index 0000000..d355518
--- /dev/null
+++ b/tests/guile2.test
@@ -0,0 +1,132 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Ensure that we compile and install Guile sources properly.
+
+required='guile-tools'
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<\END
+AM_PATH_GUILE([1.8],,
+  [AC_MSG_ERROR([Guile installation missing or too old for compilation],
+		[77])])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<\END
+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
+nobase_guile_GUILE = installed-in-subdir/foo.scm
+pkgguile_GUILE = installed-in-package-dir.scm
+
+not-distributed.scm:
+	: >$@
+
+CLEANFILES = not-distributed.scm
+
+check-dist:
+	test -f $(distdir)/compiled-and-installed.scm
+	test ! -f $(distdir)/not-distributed.scm
+	test -f $(distdir)/not-compiled.scm
+	test -f $(distdir)/compiled-but-not-installed.scm
+	test -f $(distdir)/just-distributed-blob.scm
+	test -f $(distdir)/installed-in-subdir/foo.scm
+	test -f $(distdir)/installed-in-package-dir.scm
+	test -z "`find $(distdir) -name \*.go`"
+END
+
+mkdir installed-in-subdir
+
+: >compiled-and-installed.scm
+: >not-compiled.scm
+: >compiled-but-not-installed.scm
+: >just-distributed-blob.scm
+: >installed-in-subdir/foo.scm
+: >installed-in-package-dir.scm
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+inst=`pwd`/inst
+./configure --prefix="$inst"
+$MAKE
+test -f compiled-and-installed.go
+test -f not-distributed.go
+test ! -f not-compiled.go
+test -f compiled-but-not-installed.go
+test ! -f just-distributed-blob.go
+test -f installed-in-subdir/foo.go
+test -f installed-in-package-dir.go
+
+guile_version=
+if : new install layout; then
+  guiledir=$inst/share/guile/site/$guile_version
+  guileexecdir=$inst/lib/guile/$guile_version/ccache
+else
+  guiledir=$inst/share/guile/site
+  guileexecdir=$inst/lib
+fi
+
+$MAKE install-data
+test -f "$guiledir/compiled-and-installed.scm"
+test -f "$guiledir/not-distributed.scm"
+test ! -f "$guiledir/not-compiled.scm"
+test ! -f "$guiledir/compiled-but-not-installed.scm"
+test ! -f "$guiledir/just-distributed-blob.scm"
+test -f "$guiledir/installed-in-subdir/foo.scm"
+test -f "$guiledir/$me/installed-in-package-dir.scm"
+
+installed_go=`find "$inst" -name \*.go`
+test -z "$installed_go"
+$MAKE uninstall
+
+$MAKE install-exec
+if : can compile; then
+  test -f "$guileexecdir/compiled-and-installed.go"
+  test -f "$guileexecdir/not-distributed.go"
+  test ! -f "$guileexecdir/not-compiled.go"
+  test ! -f "$guileexecdir/compiled-but-not-installed.go"
+  test ! -f "$guileexecdir/just-distributed-blob.go"
+  test -f "$guileexecdir/installed-in-subdir/foo.go"
+  test -f "$guileexecdir/$me/installed-in-package-dir.go"
+  installed_scm=`find "$inst" -name \*.scm`
+  test -z "$installed_scm"
+else
+  installed_go=`find "$inst" -name \*.go`
+  test -z "$installed_go"
+fi
+
+$MAKE clean
+
+test ! -f compiled-and-installed.go
+test ! -f not-distributed.go
+test ! -f not-compiled.go
+test ! -f compiled-but-not-installed.go
+test ! -f just-distributed-blob.go
+test ! -f installed-in-subdir/foo.go
+test ! -f installed-in-package-dir.go
+
+$MAKE check-dist
+
+$MAKE distcheck
+
+:
diff --git a/tests/guile3.test b/tests/guile3.test
new file mode 100755
index 0000000..4be3c82
--- /dev/null
+++ b/tests/guile3.test
@@ -0,0 +1,91 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check for Guile compiled extensions.
+
+required='guile-tools libtoolize'
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<\END
+AC_PROG_CC
+AC_PROG_LIBTOOL
+AM_PATH_GUILE
+AC_PATH_PROG([GUILE], [guile], [exit 77])
+: "${GUILECPPFLAGS=`guile-config compile`}"
+: "${GUILECFLAGS=`guile-config compile`}"
+: "${GUILELIBS=`guile-config link`}"
+AC_SUBST([GUILECPPFLAGS])
+AC_SUBST([GUILECFLAGS])
+AC_SUBST([GUILELIBS])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<\END
+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)
+
+guile_GUILE = load-foo.scm
+
+# Try out the uninstalled module.
+check-local:
+	$(LIBTOOL) --mode=execute -dlopen foo.la $(GUILE) load-foo.scm
+# Try out the installed module.
+installcheck-local:
+	$(GUILE) load-foo.scm
+END
+
+cat > load-foo.scm <<\END
+(dynamic-call "init_the_answer" (dynamic-link "foo"))
+(answer)
+END
+
+cat >foo.c <<\END
+#include <libguile.h>
+
+SCM
+the_answer (void)
+{
+  return scm_int2num (42);
+}
+
+void
+init_the_answer (void)
+{
+  scm_c_define_gsubr ("answer", 0, 0, 0, the_answer);
+}
+END
+
+inst=`pwd`/inst
+
+libtoolize --force
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+./configure --prefix="$inst"
+$MAKE
+$MAKE check
+$MAKE install
+$MAKE clean
+$MAKE installcheck
+$MAKE distcheck
+
+:
diff --git a/tests/guile4.test b/tests/guile4.test
new file mode 100755
index 0000000..47a0ad9
--- /dev/null
+++ b/tests/guile4.test
@@ -0,0 +1,48 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Per-target flags should not cause compiled Guile sources to be renamed.
+
+required=guile-tools
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<\END
+AM_PATH_GUILE
+AC_OUTPUT
+END
+
+cat > Makefile.am <<\END
+guile_GUILE = foo.scm
+foo_scm_GUILEFLAGS = ...
+END
+
+: >foo.scm
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+inst=`pwd`/inst
+./configure --prefix="$inst"
+$MAKE
+test -f foo.go
+test ! -f foo_go_foo.go
+
+$MAKE distcheck
+
+:
-- 
1.7.4.1.48.g5673d





Information forwarded to owner <at> debbugs.gnu.org, bug-automake@HIDDEN:
bug#7995; Package automake. Full text available.

Message received at 7995 <at> debbugs.gnu.org:


Received: (at 7995) by debbugs.gnu.org; 20 Feb 2011 07:31:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 20 02:31:48 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Pr3lk-0005Bb-13
	for submit <at> debbugs.gnu.org; Sun, 20 Feb 2011 02:31:48 -0500
Received: from mailout-de.gmx.net ([213.165.64.23])
	by debbugs.gnu.org with smtp (Exim 4.69)
	(envelope-from <Ralf.Wildenhues@HIDDEN>) id 1Pr3lh-0005BP-QR
	for 7995 <at> debbugs.gnu.org; Sun, 20 Feb 2011 02:31:46 -0500
Received: (qmail invoked by alias); 20 Feb 2011 07:31:39 -0000
Received: from xdsl-89-0-72-128.netcologne.de (EHLO localhost.localdomain)
	[89.0.72.128]
	by mail.gmx.net (mp063) with SMTP; 20 Feb 2011 08:31:39 +0100
X-Authenticated: #13673931
X-Provags-ID: V01U2FsdGVkX19Um74RNhtUT5r+vo3FzkNx6pC2TEjNiRFu/bWuP3
	UQ2dJ9nIFGnC48
Received: from ralf by localhost.localdomain with local (Exim 4.69)
	(envelope-from <Ralf.Wildenhues@HIDDEN>)
	id 1Pr3lb-0005q9-0E; Sun, 20 Feb 2011 08:31:39 +0100
Date: Sun, 20 Feb 2011 08:31:38 +0100
From: Ralf Wildenhues <Ralf.Wildenhues@HIDDEN>
To: 7995 <at> debbugs.gnu.org, Ludovic =?iso-8859-1?Q?Court=E8s?= <ludo@HIDDEN>,
	Andy Wingo <wingo@HIDDEN>
Subject: [PATCH 1/4] Documentation for Guile support.
Message-ID: <20110220073138.GC19081@HIDDEN>
References: <20110206222257.GF18450@HIDDEN>
 <20110220073036.GB19081@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <20110220073036.GB19081@HIDDEN>
Organization: Institute for Numerical Simulation, University of Bonn
User-Agent: Mutt/1.5.20 (2010-08-04)
X-Y-GMX-Trusted: 0
X-Spam-Score: -2.8 (--)
X-Debbugs-Envelope-To: 7995
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.8 (--)

* doc/automake.texi (Guile): New chapter.
(Top, Other GNU Tools): Update menus.
* NEWS: Update.
Initial suggestion and lots of ideas and from Andy Wingo and
Ludovic Courtè.
---
 ChangeLog         |    9 +++
 NEWS              |    5 ++
 doc/automake.texi |  154 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
 3 files changed, 167 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 12b8e9f..c338e8a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-02-20  Ralf Wildenhues  <Ralf.Wildenhues@HIDDEN>
+
+	Documentation for Guile support.
+	* doc/automake.texi (Guile): New chapter.
+	(Top, Other GNU Tools): Update menus.
+	* NEWS: Update.
+	Initial suggestion and lots of ideas and from Andy Wingo and
+	Ludovic Courtès.
+
 2011-02-16  Stefano Lattarini  <stefano.lattarini@HIDDEN>
 	    Ralf Wildenhues  <Ralf.Wildenhues@HIDDEN>
 
diff --git a/NEWS b/NEWS
index a5dc93f..401d69b 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,11 @@ New in 1.11a:
 
   - New `cscope' target to build a cscope database for the source tree.
 
+* Languages changes:
+
+  - Support for compilation and installation of Guile source code and compiled
+    Guile source code via the new `GUILE' primary.
+
 * Miscellaneous changes:
 
   - The `dist' and `dist-all' targets now can run compressors in parallel.
diff --git a/doc/automake.texi b/doc/automake.texi
index 474f5a1..078dfbb 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -291,6 +291,7 @@ Top
 * Libtool::                     Libtool
 * Java::                        Java
 * Python::                      Python
+* Guile::                       Guile
 
 Building documentation
 
@@ -2073,7 +2074,7 @@ Uniform
 objects are not installed either.
 
 The current primary names are @samp{PROGRAMS}, @samp{LIBRARIES},
-@samp{LTLIBRARIES}, @samp{LISP}, @samp{PYTHON}, @samp{JAVA},
+@samp{LTLIBRARIES}, @samp{LISP}, @samp{PYTHON}, @samp{GUILE}, @samp{JAVA},
 @samp{SCRIPTS}, @samp{DATA}, @samp{HEADERS}, @samp{MANS}, and
 @samp{TEXINFOS}.
 @vindex PROGRAMS
@@ -2081,6 +2082,7 @@ Uniform
 @vindex LTLIBRARIES
 @vindex LISP
 @vindex PYTHON
+@vindex GUILE
 @vindex JAVA
 @vindex SCRIPTS
 @vindex DATA
@@ -7446,6 +7448,7 @@ Other GNU Tools
 * Libtool::                     Libtool
 * Java::                        Java
 * Python::                      Python
+* Guile::                       Guile
 @end menu
 
 
@@ -7736,6 +7739,155 @@ Python
 Install Paths}.
 
 
+@node Guile
+@section Guile
+
+@cindex @code{_GUILE} primary, defined
+@cindex @code{GUILE} primary, defined
+@cindex Primary variable, @code{GUILE}
+@vindex _GUILE
+
+Automake provides support for compiled Guile source files with the
+@code{GUILE} primary as well as for installation of extensions modules
+for Guile in a compiled language such as C.  A typical setup is to call
+@code{AM_PATH_GUILE} in @file{configure.ac} and use a line like the
+following in @file{Makefile.am}:
+
+@example
+guile_GUILE = foo.scm bar.sls baz.sps zork.ss
+@end example
+
+Here's a longer example with different types of file handling:
+
+@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
+
+Here's an example of a typical extension module written in C:
+
+@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
+
+When @samp{AM_PATH_GUILE} is used, the suffixes @file{.scm}, @file{.sls},
+@file{.sps}, and @file{.ss} are assumed to be Guile sources, and
+compiled files will carry the @file{.go} extension.
+
+Any files listed in a @code{_GUILE} variable will be byte-compiled
+with @command{guile-tools compile} if that is available and new enough
+to compile Guile sources.
+
+Automake ships with an Autoconf macro called @code{AM_PATH_GUILE}
+that will determine some Guile-related directory variables (see
+below).  If you have called @code{AM_PATH_GUILE} from
+@file{configure.ac}, then you may use the variables
+@code{guile_GUILE} or @code{pkgguile_GUILE} to list Guile source
+files in your @file{Makefile.am}, depending on where you want your files
+installed (see the definitions of @code{guiledir} and
+@code{pkgguiledir} below).
+
+@defmac AM_PATH_GUILE (@ovar{version}, @ovar{action-if-found}, @
+  @ovar{action-if-not-found})
+
+Search for a Guile compiler @samp{guile-tools compile} on the system.
+This macro takes three optional arguments.  The first argument, if
+present, is the minimum version of Guile required for this package:
+@code{AM_PATH_GUILE} will skip any Guile interpreter that is older than
+@var{version}.  If an interpreter is found and satisfies @var{version},
+then @var{action-if-found} is run.  Otherwise, @var{action-if-not-found}
+is run.  Without a @var{version} argument, a minimum version of 1.8 is
+checked against.
+
+If @var{action-if-not-found} is not specified, as in the following
+example, the default is to abort @command{configure}.
+
+@example
+AM_PATH_GUILE([2.0])
+@end example
+
+@noindent
+This is fine when Guile is an absolute requirement for the package.
+If Guile >= 2.0 was only @emph{optional} to the package,
+@code{AM_PATH_GUILE} could be called as follows.
+
+@example
+AM_PATH_GUILE([2.0],, [:])
+@end example
+
+@code{AM_PATH_GUILE} creates the following output variables based on
+the Guile installation found during configuration.
+@end defmac
+
+@vtable @code
+@item GUILE_TOOLS
+The name of the @command{guile-tools} executable, or @samp{:} if no
+suitable compiler could be found.
+
+Assuming @var{action-if-not-found} is used (otherwise @file{./configure}
+will abort if Guile is absent), the value of @code{GUILE} can be used
+to setup a conditional in order to disable the relevant part of a build
+as follows.
+
+@example
+AM_PATH_GUILE(,, [:])
+AM_CONDITIONAL([HAVE_GUILE], [test "$GUILE_TOOLS" != :])
+@end example
+
+@item GUILE_VERSION
+The Guile version number, in the form @var{major}.@var{minor}
+(e.g., @samp{1.8}).
+
+@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.
+
+@c @example
+@c XXX
+@c @end example
+@end vtable
+
+All these directory variables have values that start with either
+@samp{$@{prefix@}} or @samp{$@{exec_prefix@}} unexpanded.  This works
+fine in @file{Makefiles}, but it makes these variables hard to use in
+@file{configure}.  This is mandated by the GNU coding standards, so
+that the user can run @samp{make prefix=/foo install}.  The Autoconf
+manual has a section with more details on this topic
+(@pxref{Installation Directory Variables, , Installation Directory
+Variables, autoconf, The Autoconf Manual}).  See also @ref{Hard-Coded
+Install Paths}.
+
+
 @node Documentation
 @chapter Building documentation
 
-- 
1.7.4.1.48.g5673d





Information forwarded to owner <at> debbugs.gnu.org, bug-automake@HIDDEN:
bug#7995; Package automake. Full text available.

Message received at 7995 <at> debbugs.gnu.org:


Received: (at 7995) by debbugs.gnu.org; 20 Feb 2011 07:30:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 20 02:30:47 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Pr3kk-0005A6-IA
	for submit <at> debbugs.gnu.org; Sun, 20 Feb 2011 02:30:46 -0500
Received: from mailout-de.gmx.net ([213.165.64.23])
	by debbugs.gnu.org with smtp (Exim 4.69)
	(envelope-from <Ralf.Wildenhues@HIDDEN>) id 1Pr3kh-00059t-OP
	for 7995 <at> debbugs.gnu.org; Sun, 20 Feb 2011 02:30:45 -0500
Received: (qmail invoked by alias); 20 Feb 2011 07:30:37 -0000
Received: from xdsl-89-0-72-128.netcologne.de (EHLO localhost.localdomain)
	[89.0.72.128]
	by mail.gmx.net (mp071) with SMTP; 20 Feb 2011 08:30:37 +0100
X-Authenticated: #13673931
X-Provags-ID: V01U2FsdGVkX1/gFEExYGfgMGLb78LRi7iPYIY0lObl/sMnRVgUd4
	3CwsYCrupdrq/5
Received: from ralf by localhost.localdomain with local (Exim 4.69)
	(envelope-from <Ralf.Wildenhues@HIDDEN>)
	id 1Pr3ka-0005q3-HL; Sun, 20 Feb 2011 08:30:36 +0100
Date: Sun, 20 Feb 2011 08:30:36 +0100
From: Ralf Wildenhues <Ralf.Wildenhues@HIDDEN>
To: 7995 <at> debbugs.gnu.org, Ludovic =?iso-8859-1?Q?Court=E8s?= <ludo@HIDDEN>,
	Andy Wingo <wingo@HIDDEN>
Subject: Re: bug#7995: Guile support in Automake
Message-ID: <20110220073036.GB19081@HIDDEN>
References: <20110206222257.GF18450@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20110206222257.GF18450@HIDDEN>
Organization: Institute for Numerical Simulation, University of Bonn
User-Agent: Mutt/1.5.20 (2010-08-04)
X-Y-GMX-Trusted: 0
X-Spam-Score: -2.8 (--)
X-Debbugs-Envelope-To: 7995
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.8 (--)

[ http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7995 aka
  http://thread.gmane.org/gmane.comp.sysutils.automake.bugs/5303 ]

* Ralf Wildenhues wrote on Sun, Feb 06, 2011 at 11:22:57PM CET:
> Automake should support Guile.

> I actually have patches for some tests, documentation and half an
> implementation from last year;

Here we go.  For now I've done little with the patches except rebase
and squash the intermediate stages, update copyright years, remove
notes from git, and ensure there are no syntax errors.

That means however, that nothing really works yet.  It's still a total
mess.  So what I would like to ask from readers at this point is:
please go through the doc changes and let's discuss them first.
Also, it is important to not step on guile/meta/guile.m4 toes (or vice
versa), so some checking for that is prodent.  When we know what is
desired, the tests should be amended/fixed to cover that, and then we
can fix the implementation to follow.

If you prefer, I can also put them in a temporary branch (which for the
moment I would expect to be rewound at some point later).

Here's a preliminary list of issues that I see:

- Why guile_GUILE and not guile_LISP?  What's the rationale for naming
  it differently, and what's the rationale for actually treating it
  differently?  This question has two parts: LISP is treated by emacs
  not guile-tools, and IIUC then the idea was that GUILE is compiled
  already at 'make all' time and not just at 'make install' time, right?
  Is the latter part just "nice to have" or an important feature?

- The current tests assume _GUILE sources are distributed by default;
  OTOH, _LISP are not.  Rationale for this semantic difference?

- Please fix errors you can find in the tests; esp. the extension module
  in guile3.test doesn't seem to do the right thing yet (with my
  unfinished implementation).

- I renamed guileextensiondir from earlier suggestions to guileextdir,
  both for brevity, and to avoid the question of whether there is a
  trailing 's' in the name.  OK?

- The Guile manual documents Autoconf macros distributed in
  $datarootdir/aclocal/guile.m4.  The names in there are a bit
  unfortunate in that the macros more or less use the same GUILE_*
  namespace that we would like to use for some variables (which means
  you cannot easily turn on checking for unexpanded macro names through
  something like
    m4_pattern_forbid([^GUILE_])dnl

  and there is even overlap in the semantics and shell variable names.
  We need to address that; esp. since the macros shipped with Guile have
  been out there for long, we cannot just expect them to disappear
  instantly.  There should be a clear, backward-compatible upgrade path,
  and a clear intent on how usage should be in the future, for Guile
  users both with and without Automake.

- The handling of compile and link flags is still quite suboptimal.
  I still need to think about that a bit more.

- I haven't yet considered the handling of flags to uninstalled module
  stuff.  This is just TODO.

- My current plan is to either not provide something like
    foo_scm_GUILEFLAGS = override for $(AM_GUILEFLAGS)

  or to not let it cause renamed .go files.  Do you think users will
  need per-target guile-tools compile flags?  Because if they do, then
  we need to document this stuff, and that it's not in line with how
  Automake operates elsewhere, etc.

- The register_language bits in the last patch are totally unused yet,
  as the machinery isn't yet able to handle languages that either don't
  use a linker in the end, or don't rename objects with per-target flags
  which is probably desirable for Guile (similar to how Python support
  works).

I should apologize for taking totally random and unorganized notes
below.  They are basically just a jot-down from last year of what Andy
and Ludo said.

Thanks,
Ralf


Notes about Guile support:

# set from guile-config
# or from pkg-config if guile major version known

.go: compiled guile files
     sys-dep not executable byte-code
.scm: source guile files (can have other extensions)
.sls .sps .ss

One problem will be: when we add Go support, .go has conflicting
semantics.


cat > Makefile.am <<\END
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

# without guile compiler, just install sources
# but also install objects whenever possible

GUILE_TOOLS = guile-tools
GUILE_TOOLS_COMPILE = $(GUILE_TOOLS) compile
GUILE_COMPILE = $(GUILE_TOOLS_COMPILE) $(AM_GUILEFLAGS) $(GUILEFLAGS)

$(GUILE_TOOLS_COMPILE) $(AM_GUILEFLAGS) $(GUILEFLAGS) -o $@ $<
# no ordering req
# no renaming

foo_scm_GUILEFLAGS should not cause the output to be renamed.


AM_PATH_GUILE([minimum-version], [if-available], [if-not=AC_MSG_ERROR])

# effective version: first numbers on the first line

guile-tools --effective-version
       X.Y
  or
guile-tools --version | sed 's/[1-9][0-9.]'

error out if X.Y is < 1.8

# not: guile -c '(begin (display (effective-version)) (newline))'

# .go

# guile-tools compile load path
# -L . -L $(srcdir) or GUILE_LOAD_PATH = a:b:c: GUILE_LOAD_COMPILED_PATH
# -L is for source
# -M is for output
# GUILE_LOAD_PATH is for source only, lower prio than -L
# GUILE_LOAD_COMPILED_PATH is for obj only


.scm.go:


libtool --mode=execute -dlopen foo.la guile bar.scm
bar.scm:
(dynamic-link "foo")

make install
guile bar.scm


bar.scm loads foo.la

bar.scm


# 1.6: error
# 1.8:
# guiledir = $(datarootdir)/guile/site
# > 1.8:
# guiledir = $(datarootdir)/guile/site/X.Y
#      possibly version-independent
#      sources for users
# guilepkgdir = $(guiledir)/$(PACKAGE)
#
# for 1.8:
# guileexecdir = $(libdir)
# > 1.8:
# guileexecdir = $(libdir)/guile/X.Y
#      version-dependent
#
# guilesitedir = $(guiledir)/site
#
# guileextensiondir = $(guileexecdir)/extensions
#


cat > Makefile.am <<\END

guile_GUILE = foo.scm bar.scm baz.scm
# The next line looks wrong; should be noinst_GUILE?
noinst_guile_GUILE = foo.scm bar.scm baz.scm

guile_DATA = not-compiled.scm

nobase_guile_GUILE = sub/foo.scm
nobase_pkgguile_GUILE = sub/foo.scm
# compiled object goes into subdir as well.

nodist_guile_GUILE

guileextension_LTLIBRARIES = foo.la
foo_la_LDFLAGS = -module

foo_la_LIBADD = $(GUILELIBS)
foo_la_CFLAGS = $(GUILECFLAGS)
foo_la_CPPFLAGS = $(GUILECPPFLAGS)
AM_CPPFLAGS
AM_CFLAGS
# AM_LDADD
# there should be an AM_LIBADD


# or: in configure.ac:
CFLAGS="$GUILECFLAGS $CPPFLAGS"
LIBS="$GUILELIBS $LIBS"




Information forwarded to owner <at> debbugs.gnu.org, bug-automake@HIDDEN:
bug#7995; Package automake. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 6 Feb 2011 22:14:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 06 17:14:27 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1PmCsE-0000Sq-UO
	for submit <at> debbugs.gnu.org; Sun, 06 Feb 2011 17:14:27 -0500
Received: from eggs.gnu.org ([140.186.70.92])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <Ralf.Wildenhues@HIDDEN>) id 1PmCsE-0000Sf-1W
	for submit <at> debbugs.gnu.org; Sun, 06 Feb 2011 17:14:26 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Ralf.Wildenhues@HIDDEN>) id 1PmD0Y-0004yJ-NP
	for submit <at> debbugs.gnu.org; Sun, 06 Feb 2011 17:23:03 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
	RCVD_IN_DNSWL_NONE,
	T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1
Received: from lists.gnu.org ([199.232.76.165]:38497)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Ralf.Wildenhues@HIDDEN>) id 1PmD0Y-0004yD-Km
	for submit <at> debbugs.gnu.org; Sun, 06 Feb 2011 17:23:02 -0500
Received: from [140.186.70.92] (port=41861 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1PmD0X-0008LJ-L3
	for bug-automake@HIDDEN; Sun, 06 Feb 2011 17:23:02 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Ralf.Wildenhues@HIDDEN>) id 1PmD0V-0004xD-Fk
	for bug-automake@HIDDEN; Sun, 06 Feb 2011 17:23:01 -0500
Received: from mailout-de.gmx.net ([213.165.64.23]:39085)
	by eggs.gnu.org with smtp (Exim 4.71)
	(envelope-from <Ralf.Wildenhues@HIDDEN>) id 1PmD0V-0004wi-29
	for bug-automake@HIDDEN; Sun, 06 Feb 2011 17:22:59 -0500
Received: (qmail invoked by alias); 06 Feb 2011 22:22:57 -0000
Received: from xdsl-78-35-60-126.netcologne.de (EHLO localhost.localdomain)
	[78.35.60.126]
	by mail.gmx.net (mp011) with SMTP; 06 Feb 2011 23:22:57 +0100
X-Authenticated: #13673931
X-Provags-ID: V01U2FsdGVkX1+l/cw31PylLacXEO10/p6TzrKaRrki8gqQ1CXChj
	RToAkz32K2I1ry
Received: from ralf by localhost.localdomain with local (Exim 4.69)
	(envelope-from <Ralf.Wildenhues@HIDDEN>)
	id 1PmD0T-0004sB-51; Sun, 06 Feb 2011 23:22:57 +0100
Date: Sun, 6 Feb 2011 23:22:57 +0100
From: Ralf Wildenhues <Ralf.Wildenhues@HIDDEN>
To: bug-automake@HIDDEN
Subject: Guile support in Automake
Message-ID: <20110206222257.GF18450@HIDDEN>
Mail-Followup-To: bug-automake@HIDDEN,
	Ludovic =?iso-8859-1?Q?Court=E8s?= <ludo@HIDDEN>,
	Andy Wingo <wingo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
Organization: Institute for Numerical Simulation, University of Bonn
User-Agent: Mutt/1.5.20 (2010-08-04)
X-Y-GMX-Trusted: 0
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 213.165.64.23
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 199.232.76.165
X-Spam-Score: -4.8 (----)
X-Debbugs-Envelope-To: submit
Cc: Andy Wingo <wingo@HIDDEN>,
	Ludovic =?iso-8859-1?Q?Court=E8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.8 (----)

Automake should support Guile.
(From Ludovic Courtès and Andy Wingo).

I actually have patches for some tests, documentation and half an
implementation from last year; opening this PR now to track progress
and not forget again.

Thanks,
Ralf




Acknowledgement sent to Ralf Wildenhues <Ralf.Wildenhues@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-automake@HIDDEN. Full text available.
Report forwarded to owner <at> debbugs.gnu.org, bug-automake@HIDDEN:
bug#7995; Package automake. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.