lkml.org 
[lkml]   [2019]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 22/23] libtraceevent: Fix lib installation with O=
    Date
    From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>

    When we use 'O=' with make to build libtraceevent in a separate folder
    it fails to install libtraceevent.a and libtraceevent.so.1.1.0 with the
    error:

    INSTALL /home/sudip/linux/obj-trace/libtraceevent.a
    INSTALL /home/sudip/linux/obj-trace/libtraceevent.so.1.1.0

    cp: cannot stat 'libtraceevent.a': No such file or directory
    Makefile:225: recipe for target 'install_lib' failed
    make: *** [install_lib] Error 1

    I used the command:

    make O=../../../obj-trace DESTDIR=~/test prefix==/usr install

    It turns out libtraceevent Makefile, even though it builds in a separate
    folder, searches for libtraceevent.a and libtraceevent.so.1.1.0 in its
    source folder.

    So, add the 'OUTPUT' prefix to the source path so that 'make' looks for
    the files in the correct place.

    Signed-off-by: Sudipm Mukherjee <sudipm.mukherjee@gmail.com>
    Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
    Cc: linux-trace-devel@vger.kernel.org
    Link: http://lore.kernel.org/lkml/20191115113610.21493-1-sudipm.mukherjee@gmail.com
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    ---
    tools/lib/traceevent/Makefile | 1 +
    1 file changed, 1 insertion(+)

    diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
    index cbb429f55062..83446fe2cf01 100644
    --- a/tools/lib/traceevent/Makefile
    +++ b/tools/lib/traceevent/Makefile
    @@ -97,6 +97,7 @@ EVENT_PARSE_VERSION = $(EP_VERSION).$(EP_PATCHLEVEL).$(EP_EXTRAVERSION)

    LIB_TARGET = libtraceevent.a libtraceevent.so.$(EVENT_PARSE_VERSION)
    LIB_INSTALL = libtraceevent.a libtraceevent.so*
    +LIB_INSTALL := $(addprefix $(OUTPUT),$(LIB_INSTALL))

    INCLUDES = -I. -I $(srctree)/tools/include $(CONFIG_INCLUDES)

    --
    2.21.0
    \
     
     \ /
      Last update: 2019-12-03 14:58    [W:4.131 / U:0.036 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site