aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/Makefile
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung.kim@lge.com>2012-09-28 05:32:02 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-10-02 17:36:22 -0400
commit1254b51e32649f2d34ec6b070ed36717c5a6b825 (patch)
treefd582d9f1b25e73ebc1e81da46af462451b27f0f /tools/perf/Makefile
parentf315e16850d00ae5b19f11810bc00bf68cf3c24a (diff)
perf tools: Convert to NEWT_SUPPORT
For building perf without libnewt, we can set NO_NEWT=1 as a argument of make. It then defines NO_NEWT_SUPPORT macro for C code to do the proper handling. However it usually used in a negative semantics - e.g. #ifndef - so we saw double negations which can be misleading. Convert it to a positive form to make it more readable. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: Ingo Molnar <mingo@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1348824728-14025-7-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/Makefile')
-rw-r--r--tools/perf/Makefile8
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 99b2bb371bcd..3d2181c57507 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -554,16 +554,14 @@ ifndef NO_LIBAUDIT
554 endif 554 endif
555endif 555endif
556 556
557ifdef NO_NEWT 557ifndef NO_NEWT
558 BASIC_CFLAGS += -DNO_NEWT_SUPPORT
559else
560 FLAGS_NEWT=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) -lnewt 558 FLAGS_NEWT=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) -lnewt
561 ifneq ($(call try-cc,$(SOURCE_NEWT),$(FLAGS_NEWT)),y) 559 ifneq ($(call try-cc,$(SOURCE_NEWT),$(FLAGS_NEWT)),y)
562 msg := $(warning newt not found, disables TUI support. Please install newt-devel or libnewt-dev); 560 msg := $(warning newt not found, disables TUI support. Please install newt-devel or libnewt-dev);
563 BASIC_CFLAGS += -DNO_NEWT_SUPPORT
564 else 561 else
565 # Fedora has /usr/include/slang/slang.h, but ubuntu /usr/include/slang.h 562 # Fedora has /usr/include/slang/slang.h, but ubuntu /usr/include/slang.h
566 BASIC_CFLAGS += -I/usr/include/slang 563 BASIC_CFLAGS += -I/usr/include/slang
564 BASIC_CFLAGS += -DNEWT_SUPPORT
567 EXTLIBS += -lnewt -lslang 565 EXTLIBS += -lnewt -lslang
568 LIB_OBJS += $(OUTPUT)ui/setup.o 566 LIB_OBJS += $(OUTPUT)ui/setup.o
569 LIB_OBJS += $(OUTPUT)ui/browser.o 567 LIB_OBJS += $(OUTPUT)ui/browser.o
@@ -603,7 +601,7 @@ else
603 LIB_OBJS += $(OUTPUT)ui/gtk/util.o 601 LIB_OBJS += $(OUTPUT)ui/gtk/util.o
604 LIB_OBJS += $(OUTPUT)ui/gtk/helpline.o 602 LIB_OBJS += $(OUTPUT)ui/gtk/helpline.o
605 # Make sure that it'd be included only once. 603 # Make sure that it'd be included only once.
606 ifneq ($(findstring -DNO_NEWT_SUPPORT,$(BASIC_CFLAGS)),) 604 ifeq ($(findstring -DNEWT_SUPPORT,$(BASIC_CFLAGS)),)
607 LIB_OBJS += $(OUTPUT)ui/setup.o 605 LIB_OBJS += $(OUTPUT)ui/setup.o
608 LIB_OBJS += $(OUTPUT)ui/util.o 606 LIB_OBJS += $(OUTPUT)ui/util.o
609 endif 607 endif