Re: [PATCH 1/2] libtraceevent: Add libtraceevent.so.$(EP_VERSION) to targets and fix links

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 23, 2020 at 8:50 PM Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
>
> From: "Steven Rostedt (VMware)" <rostedt@xxxxxxxxxxx>
>
> "make clean" left a broken symbolic link of libtraceevent.so.1 around,
> because the clean target removes $(TARGET) and *.so, where $(TARGET) removes
> the so that libtraceevent.so.1 points to, and *.so removes the symbolic link
> that points to libtraceevent.so.1. But nothing removes libtraceevent.so.1.
>
> Add both libtraceevent.so and libtraceevent.so.<major_version> to the
> LIB_TARGETS variable (for cleaning them up), and also to fix the links, as
> before it was:
>
>  libtraceevent.so -> libtraceevent.so.1.1.0
>  libtraceveent.so.1 -> libtraceveent.so.1.1.0
>
> Where it should be a cascade of:
>
>  libtraceevent.so -> libtraceevent.so.1
>  libtraceevent.so.1 -> libtraceevent.so.1.1.0
>
> Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>
> ---
>  Makefile | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 9e2b428760a4..2a6bfcce814f 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -91,7 +91,7 @@ N             =
>
>  EVENT_PARSE_VERSION = $(EP_VERSION).$(EP_PATCHLEVEL).$(EP_EXTRAVERSION)
>
> -LIB_TARGET  = libtraceevent.a libtraceevent.so.$(EVENT_PARSE_VERSION)
> +LIB_TARGET  = libtraceevent.a libtraceevent.so libtraceevent.so.$(EP_VERSION) libtraceevent.so.$(EVENT_PARSE_VERSION)
>  LIB_INSTALL = libtraceevent.a libtraceevent.so*
>  LIB_INSTALL := $(addprefix $(OUTPUT),$(LIB_INSTALL))
>
> @@ -139,8 +139,12 @@ $(TE_IN): force
>
>  $(OUTPUT)libtraceevent.so.$(EVENT_PARSE_VERSION): $(TE_IN)
>         $(QUIET_LINK)$(CC) --shared $(LDFLAGS) $^ -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@
> -       @ln -sf $(@F) $(OUTPUT)libtraceevent.so
> -       @ln -sf $(@F) $(OUTPUT)libtraceevent.so.$(EP_VERSION)
> +
> +$(OUTPUT)libtraceevent.so: $(OUTPUT)libtraceevent.so.$(EP_VERSION)
> +       @ln -sf $(<F) $@
> +
> +$(OUTPUT)libtraceevent.so.$(EP_VERSION): $(OUTPUT)libtraceevent.so.$(EVENT_PARSE_VERSION)
> +       @ln -sf $(<F) $@
>
>  $(OUTPUT)libtraceevent.a: $(TE_IN)
>         $(QUIET_LINK)$(RM) $@; $(AR) rcs $@ $^
> --
> 2.28.0
>
>
Thanks Steven!
Acked-by: "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@xxxxxxxxx>
-- 
Tzvetomir (Ceco) Stoyanov
VMware Open Source Technology Center



[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux