From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] libs: fix sporadic out-of-tree build failures related to libs
Date: Wed, 20 Mar 2019 17:25:20 +0100 [thread overview]
Message-ID: <20190320162519.GA13644@rei> (raw)
In-Reply-To: <3fedf790971b876b20533ee3d6b5dff27b54fae3.1553076284.git.jstancek@redhat.com>
Hi!
> Reported-by: Petr Vorel <pvorel@suse.cz>
> Cc: Cyril Hrubis <chrubis@suse.cz>
> Signed-off-by: Jan Stancek <jstancek@redhat.com>
> ---
> include/mk/testcases.mk | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/include/mk/testcases.mk b/include/mk/testcases.mk
> index 131854ec7346..4cbb37640687 100644
> --- a/include/mk/testcases.mk
> +++ b/include/mk/testcases.mk
> @@ -43,17 +43,19 @@ LDLIBS += -lltp
>
> ifdef LTPLIBS
>
> -LTPLIBS_DIRS = $(addprefix $(abs_top_builddir)/libs/lib, $(LTPLIBS))
> +LTPLIBS_DIRS = $(addprefix libs/lib, $(LTPLIBS))
> LTPLIBS_FILES = $(addsuffix .a, $(addprefix $(abs_top_builddir)/libs/, $(foreach LIB,$(LTPLIBS),lib$(LIB)/lib$(LIB))))
>
> MAKE_DEPS += $(LTPLIBS_FILES)
>
> $(LTPLIBS_FILES): $(LTPLIBS_DIRS)
> - $(MAKE) -C "$^" -f "$^/Makefile" all
> + $(MAKE) -C "$(abs_top_builddir)/$^" -f "$(abs_top_srcdir)/$^/Makefile" all
>
> LDFLAGS += $(addprefix -L$(top_builddir)/libs/lib, $(LTPLIBS))
>
> +$(LTPLIBS_DIRS): %:
> + mkdir -p "$(abs_top_builddir)/$@"
The problem here is that unless the paths in LTPLIBS_DIRS match existing
files the mkdir -p is executed every time LTPLIBS is defined in
Makefile. I guess that we can put the absolute paths back to the
LTPLIBS_DIRS variable and use $(subst ..) to replace the builddir with
srcdir but I wonder if there is a better solution.
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2019-03-20 16:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-20 10:07 [LTP] [PATCH] libs: fix sporadic out-of-tree build failures related to libs Jan Stancek
2019-03-20 16:25 ` Cyril Hrubis [this message]
2019-03-20 19:55 ` Enji Cooper
2019-03-26 13:02 ` Petr Vorel
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=20190320162519.GA13644@rei \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
/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