From: Alexis Berlemont <alexis.berlemont@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Alexis Berlemont <alexis.berlemont@gmail.com>, jolsa@redhat.com
Subject: [PATCH v2 12/14] perf kbuild: remove legacy script-related build variables
Date: Thu, 23 Oct 2014 23:56:10 +0200 [thread overview]
Message-ID: <1414101372-14443-13-git-send-email-alexis.berlemont@gmail.com> (raw)
In-Reply-To: <1414101372-14443-1-git-send-email-alexis.berlemont@gmail.com>
In-Reply-To: <54216F39.9030902@suse.cz>
Remove NO_LIBPERL (replaced by CONFIG_LIBPERL)
Remove NO_LIBPYTHON (replaced by CONFIG_LIBPYTHON)
Signed-off-by: Alexis Berlemont <alexis.berlemont@gmail.com>
---
tools/perf/builtin-script.c | 6 +++--
tools/perf/config/Makefile | 41 +++++++++------------------------
tools/perf/config/Makefile.fix-config | 16 -------------
tools/perf/config/Makefile.fix-legacy | 8 -------
tools/perf/util/trace-event-scripting.c | 13 ++++++-----
5 files changed, 22 insertions(+), 62 deletions(-)
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 9708a12..cc9c305 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -1,3 +1,5 @@
+#include "generated/autoconf.h"
+
#include "builtin.h"
#include "perf.h"
@@ -1372,11 +1374,11 @@ int find_scripts(char **scripts_array, char **scripts_path_array)
for_each_lang(scripts_path, scripts_dir, lang_dirent, lang_next) {
snprintf(lang_path, MAXPATHLEN, "%s/%s", scripts_path,
lang_dirent.d_name);
-#ifdef NO_LIBPERL
+#ifndef CONFIG_LIBPERL
if (strstr(lang_path, "perl"))
continue;
#endif
-#ifdef NO_LIBPYTHON
+#ifndef CONFIG_LIBPYTHON
if (strstr(lang_path, "python"))
continue;
#endif
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index f667229..00d118c 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -101,7 +101,7 @@ ifdef PARSER_DEBUG
CFLAGS += -DPARSER_DEBUG
endif
-ifndef NO_LIBPYTHON
+ifdef CONFIG_LIBPYTHON
# Try different combinations to accommodate systems that only have
# python[2][-config] in weird combinations but always preferring
# python2 and python2-config as per pep-0394. If we catch a
@@ -460,9 +460,7 @@ endif
grep-libs = $(filter -l%,$(1))
strip-libs = $(filter-out -l%,$(1))
-ifdef NO_LIBPERL
- CFLAGS += -DNO_LIBPERL
-else
+ifdef CONFIG_LIBPERL
PERL_EMBED_LDOPTS = $(shell perl -MExtUtils::Embed -e ldopts 2>/dev/null)
PERL_EMBED_LDFLAGS = $(call strip-libs,$(PERL_EMBED_LDOPTS))
PERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EMBED_LDOPTS))
@@ -470,9 +468,8 @@ else
FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS)
ifneq ($(feature-libperl), 1)
- CFLAGS += -DNO_LIBPERL
- NO_LIBPERL := 1
msg := $(warning Missing perl devel files. Disabling perl scripting support, consider installing perl-ExtUtils-Embed);
+ $(shell $(KCONFIG_SCRIPT) -d CONFIG_LIBPERL)
else
LDFLAGS += $(PERL_EMBED_LDFLAGS)
EXTLIBS += $(PERL_EMBED_LIBADD)
@@ -486,17 +483,14 @@ ifdef CONFIG_TIMERFD
endif
endif
-disable-python = $(eval $(disable-python_code))
-define disable-python_code
- CFLAGS += -DNO_LIBPYTHON
- $(if $(1),$(warning No $(1) was found))
- $(warning Python support will not be built)
- NO_LIBPYTHON := 1
-endef
+ifdef CONFIG_LIBPYTHON
-ifdef NO_LIBPYTHON
- $(call disable-python)
-else
+ disable-python = $(eval $(disable-python_code))
+ define disable-python_code
+ $(if $(1),$(warning No $(1) was found))
+ $(warning Python support will not be built)
+ $(shell $(KCONFIG_SCRIPT) -d CONFIG_LIBPYTHON)
+ endef
ifndef PYTHON
$(call disable-python,python interpreter)
@@ -520,18 +514,7 @@ else
else
ifneq ($(feature-libpython-version), 1)
- $(warning Python 3 is not yet supported; please set)
- $(warning PYTHON and/or PYTHON_CONFIG appropriately.)
- $(warning If you also have Python 2 installed, then)
- $(warning try something like:)
- $(warning $(and ,))
- $(warning $(and ,) make PYTHON=python2)
- $(warning $(and ,))
- $(warning Otherwise, disable Python support entirely:)
- $(warning $(and ,))
- $(warning $(and ,) make NO_LIBPYTHON=1)
- $(warning $(and ,))
- $(error $(and ,))
+ $(call disable-python,python2 interpreter)
else
LDFLAGS += $(PYTHON_EMBED_LDFLAGS)
EXTLIBS += $(PYTHON_EMBED_LIBADD)
@@ -781,8 +764,6 @@ all:
$(call store,PYTHON_EMBED_CCOPTS)
$(call store,PERL_EMBED_CCOPTS)
$(call store,NO_LIBUNWIND)
- $(call store,NO_LIBPERL)
- $(call store,NO_LIBPYTHON)
$(call store,ETC_PERFCONFIG_SQ)
$(call store,DESTDIR_SQ)
$(call store,bindir_SQ)
diff --git a/tools/perf/config/Makefile.fix-config b/tools/perf/config/Makefile.fix-config
index e63539f..3f0e33e 100644
--- a/tools/perf/config/Makefile.fix-config
+++ b/tools/perf/config/Makefile.fix-config
@@ -3,20 +3,4 @@ include $(KCONFIG_CONFIG)
CONFIG := $(srctree)/scripts/config --file $(KCONFIG_CONFIG)
-# NO_LIBPERL
-ifdef CONFIG_LIBPERL
-ifdef NO_LIBPERL
-dummy := $(info Disabling CONFIG_LIBPERL)
-dummy := $(shell $(CONFIG) -d CONFIG_LIBPERL)
-endif
-endif
-
-# NO_LIBPYTHON
-ifdef CONFIG_LIBPYTHON
-ifdef NO_LIBPYTHON
-dummy := $(info Disabling CONFIG_LIBPYTHON)
-dummy := $(shell $(CONFIG) -d CONFIG_LIBPYTHON)
-endif
-endif
-
all:
diff --git a/tools/perf/config/Makefile.fix-legacy b/tools/perf/config/Makefile.fix-legacy
index 20a4062..431c9bf 100644
--- a/tools/perf/config/Makefile.fix-legacy
+++ b/tools/perf/config/Makefile.fix-legacy
@@ -1,10 +1,2 @@
include $(KCONFIG_CONFIG)
-
-ifndef CONFIG_LIBPERL
-NO_LIBPERL := 1
-endif
-
-ifndef CONFIG_LIBPYTHON
-NO_LIBPYTHON := 1
-endif
diff --git a/tools/perf/util/trace-event-scripting.c b/tools/perf/util/trace-event-scripting.c
index 5c9bdd1..a8319bb 100644
--- a/tools/perf/util/trace-event-scripting.c
+++ b/tools/perf/util/trace-event-scripting.c
@@ -24,6 +24,7 @@
#include <string.h>
#include <errno.h>
+#include "generated/autoconf.h"
#include "../perf.h"
#include "util.h"
#include "trace-event.h"
@@ -99,7 +100,7 @@ static void register_python_scripting(struct scripting_ops *scripting_ops)
scripting_context = malloc(sizeof(struct scripting_context));
}
-#ifdef NO_LIBPYTHON
+#ifndef CONFIG_LIBPYTHON
void setup_python_scripting(void)
{
register_python_scripting(&python_scripting_unsupported_ops);
@@ -163,16 +164,16 @@ static void register_perl_scripting(struct scripting_ops *scripting_ops)
scripting_context = malloc(sizeof(struct scripting_context));
}
-#ifdef NO_LIBPERL
+#ifdef CONFIG_LIBPERL
+extern struct scripting_ops perl_scripting_ops;
+
void setup_perl_scripting(void)
{
- register_perl_scripting(&perl_scripting_unsupported_ops);
+ register_perl_scripting(&perl_scripting_ops);
}
#else
-extern struct scripting_ops perl_scripting_ops;
-
void setup_perl_scripting(void)
{
- register_perl_scripting(&perl_scripting_ops);
+ register_perl_scripting(&perl_scripting_unsupported_ops);
}
#endif
--
2.1.1
next prev parent reply other threads:[~2014-10-23 22:00 UTC|newest]
Thread overview: 76+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-22 21:53 [PATCH 00/15] Kbuild for perf Alexis Berlemont
2014-09-22 21:53 ` [PATCH 01/15] kbuild: add support of custom paths for "auto.conf*" files Alexis Berlemont
2014-09-23 13:01 ` Michal Marek
2014-10-23 21:47 ` Alexis Berlemont
2014-10-23 21:55 ` [PATCH v2 00/14] Kbuild for perf Alexis Berlemont
2014-10-23 22:28 ` [PATCH v3 " Alexis Berlemont
2014-10-23 23:48 ` Arnaldo Carvalho de Melo
2014-10-24 12:39 ` Alexis Berlemont
2014-10-24 12:46 ` Arnaldo Carvalho de Melo
2014-10-25 22:20 ` [PATCH v4 " Alexis Berlemont
2014-10-27 22:37 ` Jiri Olsa
2014-10-28 23:54 ` Alexis Berlemont
2014-10-25 22:20 ` [PATCH v4 01/14] kbuild: add support of custom paths for "auto.conf*" files Alexis Berlemont
2014-10-25 22:20 ` [PATCH v4 02/14] perf tools: Kbuild builtin source related fixies Alexis Berlemont
2014-10-25 22:20 ` [PATCH v4 03/14] perf tools: Kbuild " Alexis Berlemont
2014-10-25 22:20 ` [PATCH v4 04/14] perf tools: Add kbuild support into Makefile.kbuild Alexis Berlemont
2014-10-29 8:16 ` Jiri Olsa
2014-10-29 23:05 ` Alexis Berlemont
2014-10-31 8:34 ` Jiri Olsa
2014-10-25 22:20 ` [PATCH v4 05/14] perf kbuild: remove Makefile.perf Alexis Berlemont
2014-10-25 22:20 ` [PATCH v4 06/14] perf kbuild: remove legacy tui/gui-related build variables Alexis Berlemont
2014-10-25 22:20 ` [PATCH v4 07/14] perf kbuild: remove legacy demangle-related " Alexis Berlemont
2014-10-25 22:20 ` [PATCH v4 08/14] perf kbuild: cross-compilation variables are now handled in Kconfig Alexis Berlemont
2014-10-25 22:20 ` [PATCH v4 09/14] perf kbuild: remove legacy misc build variables Alexis Berlemont
2014-10-25 22:20 ` [PATCH v4 10/14] perf kbuild: remove legacy libelf-related " Alexis Berlemont
2014-10-25 22:20 ` [PATCH v4 11/14] perf kbuild: remove legacy libdwarf-related " Alexis Berlemont
2014-10-25 22:20 ` [PATCH v4 12/14] perf kbuild: remove legacy script-related " Alexis Berlemont
2014-10-25 22:20 ` [PATCH v4 13/14] perf kbuild: final cosmetic changes Alexis Berlemont
2014-10-25 22:20 ` [PATCH v4 14/14] perf kbuild: add generated Kconfig build-test cases Alexis Berlemont
2014-10-23 22:28 ` [PATCH v3 01/14] kbuild: add support of custom paths for "auto.conf*" files Alexis Berlemont
2014-10-23 22:28 ` [PATCH v3 02/14] perf tools: Kbuild builtin source related fixies Alexis Berlemont
2014-10-23 22:28 ` [PATCH v3 03/14] perf tools: Kbuild " Alexis Berlemont
2014-10-23 22:28 ` [PATCH v3 04/14] perf tools: Add kbuild support into Makefile.kbuild Alexis Berlemont
2014-10-23 22:28 ` [PATCH v3 05/14] perf kbuild: remove Makefile.perf Alexis Berlemont
2014-10-23 22:28 ` [PATCH v3 06/14] perf kbuild: remove legacy tui/gui-related build variables Alexis Berlemont
2014-10-23 22:28 ` [PATCH v3 07/14] perf kbuild: remove legacy demangle-related " Alexis Berlemont
2014-10-23 22:28 ` [PATCH v3 08/14] perf kbuild: cross-compilation variables are now handled in Kconfig Alexis Berlemont
2014-10-23 22:28 ` [PATCH v3 09/14] perf kbuild: remove legacy misc build variables Alexis Berlemont
2014-10-23 22:28 ` [PATCH v3 10/14] perf kbuild: remove legacy libelf-related " Alexis Berlemont
2014-10-23 22:28 ` [PATCH v3 11/14] perf kbuild: remove legacy libdwarf-related " Alexis Berlemont
2014-10-23 22:28 ` [PATCH v3 12/14] perf kbuild: remove legacy script-related " Alexis Berlemont
2014-10-23 22:28 ` [PATCH v3 13/14] perf kbuild: final cosmetic changes Alexis Berlemont
2014-10-23 22:28 ` [PATCH v3 14/14] perf kbuild: add generated Kconfig build-test cases Alexis Berlemont
2015-05-31 19:22 ` Ulf Magnusson
2014-10-23 21:55 ` [PATCH v2 01/14] kbuild: add support of custom paths for "auto.conf*" files Alexis Berlemont
2014-10-23 21:56 ` [PATCH v2 02/14] perf tools: Kbuild builtin source related fixies Alexis Berlemont
2014-10-23 21:56 ` [PATCH v2 03/14] perf tools: Kbuild " Alexis Berlemont
2014-10-23 21:56 ` [PATCH v2 04/14] perf tools: Add kbuild support into Makefile.kbuild Alexis Berlemont
2014-10-23 21:56 ` [PATCH v2 05/14] perf kbuild: remove Makefile.perf Alexis Berlemont
2014-10-23 21:56 ` [PATCH v2 06/14] perf kbuild: remove legacy tui/gui-related build variables Alexis Berlemont
2014-10-23 21:56 ` [PATCH v2 07/14] perf kbuild: remove legacy demangle-related " Alexis Berlemont
2014-10-23 21:56 ` [PATCH v2 08/14] perf kbuild: cross-compilation variables are now handled in Kconfig Alexis Berlemont
2014-10-23 21:56 ` [PATCH v2 09/14] perf kbuild: remove legacy misc build variables Alexis Berlemont
2014-10-23 21:56 ` [PATCH v2 10/14] perf kbuild: remove legacy libelf-related " Alexis Berlemont
2014-10-23 21:56 ` [PATCH v2 11/14] perf kbuild: remove legacy libdwarf-related " Alexis Berlemont
2014-10-23 21:56 ` Alexis Berlemont [this message]
2014-10-23 21:56 ` [PATCH v2 13/14] perf kbuild: final cosmetic changes Alexis Berlemont
2014-10-23 21:56 ` [PATCH v2 14/14] perf kbuild: add generated Kconfig build-test cases Alexis Berlemont
2014-09-23 13:13 ` [PATCH 01/15] kbuild: add support of custom paths for "auto.conf*" files Michal Marek
2014-10-23 21:44 ` Alexis Berlemont
2014-09-22 21:53 ` [PATCH 02/15] perf tools: Kbuild builtin source related fixies Alexis Berlemont
2014-09-22 21:53 ` [PATCH 03/15] perf tools: Kbuild " Alexis Berlemont
2014-09-22 21:53 ` [PATCH 04/15] perf tools: Add kbuild support into Makefile.kbuild Alexis Berlemont
2014-09-22 21:53 ` [PATCH 05/15] perf kbuild: remove Makefile.perf Alexis Berlemont
2014-09-22 21:53 ` [PATCH 06/15] perf kbuild: remove legacy tui/gui-related build variables Alexis Berlemont
2014-09-22 21:53 ` [PATCH 07/15] perf kbuild: remove legacy demangle-related " Alexis Berlemont
2014-09-22 21:53 ` [PATCH 08/15] perf kbuild: cross-compilation variables are now handled in Kconfig Alexis Berlemont
2014-09-22 21:53 ` [PATCH 09/15] perf kbuild: remove legacy misc build variables Alexis Berlemont
2014-09-22 21:53 ` [PATCH 10/15] perf kbuild: remove legacy libelf-related " Alexis Berlemont
2014-09-22 21:53 ` [PATCH 11/15] perf kbuild: remove legacy libdwarf-related " Alexis Berlemont
2014-09-22 21:53 ` [PATCH 12/15] perf kbuild: remove legacy script-related " Alexis Berlemont
2014-09-22 21:53 ` [PATCH 13/15] perf kbuild: final cosmetic changes Alexis Berlemont
2014-09-22 21:53 ` [PATCH 14/15] perf kbuild: add generated Kconfig build-test cases Alexis Berlemont
2014-09-22 21:53 ` [PATCH 15/15] perf: replace _BSD_SOURCE macro by _DEFAULT_SOURCE Alexis Berlemont
2014-09-28 22:15 ` Aaro Koskinen
2014-10-23 21:52 ` Alexis Berlemont
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1414101372-14443-13-git-send-email-alexis.berlemont@gmail.com \
--to=alexis.berlemont@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®