Messages in this thread | ![/](/images/icornerl.gif) | | Date | Thu, 12 Jan 2023 21:25:12 +0100 | From | Nicolas Schier <> | Subject | Re: [PATCH v3 1/3] objtool: Install libsubcmd in build |
| |
On Thu, Jan 05, 2023 at 01:01:53AM -0800 Ian Rogers wrote: > Including from tools/lib can create inadvertent dependencies. Install > libsubcmd in the objtool build and then include the headers from > there. > > Signed-off-by: Ian Rogers <irogers@google.com> > Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> > Tested-by: Nick Desaulniers <ndesaulniers@google.com> > --- > tools/objtool/Build | 2 -- > tools/objtool/Makefile | 33 +++++++++++++++++++++++++-------- > 2 files changed, 25 insertions(+), 10 deletions(-) > [...] > diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile > index a3a9cc24e0e3..fd9b3e3113c6 100644 > --- a/tools/objtool/Makefile > +++ b/tools/objtool/Makefile > @@ -12,9 +12,15 @@ srctree := $(patsubst %/,%,$(dir $(CURDIR))) > srctree := $(patsubst %/,%,$(dir $(srctree))) > endif > > -SUBCMD_SRCDIR = $(srctree)/tools/lib/subcmd/ > -LIBSUBCMD_OUTPUT = $(or $(OUTPUT),$(CURDIR)/) > -LIBSUBCMD = $(LIBSUBCMD_OUTPUT)libsubcmd.a > +LIBSUBCMD_DIR = $(srctree)/tools/lib/subcmd/ > +ifneq ($(OUTPUT),) > + LIBSUBCMD_OUTPUT = $(abspath $(OUTPUT))/libsubcmd > +else > + LIBSUBCMD_OUTPUT = $(CURDIR)/libsubcmd > +endif > +LIBSUBCMD_DESTDIR = $(LIBSUBCMD_OUTPUT)
Hi Ian,
Is there a reason for distinguishing between $(LIBSUBCMD_DESTDIR) and $(LIBSUBCMD_OUTPUT)?
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu> [unhandled content-type:application/pgp-signature] | ![\](/images/icornerr.gif) |