From patchwork Wed Dec 9 04:19:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 11960217 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA447C4361B for ; Wed, 9 Dec 2020 04:22:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9667023B19 for ; Wed, 9 Dec 2020 04:22:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727076AbgLIEWC (ORCPT ); Tue, 8 Dec 2020 23:22:02 -0500 Received: from mail.kernel.org ([198.145.29.99]:38948 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726987AbgLIEWB (ORCPT ); Tue, 8 Dec 2020 23:22:01 -0500 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 74C4D2389E for ; Wed, 9 Dec 2020 04:21:21 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.94) (envelope-from ) id 1kmqye-0002z5-Ag for linux-trace-devel@vger.kernel.org; Tue, 08 Dec 2020 23:21:20 -0500 Message-ID: <20201209042120.195302380@goodmis.org> User-Agent: quilt/0.66 Date: Tue, 08 Dec 2020 23:19:47 -0500 From: Steven Rostedt To: linux-trace-devel@vger.kernel.org Subject: [PATCH 1/6] libtraceevent: Use macro names for libtraceevent library binaries References: <20201209041946.131377586@goodmis.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org From: "Steven Rostedt (VMware)" In order to move the libtraceevent library binaries to their own location in the build directory, use macros for their names in the Makefile. This will facilitate the changes to have their final locations be updated. Signed-off-by: Steven Rostedt (VMware) --- Makefile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index ea00085091e4..e17e9674573b 100644 --- a/Makefile +++ b/Makefile @@ -94,8 +94,11 @@ N = EVENT_PARSE_VERSION = $(EP_VERSION).$(EP_PATCHLEVEL).$(EP_EXTRAVERSION) -LIB_TARGET = libtraceevent.a libtraceevent.so libtraceevent.so.$(EP_VERSION) libtraceevent.so.$(EVENT_PARSE_VERSION) -LIB_INSTALL = libtraceevent.a libtraceevent.so* +LIBTRACEEVENT_STATIC = libtraceevent.a +LIBTRACEEVENT_SHARED = libtraceevent.so.$(EVENT_PARSE_VERSION) + +LIB_TARGET = $(LIBTRACEEVENT_STATIC) libtraceevent.so libtraceevent.so.$(EP_VERSION) $(LIBTRACEEVENT_SHARED) +LIB_INSTALL = $(LIBTRACEEVENT_STATIC) libtraceevent.so* LIB_INSTALL := $(addprefix $(OUTPUT),$(LIB_INSTALL)) INCLUDES = -I. -I $(srctree)/include $(CONFIG_INCLUDES) @@ -142,16 +145,16 @@ all_cmd: $(CMD_TARGETS) $(TE_IN): force $(Q)$(MAKE) $(build)=libtraceevent -$(OUTPUT)libtraceevent.so.$(EVENT_PARSE_VERSION): $(TE_IN) +$(OUTPUT)$(LIBTRACEEVENT_SHARED): $(TE_IN) $(QUIET_LINK)$(CC) --shared $(LDFLAGS) $^ -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@ $(LIBS) $(OUTPUT)libtraceevent.so: $(OUTPUT)libtraceevent.so.$(EP_VERSION) @ln -sf $( X-Patchwork-Id: 11960219 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DE35FC433FE for ; Wed, 9 Dec 2020 04:22:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ABDD223B5F for ; Wed, 9 Dec 2020 04:22:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726987AbgLIEWC (ORCPT ); Tue, 8 Dec 2020 23:22:02 -0500 Received: from mail.kernel.org ([198.145.29.99]:38946 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726969AbgLIEWB (ORCPT ); Tue, 8 Dec 2020 23:22:01 -0500 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7597F23A79 for ; Wed, 9 Dec 2020 04:21:21 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.94) (envelope-from ) id 1kmqye-0002za-G7 for linux-trace-devel@vger.kernel.org; Tue, 08 Dec 2020 23:21:20 -0500 Message-ID: <20201209042120.367414155@goodmis.org> User-Agent: quilt/0.66 Date: Tue, 08 Dec 2020 23:19:48 -0500 From: Steven Rostedt To: linux-trace-devel@vger.kernel.org Subject: [PATCH 2/6] libtraceevent: Remove "src" and "obj" from Makefile References: <20201209041946.131377586@goodmis.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org From: "Steven Rostedt (VMware)" "src" and "obj" variables are not used in the Makefile. There's no need to export them. Signed-off-by: Steven Rostedt (VMware) --- Makefile | 2 +- plugins/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e17e9674573b..3c2bd5619c3b 100644 --- a/Makefile +++ b/Makefile @@ -75,7 +75,7 @@ srctree := $(CURDIR) #$(info Determined 'srctree' to be $(srctree)) endif -export prefix libdir src obj +export prefix libdir # Shell quotes libdir_SQ = $(subst ','\'',$(libdir)) diff --git a/plugins/Makefile b/plugins/Makefile index f34bb5725cbc..8ae3882f9051 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -81,7 +81,7 @@ srctree := $(patsubst %/,%,$(dir $(CURDIR))) #$(info Determined 'srctree' to be $(srctree)) endif -export prefix libdir src obj +export prefix libdir # Shell quotes plugin_dir_SQ = $(subst ','\'',$(plugin_dir)) From patchwork Wed Dec 9 04:19:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 11960223 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE190C4167B for ; Wed, 9 Dec 2020 04:22:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C20D923B77 for ; Wed, 9 Dec 2020 04:22:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726969AbgLIEWC (ORCPT ); Tue, 8 Dec 2020 23:22:02 -0500 Received: from mail.kernel.org ([198.145.29.99]:38962 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727023AbgLIEWC (ORCPT ); Tue, 8 Dec 2020 23:22:02 -0500 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A290E23B19 for ; Wed, 9 Dec 2020 04:21:21 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.94) (envelope-from ) id 1kmqye-000304-LN for linux-trace-devel@vger.kernel.org; Tue, 08 Dec 2020 23:21:20 -0500 Message-ID: <20201209042120.532937710@goodmis.org> User-Agent: quilt/0.66 Date: Tue, 08 Dec 2020 23:19:49 -0500 From: Steven Rostedt To: linux-trace-devel@vger.kernel.org Subject: [PATCH 3/6] libtraceevent: Move creation of PKG_CONFIG_FILE to after Makefile.include References: <20201209041946.131377586@goodmis.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org From: "Steven Rostedt (VMware)" The creation of the PKG_CONFIG_FILE appends $(OUTPUT) to $(PKG_CONFIG_SOURCE_FILE) but this happens before the include of Makefile.include, that defines what $(OUTPUT) is. The end result is that the libtraceevent.pc file is not created in tho output directory that is specified. Signed-off-by: Steven Rostedt (VMware) --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 3c2bd5619c3b..3f96c1c7b4d6 100644 --- a/Makefile +++ b/Makefile @@ -52,15 +52,15 @@ includedir_relative = traceevent includedir = $(prefix)/include/$(includedir_relative) includedir_SQ = '$(subst ','\'',$(includedir))' -PKG_CONFIG_SOURCE_FILE = libtraceevent.pc -PKG_CONFIG_FILE := $(addprefix $(OUTPUT),$(PKG_CONFIG_SOURCE_FILE)) - export man_dir man_dir_SQ INSTALL export DESTDIR DESTDIR_SQ export EVENT_PARSE_VERSION include scripts/Makefile.include +PKG_CONFIG_SOURCE_FILE = libtraceevent.pc +PKG_CONFIG_FILE := $(addprefix $(OUTPUT),$(PKG_CONFIG_SOURCE_FILE)) + # copy a bit from Linux kbuild ifeq ("$(origin V)", "command line") From patchwork Wed Dec 9 04:19:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 11960225 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0CCBFC2BBCA for ; Wed, 9 Dec 2020 04:22:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D83602389E for ; Wed, 9 Dec 2020 04:22:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727023AbgLIEWC (ORCPT ); Tue, 8 Dec 2020 23:22:02 -0500 Received: from mail.kernel.org ([198.145.29.99]:38976 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727068AbgLIEWC (ORCPT ); Tue, 8 Dec 2020 23:22:02 -0500 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C628D23B23 for ; Wed, 9 Dec 2020 04:21:21 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.94) (envelope-from ) id 1kmqye-00030Y-R5 for linux-trace-devel@vger.kernel.org; Tue, 08 Dec 2020 23:21:20 -0500 Message-ID: <20201209042120.699002789@goodmis.org> User-Agent: quilt/0.66 Date: Tue, 08 Dec 2020 23:19:50 -0500 From: Steven Rostedt To: linux-trace-devel@vger.kernel.org Subject: [PATCH 4/6] libtraceevent: Have make clean honor the output (O=foo) directory References: <20201209041946.131377586@goodmis.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org From: "Steven Rostedt (VMware)" If "make O=/some/dir clean" is performed, the O=/some/dir is not honored, and the clean is performed on the current directory. If O= is specified on the command line, then the clean should perform the cleaning to that directory. Signed-off-by: Steven Rostedt (VMware) --- Makefile | 4 ++-- plugins/Makefile | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 3f96c1c7b4d6..330c8339f023 100644 --- a/Makefile +++ b/Makefile @@ -255,8 +255,8 @@ install: install_lib clean: clean_plugins $(call QUIET_CLEAN, libtraceevent) \ - $(RM) *.o *~ $(TARGETS) *.a *.so $(VERSION_FILES) .*.d .*.cmd; \ - $(RM) TRACEEVENT-CFLAGS tags TAGS; \ + $(RM) $(OUTPUT)*.o $(OUTPUT)*~ $(TARGETS) $(OUTPUT)*.a $(OUTPUT)*.so $(VERSION_FILES) $(OUTPUT).*.d $(OUTPUT).*.cmd; \ + $(RM) TRACEEVENT-CFLAGS $(OUTPUT)tags $(OUTPUT)TAGS; \ $(RM) $(PKG_CONFIG_FILE) PHONY += doc diff --git a/plugins/Makefile b/plugins/Makefile index 8ae3882f9051..a8868d01b09b 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -210,8 +210,9 @@ install: $(PLUGINS) clean: $(call QUIET_CLEAN, trace_plugins) \ - $(RM) *.o *~ $(TARGETS) *.a *.so $(VERSION_FILES) .*.d .*.cmd; \ - $(RM) $(OUTPUT)libtraceevent-dynamic-list \ + $(RM) $(OUTPUT)*.o $(OUTPUT)*~ $(TARGETS) $(OUTPUT)*.a $(OUTPUT)*.so $(VERSION_FILES) .*.d .*.cmd; \ + $(RM) $(OUTPUT)libtraceevent-dynamic-list; \ + $(RM) $(PLUGINS); \ $(RM) TRACEEVENT-CFLAGS tags TAGS; PHONY += force plugins From patchwork Wed Dec 9 04:19:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 11960227 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40E2FC4361B for ; Wed, 9 Dec 2020 04:22:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0E46F2389E for ; Wed, 9 Dec 2020 04:22:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727154AbgLIEWm (ORCPT ); Tue, 8 Dec 2020 23:22:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:39040 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726943AbgLIEWm (ORCPT ); Tue, 8 Dec 2020 23:22:42 -0500 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F1D8E23B4B for ; Wed, 9 Dec 2020 04:21:21 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.94) (envelope-from ) id 1kmqyf-000312-0A for linux-trace-devel@vger.kernel.org; Tue, 08 Dec 2020 23:21:21 -0500 Message-ID: <20201209042120.874416130@goodmis.org> User-Agent: quilt/0.66 Date: Tue, 08 Dec 2020 23:19:51 -0500 From: Steven Rostedt To: linux-trace-devel@vger.kernel.org Subject: [PATCH 5/6] libtraceevent: Have binary libraries build into lib directory References: <20201209041946.131377586@goodmis.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org From: "Steven Rostedt (VMware)" To clean up the source directory, have the library binaries build into its own "lib" directory. Signed-off-by: Steven Rostedt (VMware) --- Makefile | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 330c8339f023..9ec880c0105b 100644 --- a/Makefile +++ b/Makefile @@ -94,11 +94,15 @@ N = EVENT_PARSE_VERSION = $(EP_VERSION).$(EP_PATCHLEVEL).$(EP_EXTRAVERSION) -LIBTRACEEVENT_STATIC = libtraceevent.a -LIBTRACEEVENT_SHARED = libtraceevent.so.$(EVENT_PARSE_VERSION) +bdir = lib -LIB_TARGET = $(LIBTRACEEVENT_STATIC) libtraceevent.so libtraceevent.so.$(EP_VERSION) $(LIBTRACEEVENT_SHARED) -LIB_INSTALL = $(LIBTRACEEVENT_STATIC) libtraceevent.so* +export bdir + +LIBTRACEEVENT_STATIC = $(bdir)/libtraceevent.a +LIBTRACEEVENT_SHARED = $(bdir)/libtraceevent.so.$(EVENT_PARSE_VERSION) + +LIB_TARGET = $(LIBTRACEEVENT_STATIC) $(bdir)/libtraceevent.so $(bdir)/libtraceevent.so.$(EP_VERSION) $(LIBTRACEEVENT_SHARED) +LIB_INSTALL = $(LIBTRACEEVENT_STATIC) $(bdir)/libtraceevent.so* LIB_INSTALL := $(addprefix $(OUTPUT),$(LIB_INSTALL)) INCLUDES = -I. -I $(srctree)/include $(CONFIG_INCLUDES) @@ -146,18 +150,20 @@ $(TE_IN): force $(Q)$(MAKE) $(build)=libtraceevent $(OUTPUT)$(LIBTRACEEVENT_SHARED): $(TE_IN) + $(Q)mkdir -p $(OUTPUT)$(bdir) $(QUIET_LINK)$(CC) --shared $(LDFLAGS) $^ -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@ $(LIBS) -$(OUTPUT)libtraceevent.so: $(OUTPUT)libtraceevent.so.$(EP_VERSION) +$(OUTPUT)$(bdir)/libtraceevent.so: $(OUTPUT)$(bdir)/libtraceevent.so.$(EP_VERSION) @ln -sf $( X-Patchwork-Id: 11960229 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 935C2C4167B for ; Wed, 9 Dec 2020 04:22:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6C28523A79 for ; Wed, 9 Dec 2020 04:22:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726943AbgLIEWn (ORCPT ); Tue, 8 Dec 2020 23:22:43 -0500 Received: from mail.kernel.org ([198.145.29.99]:39038 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727126AbgLIEWn (ORCPT ); Tue, 8 Dec 2020 23:22:43 -0500 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 32DC023B28 for ; Wed, 9 Dec 2020 04:21:22 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.94) (envelope-from ) id 1kmqyf-00031W-5U for linux-trace-devel@vger.kernel.org; Tue, 08 Dec 2020 23:21:21 -0500 Message-ID: <20201209042121.039426916@goodmis.org> User-Agent: quilt/0.66 Date: Tue, 08 Dec 2020 23:19:52 -0500 From: Steven Rostedt To: linux-trace-devel@vger.kernel.org Subject: [PATCH 6/6] libtraceevent: Move source files into src/ directory References: <20201209041946.131377586@goodmis.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org From: "Steven Rostedt (VMware)" To clean up the source directory, create a "src" directory to store the header and C files. Signed-off-by: Steven Rostedt (VMware) --- Makefile | 18 +++++++++++------- plugins/Makefile | 2 +- Build => src/Build | 0 src/Makefile | 12 ++++++++++++ event-parse-api.c => src/event-parse-api.c | 0 event-parse-local.h => src/event-parse-local.h | 0 event-parse.c => src/event-parse.c | 0 event-parse.h => src/event-parse.h | 0 event-plugin.c => src/event-plugin.c | 0 event-utils.h => src/event-utils.h | 0 kbuffer-parse.c => src/kbuffer-parse.c | 0 kbuffer.h => src/kbuffer.h | 0 parse-filter.c => src/parse-filter.c | 0 parse-utils.c => src/parse-utils.c | 0 tep_strerror.c => src/tep_strerror.c | 0 trace-seq.c => src/trace-seq.c | 0 trace-seq.h => src/trace-seq.h | 0 17 files changed, 24 insertions(+), 8 deletions(-) rename Build => src/Build (100%) create mode 100644 src/Makefile rename event-parse-api.c => src/event-parse-api.c (100%) rename event-parse-local.h => src/event-parse-local.h (100%) rename event-parse.c => src/event-parse.c (100%) rename event-parse.h => src/event-parse.h (100%) rename event-plugin.c => src/event-plugin.c (100%) rename event-utils.h => src/event-utils.h (100%) rename kbuffer-parse.c => src/kbuffer-parse.c (100%) rename kbuffer.h => src/kbuffer.h (100%) rename parse-filter.c => src/parse-filter.c (100%) rename parse-utils.c => src/parse-utils.c (100%) rename tep_strerror.c => src/tep_strerror.c (100%) rename trace-seq.c => src/trace-seq.c (100%) rename trace-seq.h => src/trace-seq.h (100%) diff --git a/Makefile b/Makefile index 9ec880c0105b..9044536d2fcf 100644 --- a/Makefile +++ b/Makefile @@ -135,7 +135,7 @@ MAKEOVERRIDES= export srctree OUTPUT CC LD CFLAGS V build := -f $(srctree)/build/Makefile.build dir=. obj -TE_IN := $(OUTPUT)libtraceevent-in.o +TE_IN := $(OUTPUT)src/libtraceevent-in.o LIB_TARGET := $(addprefix $(OUTPUT),$(LIB_TARGET)) CMD_TARGETS = $(LIB_TARGET) $(PKG_CONFIG_FILE) @@ -147,7 +147,7 @@ all: all_cmd plugins all_cmd: $(CMD_TARGETS) $(TE_IN): force - $(Q)$(MAKE) $(build)=libtraceevent + $(Q)$(call descend,src,libtraceevent) $(OUTPUT)$(LIBTRACEEVENT_SHARED): $(TE_IN) $(Q)mkdir -p $(OUTPUT)$(bdir) @@ -252,14 +252,14 @@ install_pkgconfig: $(PKG_CONFIG_FILE) install_headers: $(call QUIET_INSTALL, headers) \ - $(call do_install,event-parse.h,$(includedir_SQ),644); \ - $(call do_install,event-utils.h,$(includedir_SQ),644); \ - $(call do_install,trace-seq.h,$(includedir_SQ),644); \ - $(call do_install,kbuffer.h,$(includedir_SQ),644) + $(call do_install,src/event-parse.h,$(includedir_SQ),644); \ + $(call do_install,src/event-utils.h,$(includedir_SQ),644); \ + $(call do_install,src/trace-seq.h,$(includedir_SQ),644); \ + $(call do_install,src/kbuffer.h,$(includedir_SQ),644) install: install_lib -clean: clean_plugins +clean: clean_plugins clean_src $(call QUIET_CLEAN, libtraceevent) \ $(RM) $(OUTPUT)*.o $(OUTPUT)*~ $(TARGETS) $(OUTPUT)*.a $(OUTPUT)*.so $(VERSION_FILES) $(OUTPUT).*.d $(OUTPUT).*.cmd; \ $(RM) TRACEEVENT-CFLAGS $(OUTPUT)tags $(OUTPUT)TAGS; \ @@ -310,6 +310,10 @@ PHONY += clean_plugins clean_plugins: $(call descend,plugins,clean) +PHONY += clean_src +clean_src: + $(call descend,src,clean) + force: # Declare the contents of the .PHONY variable as phony. We keep that diff --git a/plugins/Makefile b/plugins/Makefile index a8868d01b09b..e8b8850a19a9 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -93,7 +93,7 @@ CONFIG_FLAGS = OBJ = $@ N = -INCLUDES = -I. -I.. -I $(srctree)/include $(CONFIG_INCLUDES) +INCLUDES = -I. -I.. -I../src -I $(srctree)/include $(CONFIG_INCLUDES) # Set compile option CFLAGS ifdef EXTRA_CFLAGS diff --git a/Build b/src/Build similarity index 100% rename from Build rename to src/Build diff --git a/src/Makefile b/src/Makefile new file mode 100644 index 000000000000..c62104b77c86 --- /dev/null +++ b/src/Makefile @@ -0,0 +1,12 @@ + +include ../scripts/Makefile.include + +build := -f $(srctree)/build/Makefile.build dir=. obj + +libtraceevent: $(libtraceevent-y) + $(Q)$(MAKE) $(build)=libtraceevent + +clean: + $(call QUIET_CLEAN, trace_src) \ + $(RM) $(OUTPUT)*.o $(OUTPUT)*~ .*.d .*.cmd + diff --git a/event-parse-api.c b/src/event-parse-api.c similarity index 100% rename from event-parse-api.c rename to src/event-parse-api.c diff --git a/event-parse-local.h b/src/event-parse-local.h similarity index 100% rename from event-parse-local.h rename to src/event-parse-local.h diff --git a/event-parse.c b/src/event-parse.c similarity index 100% rename from event-parse.c rename to src/event-parse.c diff --git a/event-parse.h b/src/event-parse.h similarity index 100% rename from event-parse.h rename to src/event-parse.h diff --git a/event-plugin.c b/src/event-plugin.c similarity index 100% rename from event-plugin.c rename to src/event-plugin.c diff --git a/event-utils.h b/src/event-utils.h similarity index 100% rename from event-utils.h rename to src/event-utils.h diff --git a/kbuffer-parse.c b/src/kbuffer-parse.c similarity index 100% rename from kbuffer-parse.c rename to src/kbuffer-parse.c diff --git a/kbuffer.h b/src/kbuffer.h similarity index 100% rename from kbuffer.h rename to src/kbuffer.h diff --git a/parse-filter.c b/src/parse-filter.c similarity index 100% rename from parse-filter.c rename to src/parse-filter.c diff --git a/parse-utils.c b/src/parse-utils.c similarity index 100% rename from parse-utils.c rename to src/parse-utils.c diff --git a/tep_strerror.c b/src/tep_strerror.c similarity index 100% rename from tep_strerror.c rename to src/tep_strerror.c diff --git a/trace-seq.c b/src/trace-seq.c similarity index 100% rename from trace-seq.c rename to src/trace-seq.c diff --git a/trace-seq.h b/src/trace-seq.h similarity index 100% rename from trace-seq.h rename to src/trace-seq.h