tools/perf/build: Pass through DEBUG parameter
authorIngo Molnar <[email protected]>
Thu, 10 Oct 2013 06:05:25 +0000 (08:05 +0200)
committerArnaldo Carvalho de Melo <[email protected]>
Mon, 14 Oct 2013 13:29:07 +0000 (10:29 -0300)
commitfcf92585014f0a0e390d2819de8278ae90da5842
tree2bc7eb7876b8d5d79959bb078cde774ccc428e94
parent3fb66335e13ef7426affe9efa48c08857202c1cb
tools/perf/build: Pass through DEBUG parameter

Arnaldo reported that 'make DEBUG=1' does not work anymore.

The reason is that 'Makefile' only passes it through to
'Makefile.perf' via the environment, but 'Makefile.perf'
checks that it's a command line option:

    ifeq ("$(origin DEBUG)", "command line")
      PERF_DEBUG = $(DEBUG)
    endif

So pass it through properly, and also clean up DEBUG parameter
handling while at it and fix a couple of annoyances:

 - DEBUG=0 used to be interpreted as 'debugging on'. Turn it
   into 'debugging off' instead.

 - Same was the case for 'DEBUG=' - turn that into debug-off
   as well.

 - Pass in just a clean, sanitized 'DEBUG' value and get rid of
   the intermediate, unnecessary PERF_DEBUG variable.

Reported-by: Arnaldo Carvalho de Melo <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Jiri Olsa <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/Makefile
tools/perf/config/Makefile