<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.32.2">
</HEAD>
<BODY>
On Sun, 2011-08-28 at 04:04 +0200, Rafał Mużyło wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
On Sat, Aug 27, 2011 at 08:46:40PM -0400, Gaetan Nadon wrote:
> On Sat, 2011-08-27 at 19:35 +0200, Rafał Mużyło wrote:
>
> > First a minor nitpick about "Use AM_YFLAGS and BUILT_SOURCES rather
> > than
> > EXTRA_DIST" patch:
> > while BUILT_SOURCES is probably the correct solution there, AM_YFLAGS
> > are redundant, it's already handled elsewhere.
> >
> >
>
> When not using "AM_YFLAGS = -d", laygram.h is not included in the
> tarball, but still generated. Building the tarball on a computer when
> yacc is not installed produces this error:
>
> make[1]: *** No rule to make target `laygram.h', needed by `all'. Stop.
>
> The yacc package is not required to build a tarball as the generated
> code is included in the said tarball, so laygram.h must be included.
>
> This target is missing in the makefile, so it does not work on a git
> build either.
>
> laygram.h: laygram.c
>         @if test ! -f $@; then \
>          rm -f laygram.c; \
>          $(MAKE) $(AM_MAKEFLAGS) laygram.c; \
>         else :; fi
>
>
> Thanks for mentioning this, I had not gone to that level of details yet.
So, in short AM_YFLAGS are needed mostly cause automake isn't good
enough at cheating ?
Cause there's already "%defines" for producing the header.
</PRE>
</BLOCKQUOTE>
<BR>
<BLOCKQUOTE>
<PRE>
<TT>"AM_YFLAGS</TT> is usually used to pass the -d option to yacc.
Automake knows what this means and will automatically adjust its rules
to update and distribute the header file built by ‘yacc -d’."
</PRE>
</BLOCKQUOTE>
<BR>
./configure --help:
<BLOCKQUOTE>
<PRE>
YFLAGS The list of arguments that will be passed by default to $YACC.
This script will default YFLAGS to the empty string to avoid a
default value of `-d' given by some make applications.
</PRE>
</BLOCKQUOTE>
<BR>
It would appear there is a long story behind this. Not to mention platforms we don't use,<BR>
different versions of yacc and bison, make programs, backward compatibility, etc..., etc...<BR>
<BR>
There are a couple of apps and the xserver using it as well and I find it reassuring when the same situations are coded the same way and have been reviewed.<BR>
<BR>
Feel free to provide a review tag :-)<BR>
<BR>
Thanks<BR>
<BR>
<BLOCKQUOTE TYPE=CITE>
<PRE>
It seems that putting 'BUILT_SOURCES = laygram.c' and adding laygram.h
to EXTRA_DIST should work just as well, even if it seems a bit more
ugly.
_______________________________________________
<A HREF="mailto:xorg-devel@lists.x.org">xorg-devel@lists.x.org</A>: X.Org development
Archives: <A HREF="http://lists.x.org/archives/xorg-devel">http://lists.x.org/archives/xorg-devel</A>
Info: <A HREF="http://lists.x.org/mailman/listinfo/xorg-devel">http://lists.x.org/mailman/listinfo/xorg-devel</A>
</PRE>
</BLOCKQUOTE>
<BR>
</BODY>
</HTML>