aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/setup.py
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@gmail.com>2012-02-12 19:45:24 +0900
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-02-13 18:01:25 -0200
commit6a5c13aff49ac9b3fea38d5f84b436718cb2780d (patch)
treee8b5a7ab074499663f66f09a5fcbff45be5a6c97 /tools/perf/util/setup.py
parentperf record: No build id option fails (diff)
downloadlinux-dev-6a5c13aff49ac9b3fea38d5f84b436718cb2780d.tar.xz
linux-dev-6a5c13aff49ac9b3fea38d5f84b436718cb2780d.zip
perf tools: Fix build dependency of perf python extension
The perf python extention (perf.so) file lacks its dependencies in the Makefile so that it cannot be refreshed if one of source files it depends is changed. Fix it by putting them in a separate file and processing it in both of Makefile and setup.py. Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/1329043524-12470-1-git-send-email-namhyung@gmail.com Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/setup.py')
-rw-r--r--tools/perf/util/setup.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/perf/util/setup.py b/tools/perf/util/setup.py
index 36d4c5619575..d0f9f29cf181 100644
--- a/tools/perf/util/setup.py
+++ b/tools/perf/util/setup.py
@@ -24,11 +24,11 @@ cflags += getenv('CFLAGS', '').split()
build_lib = getenv('PYTHON_EXTBUILD_LIB')
build_tmp = getenv('PYTHON_EXTBUILD_TMP')
+ext_sources = [f.strip() for f in file('util/python-ext-sources')
+ if len(f.strip()) > 0 and f[0] != '#']
+
perf = Extension('perf',
- sources = ['util/python.c', 'util/ctype.c', 'util/evlist.c',
- 'util/evsel.c', 'util/cpumap.c', 'util/thread_map.c',
- 'util/util.c', 'util/xyarray.c', 'util/cgroup.c',
- 'util/debugfs.c'],
+ sources = ext_sources,
include_dirs = ['util/include'],
extra_compile_args = cflags,
)