From: Jeremy Sowden <jeremy@azazel.net>
To: Jan Engelhardt <jengelh@inai.de>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>,
Netfilter Devel <netfilter-devel@vger.kernel.org>
Subject: Re: [conntrack-tools 6/6] build: fix dependency-tracking of yacc-generated header
Date: Sat, 25 Sep 2021 18:29:13 +0100 [thread overview]
Message-ID: <YU9caae8KEdskfVp@azazel.net> (raw)
In-Reply-To: <4626n855-s692-r9sn-30rn-rosr6s179sn@vanv.qr>
[-- Attachment #1: Type: text/plain, Size: 1619 bytes --]
On 2021-09-25, at 17:49:27 +0200, Jan Engelhardt wrote:
> On Saturday 2021-09-25 17:10, Jeremy Sowden wrote:
> > List it as a built source in order to force make to create it before
> > compilation. Otherwise, a parallel make can end up attempting to
> > compile the output of lex before yacc has finished generating its
> > own output:
> >
> > --- a/src/Makefile.am
> > +++ b/src/Makefile.am
> > @@ -6,6 +6,7 @@ endif
> >
> > AM_YFLAGS = -d
> >
> > +BUILT_SOURCES = read_config_yy.h
> > MAINTAINERCLEANFILES = read_config_yy.c read_config_yy.h read_config_lex.c
>
> I have a strong reason to believe that you could just write
>
> read_config_yy.h: read_config_yy.y
>
> (detail https://lists.gnu.org/archive/html/automake/2021-09/msg00011.html )
Automake complains:
src/Makefile.am:65: warning: user target 'read_config_yy.h' defined here ...
automake: ... overrides Automake target 'read_config_yy.h' defined here
From the documentation (https://www.gnu.org/software/automake/manual/automake.html#Extending):
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.
In this case, adding the rule you suggest to Makefile.am suppresses the
rule that automake would normally generate:
read_config_yy.h: read_config_yy.c
@if test ! -f $@; then rm -f read_config_yy.c; else :; fi
@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) read_config_yy.c; else :; fi
J.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2021-09-25 17:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-25 15:10 [conntrack-tools 0/6] Build fixes Jeremy Sowden
2021-09-25 15:10 ` [conntrack-tools 1/6] build: remove commented-out macros from configure.ac Jeremy Sowden
2021-09-25 15:10 ` [conntrack-tools 2/6] build: quote AC_INIT arguments Jeremy Sowden
2021-09-25 15:10 ` [conntrack-tools 3/6] build: replace `AM_PROG_LIBTOOL` and `AC_DISABLE_STATIC` with `LT_INIT` Jeremy Sowden
2021-09-25 15:10 ` [conntrack-tools 4/6] build: remove yacc-generated header from EXTRA_DIST Jeremy Sowden
2021-09-25 15:10 ` [conntrack-tools 5/6] build: clean yacc- and lex-generated files with maintainer-clean Jeremy Sowden
2021-09-25 15:10 ` [conntrack-tools 6/6] build: fix dependency-tracking of yacc-generated header Jeremy Sowden
2021-09-25 15:49 ` Jan Engelhardt
2021-09-25 17:29 ` Jeremy Sowden [this message]
2021-09-27 8:33 ` [conntrack-tools 0/6] Build fixes Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YU9caae8KEdskfVp@azazel.net \
--to=jeremy@azazel.net \
--cc=jengelh@inai.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.