From 685e3a1f553cadeaaf7b0366381ed3cf5fbc6b9c Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Mon, 18 Mar 2024 14:21:45 -0400 Subject: [PATCH] Move argpar to vendor directory MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Since this is source copied as-is from another project, I think it belongs to the vendor directory. This will make it so it will be skipped by format-cpp, for instance. Change-Id: I78892f80c4cbb3a2e863567b0021e895c6489402 Signed-off-by: Simon Marchi Signed-off-by: Jérémie Galarneau --- src/bin/lttng/Makefile.am | 2 +- src/bin/lttng/commands/add_trigger.cpp | 2 +- src/bin/lttng/commands/list_triggers.cpp | 2 +- src/bin/lttng/commands/remove_trigger.cpp | 2 +- src/bin/lttng/utils.hpp | 3 ++- src/common/Makefile.am | 7 ------- src/common/argpar-utils/argpar-utils.hpp | 3 ++- src/vendor/Makefile.am | 8 ++++++++ src/{common => vendor}/argpar/argpar.c | 0 src/{common => vendor}/argpar/argpar.h | 0 10 files changed, 16 insertions(+), 13 deletions(-) rename src/{common => vendor}/argpar/argpar.c (100%) rename src/{common => vendor}/argpar/argpar.h (100%) diff --git a/src/bin/lttng/Makefile.am b/src/bin/lttng/Makefile.am index e37183746..ed30ea1ab 100644 --- a/src/bin/lttng/Makefile.am +++ b/src/bin/lttng/Makefile.am @@ -46,5 +46,5 @@ lttng_LDADD = $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \ $(top_builddir)/src/common/libstring-utils.la \ $(top_builddir)/src/common/libfilter.la \ $(top_builddir)/src/common/libargpar-utils.la \ - $(top_builddir)/src/common/libargpar.la \ + $(top_builddir)/src/vendor/argpar/libargpar.la \ $(POPT_LIBS) diff --git a/src/bin/lttng/commands/add_trigger.cpp b/src/bin/lttng/commands/add_trigger.cpp index ad2fd47c1..18e91513b 100644 --- a/src/bin/lttng/commands/add_trigger.cpp +++ b/src/bin/lttng/commands/add_trigger.cpp @@ -9,11 +9,11 @@ #include "../loglevel.hpp" #include "../uprobe.hpp" #include "common/argpar-utils/argpar-utils.hpp" -#include "common/argpar/argpar.h" #include "common/dynamic-array.hpp" #include "common/mi-lttng.hpp" #include "common/string-utils/string-utils.hpp" #include "common/utils.hpp" +#include "vendor/argpar/argpar.h" #include diff --git a/src/bin/lttng/commands/list_triggers.cpp b/src/bin/lttng/commands/list_triggers.cpp index db905bc4f..58262a9e3 100644 --- a/src/bin/lttng/commands/list_triggers.cpp +++ b/src/bin/lttng/commands/list_triggers.cpp @@ -7,10 +7,10 @@ #include "../command.hpp" #include "common/argpar-utils/argpar-utils.hpp" -#include "common/argpar/argpar.h" #include "common/dynamic-array.hpp" #include "common/mi-lttng.hpp" #include "lttng/action/list-internal.hpp" +#include "vendor/argpar/argpar.h" /* For lttng_condition_type_str(). */ #include "lttng/condition/condition-internal.hpp" diff --git a/src/bin/lttng/commands/remove_trigger.cpp b/src/bin/lttng/commands/remove_trigger.cpp index 08d4873f0..81d9a7382 100644 --- a/src/bin/lttng/commands/remove_trigger.cpp +++ b/src/bin/lttng/commands/remove_trigger.cpp @@ -7,8 +7,8 @@ #include "../command.hpp" #include "common/argpar-utils/argpar-utils.hpp" -#include "common/argpar/argpar.h" #include "common/mi-lttng.hpp" +#include "vendor/argpar/argpar.h" #include diff --git a/src/bin/lttng/utils.hpp b/src/bin/lttng/utils.hpp index 7f398397a..15842b8bd 100644 --- a/src/bin/lttng/utils.hpp +++ b/src/bin/lttng/utils.hpp @@ -8,7 +8,6 @@ #ifndef _LTTNG_UTILS_H #define _LTTNG_UTILS_H -#include #include #include #include @@ -16,6 +15,8 @@ #include #include +#include + #include #include #include diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 2516a5042..499ffa9d8 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -19,13 +19,6 @@ noinst_HEADERS = \ utils.hpp -# libargpar -noinst_LTLIBRARIES += libargpar.la -libargpar_la_SOURCES = \ - argpar/argpar.c \ - argpar/argpar.h - - # libargpar-utils noinst_LTLIBRARIES += libargpar-utils.la libargpar_utils_la_SOURCES = \ diff --git a/src/common/argpar-utils/argpar-utils.hpp b/src/common/argpar-utils/argpar-utils.hpp index 4d25b3a70..00a387f57 100644 --- a/src/common/argpar-utils/argpar-utils.hpp +++ b/src/common/argpar-utils/argpar-utils.hpp @@ -8,10 +8,11 @@ #ifndef COMMON_ARGPAR_UTILS_H #define COMMON_ARGPAR_UTILS_H -#include #include #include +#include + #include #ifdef __cplusplus diff --git a/src/vendor/Makefile.am b/src/vendor/Makefile.am index e8b7a8159..c2626cc16 100644 --- a/src/vendor/Makefile.am +++ b/src/vendor/Makefile.am @@ -3,3 +3,11 @@ SUBDIRS = msgpack EXTRA_DIST = optional.hpp fmt nlohmann + +noinst_LTLIBRARIES = + +# libargpar +noinst_LTLIBRARIES += argpar/libargpar.la +argpar_libargpar_la_SOURCES = \ + argpar/argpar.c \ + argpar/argpar.h diff --git a/src/common/argpar/argpar.c b/src/vendor/argpar/argpar.c similarity index 100% rename from src/common/argpar/argpar.c rename to src/vendor/argpar/argpar.c diff --git a/src/common/argpar/argpar.h b/src/vendor/argpar/argpar.h similarity index 100% rename from src/common/argpar/argpar.h rename to src/vendor/argpar/argpar.h -- 2.39.5