perf: silence GTK2 probing errors
authorDavid Ahern <dsahern@gmail.com>
Sun, 19 Aug 2012 15:46:42 +0000 (09:46 -0600)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 20 Aug 2012 12:33:29 +0000 (09:33 -0300)
If GTK2 development packages are not installed, make is rather noisy:

  $ make -C tools/perf O=/tmp/pbuild
  Package gtk+-2.0 was not found in the pkg-config search path.
  Perhaps you should add the directory containing `gtk+-2.0.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'gtk+-2.0' found
  make: Entering directory `/opt/sw/ahern/perf.git/tools/perf'
  Makefile:593: GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev
  PERF_VERSION = 3.6.rc1.205.gdb146f.dirty
  make: Leaving directory `/opt/sw/ahern/perf.git/tools/perf'
  Package gtk+-2.0 was not found in the pkg-config search path.
  Perhaps you should add the directory containing `gtk+-2.0.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'gtk+-2.0' found
  make: Entering directory `/opt/sw/ahern/perf.git/tools/perf'
  Makefile:593: GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev
  ...

Silence the pkg-config errors. Aftewards:

  $ make -C tools/perf O=/tmp/pbuild
  make: Entering directory `/opt/sw/ahern/perf.git/tools/perf'
  Makefile:593: GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev
  PERF_VERSION = 3.6.rc1.206.gd43ff9.dirty
  make: Leaving directory `/opt/sw/ahern/perf.git/tools/perf'
  make: Entering directory `/opt/sw/ahern/perf.git/tools/perf'
  Makefile:593: GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev
  ...

Signed-off-by: David Ahern <dsahern@gmail.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Pekka Enberg <penberg@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Pekka Enberg <penberg@kernel.org>
Link: http://lkml.kernel.org/r/1345391202-71865-1-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/Makefile

index 75af93dc52ad9d9c9e0ad90706b98c36aed43db9..8beff9944f44326b12321d85a17008a9dbe027fd 100644 (file)
@@ -587,7 +587,7 @@ endif
 ifdef NO_GTK2
        BASIC_CFLAGS += -DNO_GTK2_SUPPORT
 else
-       FLAGS_GTK2=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) $(shell pkg-config --libs --cflags gtk+-2.0)
+       FLAGS_GTK2=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null)
        ifneq ($(call try-cc,$(SOURCE_GTK2),$(FLAGS_GTK2)),y)
                msg := $(warning GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev);
                BASIC_CFLAGS += -DNO_GTK2_SUPPORT
@@ -595,8 +595,8 @@ else
                ifeq ($(call try-cc,$(SOURCE_GTK2_INFOBAR),$(FLAGS_GTK2)),y)
                        BASIC_CFLAGS += -DHAVE_GTK_INFO_BAR
                endif
-               BASIC_CFLAGS += $(shell pkg-config --cflags gtk+-2.0)
-               EXTLIBS += $(shell pkg-config --libs gtk+-2.0)
+               BASIC_CFLAGS += $(shell pkg-config --cflags gtk+-2.0 2>/dev/null)
+               EXTLIBS += $(shell pkg-config --libs gtk+-2.0 2>/dev/null)
                LIB_OBJS += $(OUTPUT)ui/gtk/browser.o
                LIB_OBJS += $(OUTPUT)ui/gtk/setup.o
                LIB_OBJS += $(OUTPUT)ui/gtk/util.o