All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] autotools, autorefconf, libtoolize and non-existing m4 directory
Date: Tue, 10 Dec 2019 14:04:38 +0100	[thread overview]
Message-ID: <20191210140438.001cfca7@windsurf> (raw)
In-Reply-To: <c9d71c066a825c04278c1b57df673fb6@walle.cc>

Hello,

On Tue, 10 Dec 2019 11:34:51 +0100
Michael Walle <michael@walle.cc> wrote:

> Hi Thomas, Hi Peter,
> 
> we have a package [1] where:
>   - we have AC_CONFIG_MACRO_DIR([m4]) in configure.ac
>   - we have ACLOCAL_AMFLAGS = -I m4 in Makefile.am
>   - we do *not* have an m4/ subdirectory (there is actually a commit
>     that introduces an empty m4/ directory, but that should not be
>     necessary)
> 
> We now do trigger a bug where autoreconf from the host works perfectly
> and the autoreconf of busybox do not. Here is our first analysis:
>   - originating from [2], there was an upstream patch which degrades the
>     absence of a local m4 directory from fatal to just a warning in the
>     aclocal step.
>   - the current aclocal script treats just the _first_ include directory
>     that way. Ie. it assumes, that the local m4/ is the first one in
>     @user_includes, see [3]
>   - buildroot sets the first one by its own in the automake package,
>     see [4], because it supplies the first include already in the
>     "$(ACLOCAL)"
> 
> Is this behaviour intended? There is also an install option to aclocal
> which uses first directory in the list.
> 
> Unfortunately, I cannot come up with a solution other than:
>    ACLOCAL_AMFLAGS = -I m4 $(SOME_OTHER_FLAGS)
> and buildroot would set its own include path in SOME_OTHER_FLAGS. But
> I'd guess that will break many packages. So maybe the current behaviour
> is the lesser evil. But it does not really work like on the host system.

Maybe I misunderstood, but why don't you solve this like we're doing in
many other Buildroot packages already:

define LIBISCSI_CREATE_M4_DIR
        mkdir -p $(@D)/m4
endef
LIBISCSI_POST_PATCH_HOOKS += LIBISCSI_CREATE_M4_DIR

This is simple, and works just fine.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2019-12-10 13:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-10 10:34 [Buildroot] autotools, autorefconf, libtoolize and non-existing m4 directory Michael Walle
2019-12-10 13:04 ` Thomas Petazzoni [this message]
2019-12-10 13:21   ` Michael Walle
2019-12-10 13:30     ` Thomas Petazzoni

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=20191210140438.001cfca7@windsurf \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot@busybox.net \
    /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.