alistair23-linux/tools
Michael Witten ced465c400 perf tools: Makefile: PYTHON{,_CONFIG} to bandage Python 3 incompatibility
Currently, Python 3 is not supported by perf's code; this
can cause the build to fail for systems that have Python 3
installed as the default python:

  python{,-config}

The Correct Solution is to write compatibility code so that
Python 3 works out-of-the-box.

However, users often have an ancillary Python 2 installed:

  python2{,-config}

Therefore, a quick fix is to allow the user to specify those
ancillary paths as the python binaries that Makefile should
use, thereby avoiding Python 3 altogether; as an added benefit,
the Python binaries may be installed in non-standard locations
without the need for updating any PATH variable.

This commit adds the ability to set PYTHON and/or PYTHON_CONFIG
either as environment variables or as make variables on the
command line; the paths may be relative, and usually only PYTHON
is necessary in order for PYTHON_CONFIG to be defined implicitly.
Some rudimentary error checking is performed when the user
explicitly specifies a value for any of these variables.

In addition, this commit introduces significantly robust makefile
infrastructure for working with paths and communicating with the
shell; it's currently only used for handling Python, but I hope
it will prove useful in refactoring the makefiles.

Thanks to:

  Raghavendra D Prabhu <rprabhu@wnohang.net>

for motivating this patch.

Acked-by: Raghavendra D Prabhu <rprabhu@wnohang.net>
Link: http://lkml.kernel.org/r/e987828e-87ec-4973-95e7-47f10f5d9bab-mfwitten@gmail.com
Signed-off-by: Michael Witten <mfwitten@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2011-04-19 08:18:36 -03:00
..
firewire tools/firewire: nosy-dump: increment program version 2010-07-27 11:04:12 +02:00
perf perf tools: Makefile: PYTHON{,_CONFIG} to bandage Python 3 incompatibility 2011-04-19 08:18:36 -03:00
power/x86 Fix common misspellings 2011-03-31 11:26:23 -03:00
slub slub: move slabinfo.c to tools/slub/slabinfo.c 2010-11-06 09:04:32 +02:00
testing/ktest Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-ktest 2011-03-21 14:13:48 -07:00
usb USB: ffs-test: fix header path 2011-02-28 19:27:12 -08:00
virtio tools/virtio: virtio_test tool 2010-12-09 16:00:22 +02:00