Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 90ce61b9 authored by Jin Yao's avatar Jin Yao Committed by Arnaldo Carvalho de Melo
Browse files

perf script: Use HAVE_LIBXXX_SUPPORT to replace NO_LIBXXX



In Makefile.config, we define the conditional compilation variables
HAVE_LIBPERL_SUPPORT and HAVE_LIBPYTHON_SUPPORT.

To make the C code more consistent, this patch replaces
NO_LIBPERL/NO_LIBPYTHON in C code with HAVE_LIBPERL_SUPPORT/
HAVE_LIBPYTHON_SUPPORT.

Signed-off-by: default avatarJin Yao <yao.jin@linux.intel.com>
Suggested-by: default avatarIngo Molnar <mingo@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1523269609-28824-2-git-send-email-yao.jin@linux.intel.com


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent fd97d39b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2801,11 +2801,11 @@ int find_scripts(char **scripts_array, char **scripts_path_array)
	for_each_lang(scripts_path, scripts_dir, lang_dirent) {
		scnprintf(lang_path, MAXPATHLEN, "%s/%s", scripts_path,
			  lang_dirent->d_name);
#ifdef NO_LIBPERL
#ifndef HAVE_LIBPERL_SUPPORT
		if (strstr(lang_path, "perl"))
			continue;
#endif
#ifdef NO_LIBPYTHON
#ifndef HAVE_LIBPYTHON_SUPPORT
		if (strstr(lang_path, "python"))
			continue;
#endif
+2 −2
Original line number Diff line number Diff line
@@ -98,7 +98,7 @@ static void register_python_scripting(struct scripting_ops *scripting_ops)
	}
}

#ifdef NO_LIBPYTHON
#ifndef HAVE_LIBPYTHON_SUPPORT
void setup_python_scripting(void)
{
	register_python_scripting(&python_scripting_unsupported_ops);
@@ -161,7 +161,7 @@ static void register_perl_scripting(struct scripting_ops *scripting_ops)
	}
}

#ifdef NO_LIBPERL
#ifndef HAVE_LIBPERL_SUPPORT
void setup_perl_scripting(void)
{
	register_perl_scripting(&perl_scripting_unsupported_ops);