GNU logs - #9240, boring messages


Message sent to owner <at> debbugs.gnu.org, bug-automake@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#9240: Implementing a plugin-like module
Resent-From: Stefano Lattarini <stefano.lattarini@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-To: owner <at> debbugs.gnu.org
Resent-CC: bug-automake@HIDDEN
Resent-Date: Thu, 04 Aug 2011 13:54:02 +0000
Resent-Message-ID: <handler.9240.B.131246600320895 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 9240
X-GNU-PR-Package: automake
X-GNU-PR-Keywords: 
To: automake@HIDDEN
Cc: mrsam@HIDDEN, 9240 <at> debbugs.gnu.org
X-Debbugs-Original-Cc: Sam Varshavchik <mrsam@HIDDEN>, bug-automake@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.131246600320895
          (code B ref -1); Thu, 04 Aug 2011 13:54:02 +0000
Received: (at submit) by debbugs.gnu.org; 4 Aug 2011 13:53:23 +0000
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 1QoyMV-0005Qy-F6
	for submit <at> debbugs.gnu.org; Thu, 04 Aug 2011 09:53:23 -0400
Received: from eggs.gnu.org ([140.186.70.92])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <stefano.lattarini@HIDDEN>) id 1QoyMS-0005Qp-0g
	for submit <at> debbugs.gnu.org; Thu, 04 Aug 2011 09:53:21 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@HIDDEN>) id 1QoyLk-0007wq-4y
	for submit <at> debbugs.gnu.org; Thu, 04 Aug 2011 09:52:40 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
	RCVD_IN_DNSWL_LOW, T_DKIM_INVALID,
	T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1
Received: from lists.gnu.org ([140.186.70.17]:48617)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@HIDDEN>) id 1QoyLk-0007wm-1W
	for submit <at> debbugs.gnu.org; Thu, 04 Aug 2011 09:52:36 -0400
Received: from eggs.gnu.org ([140.186.70.92]:55688)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@HIDDEN>) id 1QoyLf-0003ZV-Dm
	for bug-automake@HIDDEN; Thu, 04 Aug 2011 09:52:35 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@HIDDEN>) id 1QoyLd-0007vJ-Rs
	for bug-automake@HIDDEN; Thu, 04 Aug 2011 09:52:31 -0400
Received: from mail-wy0-f169.google.com ([74.125.82.169]:47342)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@HIDDEN>)
	id 1QoyLZ-0007uq-TY; Thu, 04 Aug 2011 09:52:26 -0400
Received: by wyg36 with SMTP id 36so1572831wyg.0
	for <multiple recipients>; Thu, 04 Aug 2011 06:52:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; 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;
	bh=xC1KzkbTPf/mrChkkjtU6izTxkmg+JQffv2YjRyYXTY=;
	b=IPYlX9/m/F4uZXJ5+aDIu8tiFNxNPyvmKtQpZO1poMb7q4lKOT04Y6fRsfP7OfUp6B
	dCpDvQC2NRo2n0xTBQ/sjf1mhl6yRqNGDSlLxr3uehR7F+1/DIkJs8pnfEYd7YuYb80s
	qYXlxnf+QhjXm5SU1um/9UgeYR+fcZMYnkum0=
Received: by 10.227.32.136 with SMTP id c8mr757060wbd.7.1312465944668;
	Thu, 04 Aug 2011 06:52:24 -0700 (PDT)
Received: from bigio.localnet
	(host167-98-dynamic.20-79-r.retail.telecomitalia.it [79.20.98.167])
	by mx.google.com with ESMTPS id ff6sm1506416wbb.49.2011.08.04.06.52.21
	(version=TLSv1/SSLv3 cipher=OTHER);
	Thu, 04 Aug 2011 06:52:21 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@HIDDEN>
Date: Thu, 4 Aug 2011 15:52:12 +0200
User-Agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )
References: <cone.1312425131.757181.12464.500@HIDDEN>
In-Reply-To: <cone.1312425131.757181.12464.500@HIDDEN>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <201108041552.13271.stefano.lattarini@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 140.186.70.17
X-Spam-Score: -5.9 (-----)
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/cgi-bin/mailman/private/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: -5.9 (-----)

Hello Sam.

On Thursday 04 August 2011, Sam Varshavchik wrote:
> I'm looking for a way to implement an optional plugin-like facility in  
> automake.
>
> Basically, take a stock distro installation of automake, then augment it  
> somehow so that automake would add my stuff into each Makefile.in file that  
> it generates from Makefile.am.
>
A quick workaround to obtain this behaviour is to write your custom/rules
defintion in a `.am' fragment in your source tree, and then include it
from all the Makefile.am files that need it:

  $ cat my-rules.am
  my_variable = ...
  .ctpl.c:
	# rules to create a C file from a template `.ctpl'.

  $ cat lib/Makefile.am
  include  $(top_srcdir)/my-rules.am
  ... [specific rules]

  $ cat src/Makefile.am
  include  $(top_srcdir)/my-rules.am
  ... [other specific rules]

