GNU bug report logs - #8921
side stepping automake limitations with custom dependencies

Previous Next

Package: automake;

Reported by: Mike Frysinger <vapier <at> gentoo.org>

Date: Thu, 23 Jun 2011 00:00:02 UTC

Severity: normal

Done: "Ralf Wildenhues" <Ralf.Wildenhues <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: "Ralf Wildenhues" <Ralf.Wildenhues <at> gmx.de>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#8921: closed (side stepping automake limitations with custom
 dependencies)
Date: Thu, 23 Jun 2011 05:45:04 +0000
[Message part 1 (text/plain, inline)]
Your message dated Thu, 23 Jun 2011 07:44:41 +0200
with message-id <20110623054441.303520 <at> gmx.net>
and subject line Re: bug#8921: side stepping automake limitations with custom dependencies
has caused the GNU bug report #8921,
regarding side stepping automake limitations with custom dependencies
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
8921: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8921
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Mike Frysinger <vapier <at> gentoo.org>
To: bug-automake <at> gnu.org
Cc: Jie Zhang <jzhang918 <at> gmail.com>
Subject: side stepping automake limitations with custom dependencies
Date: Wed, 22 Jun 2011 19:58:59 -0400
[Message part 3 (text/plain, inline)]
i'm working on a project (urjtag) that has yacc/lex files in it.  and other 
files in the directory depend on the generated output from yacc/lex.  so the 
automake file looks something like:
libbsdl_la_SOURCES =  \
	vhdl_bison.y \
	bsdl_bison.y \
	bsdl.c       \
	bsdl_sem.c
libbsdl_flex_la_SOURCES = \
	vhdl_flex.l  \
	bsdl_flex.l

since the bison(yacc) files depend on the output of the flex(lex) files, we 
want to express the dependency:
libbsdl_flex_la-vhdl_flex.o: vhdl_bison.h
libbsdl_flex_la-bsdl_flex.o: bsdl_bison.h

but with this, we hit an ugly limitation in automake itself.  FTFM:
	http://sources.redhat.com/automake/automake.html#Extending
	[quote]
	Note that Automake does not make any distinction between rules with
	commands and rules that only specify dependencies. So it is not possible
	to append new dependencies to an automake-defined target without
	redefining the entire rule.
	[/quote]

i happened to notice though that automake only parses exact semantic matches.  
it cannot handle going through variables.  so i tried out:
$(libbsdl_la_OBJECTS): bsdl_bison.h vhdl_bison.h

ignoring the minor fact that a few extra objects depend on the headers than 
necessary, i get nice behavior: automake generates the compile rules for me, 
and i get to express the dependency to make so parallel builds dont fail.

is this an undocumented feature ?  or a bug that'll get fixed at some point ?  
we've been using this for a few years now without problems, but past behavior 
does not guarantee future behavior ...
-mike
[signature.asc (application/pgp-signature, inline)]
[Message part 5 (message/rfc822, inline)]
From: "Ralf Wildenhues" <Ralf.Wildenhues <at> gmx.de>
To: Mike Frysinger <vapier <at> gentoo.org>
Cc: jzhang918 <at> gmail.com, 8921-done <at> debbugs.gnu.org
Subject: Re: bug#8921: side stepping automake limitations with custom
	dependencies
Date: Thu, 23 Jun 2011 07:44:41 +0200
Hi Mike,

* Mike Frysinger wrote on Thu, Jun 23, 2011 at 02:07:30AM CEST:
> ah blah, i meant automake <at> gnu.org.  i dont know how to close bugs with this e-
> mail system, so if someone could do that for me, that'd be cool ...

Write to BUG-done@...

Done.

;-)

Cheers,
Ralf


This bug report was last modified 13 years and 323 days ago.

Previous Next


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