diff options
author | Namhyung Kim <namhyung.kim@lge.com> | 2012-09-28 05:32:03 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-10-02 17:36:23 -0400 |
commit | f9f526ecdc09a851f4f5567ebcf9bc553778f6c2 (patch) | |
tree | 1ddf1f736e35b7a130819ad5a49b0fc937728603 /tools/perf/Makefile | |
parent | 1254b51e32649f2d34ec6b070ed36717c5a6b825 (diff) |
perf tools: Convert to GTK2_SUPPORT
For building perf without gtk+2, we can set NO_GTK2=1 as a argument of
make. It then defines NO_GTK2_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-8-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/Makefile | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 3d2181c57507..31a07f95fd98 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
@@ -583,17 +583,15 @@ ifndef NO_NEWT | |||
583 | endif | 583 | endif |
584 | endif | 584 | endif |
585 | 585 | ||
586 | ifdef NO_GTK2 | 586 | ifndef NO_GTK2 |
587 | BASIC_CFLAGS += -DNO_GTK2_SUPPORT | ||
588 | else | ||
589 | FLAGS_GTK2=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null) | 587 | FLAGS_GTK2=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null) |
590 | ifneq ($(call try-cc,$(SOURCE_GTK2),$(FLAGS_GTK2)),y) | 588 | ifneq ($(call try-cc,$(SOURCE_GTK2),$(FLAGS_GTK2)),y) |
591 | msg := $(warning GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev); | 589 | msg := $(warning GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev); |
592 | BASIC_CFLAGS += -DNO_GTK2_SUPPORT | ||
593 | else | 590 | else |
594 | ifeq ($(call try-cc,$(SOURCE_GTK2_INFOBAR),$(FLAGS_GTK2)),y) | 591 | ifeq ($(call try-cc,$(SOURCE_GTK2_INFOBAR),$(FLAGS_GTK2)),y) |
595 | BASIC_CFLAGS += -DHAVE_GTK_INFO_BAR | 592 | BASIC_CFLAGS += -DHAVE_GTK_INFO_BAR |
596 | endif | 593 | endif |
594 | BASIC_CFLAGS += -DGTK2_SUPPORT | ||
597 | BASIC_CFLAGS += $(shell pkg-config --cflags gtk+-2.0 2>/dev/null) | 595 | BASIC_CFLAGS += $(shell pkg-config --cflags gtk+-2.0 2>/dev/null) |
598 | EXTLIBS += $(shell pkg-config --libs gtk+-2.0 2>/dev/null) | 596 | EXTLIBS += $(shell pkg-config --libs gtk+-2.0 2>/dev/null) |
599 | LIB_OBJS += $(OUTPUT)ui/gtk/browser.o | 597 | LIB_OBJS += $(OUTPUT)ui/gtk/browser.o |