Automake will take care of processing the contents of my-rules.am, and will
copy the result in all the Makefile.in files derived from the Makefile.am
files that include it.

This way, if you have to change your custom rules or definitions, you
will only have to do so in one place (i.e., in my-rules.am).

All of this is documented in the Automake manual (in a very concise way
though, so I can understand why you've missed it):
 <http://www.gnu.org/software/automake/manual/html_node/Include.html>

Maybe a polished version of my example above will make a nice
addition to the "Extending Automake Rules" section in the automake
manual ...  I'm adding bug-automake on CC: so that we won't forget
about the issue.

> My situation is that I'm installing a toolkit; a library, a part of which is  
> a code generator. Let's say that my code generator produces filename.H from  
> filename.tmpl.
> 
> I can always write out the rules explicitly, something like:
> 
> BUILT_SOURCES=filename.H
> 
> filename.H: filename.tmpl
>      # build rule that runs the code generator goes here
> 
> bin_PROGRAMS=app
> 
> app_SOURCES=appmain.C
> 
> # and appmain.C #includes filename.H
> 
> 
> Something like that. That's the basic scenario. What I would like to  
> accomplish is to have the actual build rules defined by the installed  
> toolkit. The build rules are somewhat non-trivial, and with many code- 
> generated .H files, it gets tedious. I'm fine with limiting my portability  
> to gmake, so I can put something like
> 
> $(call GENERATE_TMPL_RULE,filename)
> 
> and my GENERATE_TMPL_RULE macro eval()s the appropriate make rules that  
> produce filename.H from filename.tmpl; then I just add additional calls to  
> this macro to generate rules for each code-generated .H file. Works fine.
>
Well, if the flags that need to be passes to the code generator are the
same for all your generated headers, you could use a suffix rule instead,
which is portable to non-GNU make:

  .tmpl.H:
	# build rule that runs the code generator goes here

> The definition of the GENERATE_TMPL_RULE is owned by the toolkit, and I'm  
> looking for a way to avoid having each app, that builds against the toolkit,  
> from explicitly adding the macro definition in its Makefile.am. I'd like to  
> have automake put the canned GENERATE_TMP_RULE into the Makefile.in that it  
> generates.
>
My proposed solution above should work quite nicely in this situation: you
just copy the GENERATE_TMP_RULE defintion in a, say, `my-toolkit.am' file,
and include it in all the Makefile.am files that require its rules.  If you
need to use this file in several projects, and don't want to keep multiple
copies around, you can save the "master copy" in a known location (say
under `~/my-toolkit.am'), and then symlink it into the source trees all the
required projects.

> In my distro, I see that automake has a collection of files in  
> /usr/share/automake-[VERSION]/am/*.am, which look like various snippets that  
> the main automake script pulls together into the Makefile.in script that it  
> produces. But it's not clear to me if it's possible for me to make the  
> necessary arrangements for the automake script to insert my own *.am script,  
> that my toolkit could install into that directory,
>
There's no need to install an `.am' file there in order to use it with the
`include' directive.

> into a Makefile.in  
> produced by automake. That's basically what I'm looking to do, in a  
> nutshell; I'm unable to locate any info on this topic in the automake  
> manual; any tips would be appreciated.
> 

HTH,
  Stefano




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Stefano Lattarini <stefano.lattarini@HIDDEN>
Subject: bug#9240: Acknowledgement (Implementing a plugin-like module)
Message-ID: <handler.9240.B.131246600320895.ack <at> debbugs.gnu.org>
References: <201108041552.13271.stefano.lattarini@HIDDEN>
X-Gnu-PR-Message: ack 9240
X-Gnu-PR-Package: automake
Reply-To: 9240 <at> debbugs.gnu.org
Date: Thu, 04 Aug 2011 13:54:02 +0000

Thank you for filing a new bug report with GNU.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-automake@HIDDEN

If you wish to submit further information on this problem, please
send it to 9240 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
9240: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D9240
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


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


Received: (at control) by debbugs.gnu.org; 4 Aug 2011 14:01:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 04 10:01:03 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 1QoyTu-0005hn-Fz
	for submit <at> debbugs.gnu.org; Thu, 04 Aug 2011 10:01:03 -0400
Received: from mail-ww0-f46.google.com ([74.125.82.46])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <stefano.lattarini@HIDDEN>) id 1QoyTr-0005hZ-Oo
	for control <at> debbugs.gnu.org; Thu, 04 Aug 2011 10:01:00 -0400
Received: by wwf25 with SMTP id 25so1932717wwf.15
	for <control <at> debbugs.gnu.org>; Thu, 04 Aug 2011 07:00:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=from:to:subject:date:user-agent:references:in-reply-to:mime-version
	:content-type:content-transfer-encoding:message-id;
	bh=GqqOXCzw1MCYLarFw5ccFWpmci6Kurn9Cdf6uGp/SX8=;
	b=CYmcnTTCCmlhYqVyzEpPrN79MBd+GRBYH3ZlIlnY97N7JOtHw11wsO3TpFIteqNedF
	qmphNeIk3McKMm++sMXhLLulU89O8hFfShioiJA9s8Yu92kO2Gfv4t13RTp+/I5RtAvw
	QhPstDGv8+HbEXgkDPPZf26bmieDT12wg7Fts=
Received: by 10.216.169.4 with SMTP id m4mr957150wel.67.1312466418961;
	Thu, 04 Aug 2011 07:00:18 -0700 (PDT)
Received: from bigio.localnet
	(host167-98-dynamic.20-79-r.retail.telecomitalia.it [79.20.98.167])
	by mx.google.com with ESMTPS id e56sm1208787wed.41.2011.08.04.07.00.16
	(version=TLSv1/SSLv3 cipher=OTHER);
	Thu, 04 Aug 2011 07:00:17 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@HIDDEN>
To: control <at> debbugs.gnu.org
Subject: Re: bug#9240: Implementing a plugin-like module
Date: Thu, 4 Aug 2011 16:00:05 +0200
User-Agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )
References: <cone.1312425131.757181.12464.500@HIDDEN>
	<201108041552.13271.stefano.lattarini@HIDDEN>
In-Reply-To: <201108041552.13271.stefano.lattarini@HIDDEN>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <201108041600.05806.stefano.lattarini@HIDDEN>
X-Spam-Score: -4.8 (----)
X-Debbugs-Envelope-To: control
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/cgi-bin/mailman/private/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.4 (----)

retitle 9240 docs: give an example about use of `include'
severity 9240 wishlist
thanks




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


Received: (at control) by debbugs.gnu.org; 4 Aug 2011 14:01:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 04 10:01:03 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 1QoyTu-0005hn-Fz
	for submit <at> debbugs.gnu.org; Thu, 04 Aug 2011 10:01:03 -0400
Received: from mail-ww0-f46.google.com ([74.125.82.46])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <stefano.lattarini@HIDDEN>) id 1QoyTr-0005hZ-Oo
	for control <at> debbugs.gnu.org; Thu, 04 Aug 2011 10:01:00 -0400
Received: by wwf25 with SMTP id 25so1932717wwf.15
	for <control <at> debbugs.gnu.org>; Thu, 04 Aug 2011 07:00:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=from:to:subject:date:user-agent:references:in-reply-to:mime-version
	:content-type:content-transfer-encoding:message-id;
	bh=GqqOXCzw1MCYLarFw5ccFWpmci6Kurn9Cdf6uGp/SX8=;
	b=CYmcnTTCCmlhYqVyzEpPrN79MBd+GRBYH3ZlIlnY97N7JOtHw11wsO3TpFIteqNedF
	qmphNeIk3McKMm++sMXhLLulU89O8hFfShioiJA9s8Yu92kO2Gfv4t13RTp+/I5RtAvw
	QhPstDGv8+HbEXgkDPPZf26bmieDT12wg7Fts=
Received: by 10.216.169.4 with SMTP id m4mr957150wel.67.1312466418961;
	Thu, 04 Aug 2011 07:00:18 -0700 (PDT)
Received: from bigio.localnet
	(host167-98-dynamic.20-79-r.retail.telecomitalia.it [79.20.98.167])
	by mx.google.com with ESMTPS id e56sm1208787wed.41.2011.08.04.07.00.16
	(version=TLSv1/SSLv3 cipher=OTHER);
	Thu, 04 Aug 2011 07:00:17 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@HIDDEN>
To: control <at> debbugs.gnu.org
Subject: Re: bug#9240: Implementing a plugin-like module
Date: Thu, 4 Aug 2011 16:00:05 +0200
User-Agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )
References: <cone.1312425131.757181.12464.500@HIDDEN>
	<201108041552.13271.stefano.lattarini@HIDDEN>
In-Reply-To: <201108041552.13271.stefano.lattarini@HIDDEN>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <201108041600.05806.stefano.lattarini@HIDDEN>
X-Spam-Score: -4.8 (----)
X-Debbugs-Envelope-To: control
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/cgi-bin/mailman/private/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.4 (----)

retitle 9240 docs: give an example about use of `include'
severity 9240 wishlist
thanks





Last modified: Mon, 25 Nov 2019 12:00:02 UTC

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