public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: Ulf Hermann <ulf.hermann@qt.io>
Cc: "elfutils-devel@sourceware.org" <elfutils-devel@sourceware.org>
Subject: Re: [PATCH] configure: Add new --enable-install-elfh option.
Date: Thu, 31 Jan 2019 22:51:00 -0000	[thread overview]
Message-ID: <20190131225138.GS9378@wildebeest.org> (raw)
In-Reply-To: <b7dee529-09ae-6159-7980-d5ef42292c9a@qt.io>

On Wed, Jan 30, 2019 at 09:54:53AM +0000, Ulf Hermann wrote:
> > Yes, it should indeed.
> > I used a slightly different solution though.
> > It relies on the default include flags already including the srcdirs.
> > Does that work for your use case too? (See revised patch attached.)
> 
> I'm not an expert in autotools. The reason I also have "else" case in my 
> code is that I want to do "+=" in the USE_GNULIB case below. That only 
> works if system_elf_libelf_test_CPPFLAGS is defined, which curiously it 
> is not if you don't explicitly set it before (even though it is 
> implicitly there somehow ... ?!?).
> 
> In particular I get the following error from autoconf if I naively merge 
> your patch:
> 
> > Ulf@Ulf-PC MINGW64 /d/elfutils$ autoreconf -fi
> > tests/Makefile.am:617: error: cannot apply '+=' because 'system_elf_libelf_test_CPPFLAGS' is not defined in
> > tests/Makefile.am:617: the following conditions:
> > tests/Makefile.am:617:   INSTALL_ELFH and USE_GNULIB
> > tests/Makefile.am:617: either define 'system_elf_libelf_test_CPPFLAGS' in these conditions, or use
> > tests/Makefile.am:617: '+=' in the same conditions as the definitions.
> > autoreconf: automake failed with exit status: 1
> 
> As this only applies to my code, you are of course free to apply your 
> version upstream. It probably makes no difference if the USE_GNULIB case 
> isn't there. I will adapt my code then.

That makes sense. I added the else to explicitly set it:

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 4c4af7843..1b0c7d333 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -598,6 +598,8 @@ addsections_LDADD = $(libelf)
 # Don't include any -I CPPFLAGS. Except when we install our own elf.h.
 if !INSTALL_ELFH
 system_elf_libelf_test_CPPFLAGS =
+else
+system_elf_libelf_test_CPPFLAGS = -I$(top_srcdir)/libelf
 endif
 system_elf_libelf_test_LDADD = $(libelf)

Pushed with that change.

Thanks,

Mark

      reply	other threads:[~2019-01-31 22:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-18 13:25 Mark Wielaard
2019-01-18 14:03 ` Ulf Hermann
2019-01-24 17:53   ` Mark Wielaard
2019-01-29 19:42     ` Mark Wielaard
2019-01-30  9:54     ` Ulf Hermann
2019-01-31 22:51       ` Mark Wielaard [this message]

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=20190131225138.GS9378@wildebeest.org \
    --to=mark@klomp.org \
    --cc=elfutils-devel@sourceware.org \
    --cc=ulf.hermann@qt.io \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).