perf tools: Move libperl check config into config/Makefile
Moving libperl check config into config/Makefile. Signed-off-by: Jiri Olsa <jolsa@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1369398928-9809-12-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Родитель
58cabf6ab1
Коммит
3082cb339f
|
@ -530,23 +530,9 @@ ifndef NO_GTK2
|
||||||
LIB_OBJS += $(OUTPUT)ui/gtk/annotate.o
|
LIB_OBJS += $(OUTPUT)ui/gtk/annotate.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef NO_LIBPERL
|
ifndef NO_LIBPERL
|
||||||
BASIC_CFLAGS += -DNO_LIBPERL
|
LIB_OBJS += $(OUTPUT)util/scripting-engines/trace-event-perl.o
|
||||||
else
|
LIB_OBJS += $(OUTPUT)scripts/perl/Perf-Trace-Util/Context.o
|
||||||
PERL_EMBED_LDOPTS = $(shell perl -MExtUtils::Embed -e ldopts 2>/dev/null)
|
|
||||||
PERL_EMBED_LDFLAGS = $(call strip-libs,$(PERL_EMBED_LDOPTS))
|
|
||||||
PERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EMBED_LDOPTS))
|
|
||||||
PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts 2>/dev/null`
|
|
||||||
FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS)
|
|
||||||
|
|
||||||
ifneq ($(call try-cc,$(SOURCE_PERL_EMBED),$(FLAGS_PERL_EMBED),perl),y)
|
|
||||||
BASIC_CFLAGS += -DNO_LIBPERL
|
|
||||||
else
|
|
||||||
ALL_LDFLAGS += $(PERL_EMBED_LDFLAGS)
|
|
||||||
EXTLIBS += $(PERL_EMBED_LIBADD)
|
|
||||||
LIB_OBJS += $(OUTPUT)util/scripting-engines/trace-event-perl.o
|
|
||||||
LIB_OBJS += $(OUTPUT)scripts/perl/Perf-Trace-Util/Context.o
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
disable-python = $(eval $(disable-python_code))
|
disable-python = $(eval $(disable-python_code))
|
||||||
|
|
|
@ -240,3 +240,24 @@ ifndef NO_GTK2
|
||||||
EXTLIBS += $(shell pkg-config --libs gtk+-2.0 2>/dev/null)
|
EXTLIBS += $(shell pkg-config --libs gtk+-2.0 2>/dev/null)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
grep-libs = $(filter -l%,$(1))
|
||||||
|
strip-libs = $(filter-out -l%,$(1))
|
||||||
|
|
||||||
|
ifdef NO_LIBPERL
|
||||||
|
BASIC_CFLAGS += -DNO_LIBPERL
|
||||||
|
else
|
||||||
|
PERL_EMBED_LDOPTS = $(shell perl -MExtUtils::Embed -e ldopts 2>/dev/null)
|
||||||
|
PERL_EMBED_LDFLAGS = $(call strip-libs,$(PERL_EMBED_LDOPTS))
|
||||||
|
PERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EMBED_LDOPTS))
|
||||||
|
PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts 2>/dev/null`
|
||||||
|
FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS)
|
||||||
|
|
||||||
|
ifneq ($(call try-cc,$(SOURCE_PERL_EMBED),$(FLAGS_PERL_EMBED),perl),y)
|
||||||
|
BASIC_CFLAGS += -DNO_LIBPERL
|
||||||
|
NO_LIBPERL := 1
|
||||||
|
else
|
||||||
|
ALL_LDFLAGS += $(PERL_EMBED_LDFLAGS)
|
||||||
|
EXTLIBS += $(PERL_EMBED_LIBADD)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
Загрузка…
Ссылка в новой задаче