Currently make install_examples
does not install the examples in directory perf_examples. This patch fixes this. Signed-off-by: Robert Richter <robert.rich...@amd.com> --- Makefile | 5 +++-- config.mk | 2 +- examples/Makefile | 1 + perf_examples/Makefile | 2 ++ perf_examples/x86/Makefile | 8 ++++++++ 5 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index eb540f3..ec15385 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,8 @@ TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi) include config.mk -DIRS=lib examples perf_examples include docs +EXAMPLE_DIRS=examples perf_examples +DIRS=lib $(EXAMPLE_DIRS) include docs all: @echo Compiling for \'$(ARCH)\' target @@ -53,7 +54,7 @@ install: @set -e ; for d in $(DIRS) ; do $(MAKE) -C $$d $@ ; done install_examples: - $(MAKE) -C examples $@ + @set -e ; for d in $(EXAMPLE_DIRS) ; do $(MAKE) -C $$d $@ ; done .PHONY: all clean distclean depend tar tarcvs install install_examples lib diff --git a/config.mk b/config.mk index 052dc8a..b560977 100644 --- a/config.mk +++ b/config.mk @@ -84,7 +84,7 @@ PREFIX=$(install_prefix) LIBDIR=$(PREFIX)/lib INCDIR=$(PREFIX)/include MANDIR=$(PREFIX)/share/man -EXAMPLESDIR=$(PREFIX)/share/doc/libpfm-$(VERSION).$(REVISION).$(AGE)/examples +DOCDIR=$(PREFIX)/share/doc/libpfm-$(VERSION).$(REVISION).$(AGE) # # Configuration Paramaters for libpfm library diff --git a/examples/Makefile b/examples/Makefile index 5278928..0ac5581 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -38,6 +38,7 @@ LIBS += -lrt endif TARGETS=showevtinfo check_events +EXAMPLESDIR=$(DOCDIR)/examples all: $(TARGETS) @set -e ; for d in $(DIRS) ; do $(MAKE) -C $$d $@ ; done diff --git a/perf_examples/Makefile b/perf_examples/Makefile index bc5f9ab..c773413 100644 --- a/perf_examples/Makefile +++ b/perf_examples/Makefile @@ -61,6 +61,8 @@ TARGET_LINUX +=self self_basic self_count task task_attach_timeout syst \ XTRA += rtop endif +EXAMPLESDIR=$(DOCDIR)/perf_examples + all: $(TARGET_GEN) $(TARGET_LINUX) $(XTRA) @set -e ; for d in $(DIRS) ; do $(MAKE) -C $$d $@ ; done # Many systems don't have ncurses installed diff --git a/perf_examples/x86/Makefile b/perf_examples/x86/Makefile index 62ba56d..a469a00 100644 --- a/perf_examples/x86/Makefile +++ b/perf_examples/x86/Makefile @@ -39,6 +39,8 @@ LPC_UTILS=../perf_util.o TARGETS += bts_smpl pebs_smpl endif +EXAMPLESDIR=$(DOCDIR)/perf_examples/x86 + all: $(TARGETS) $(TARGETS): %:%.o $(LPC_UTILS) $(PFMLIB) @@ -49,4 +51,10 @@ clean: distclean: clean +install_examples: $(TARGETS) + @echo installing: $(TARGETS) + -mkdir -p $(DESTDIR)$(EXAMPLESDIR) + $(INSTALL) -m 755 $(TARGETS) $(TARGET_GEN) $(DESTDIR)$(EXAMPLESDIR) + @set -e ; for d in $(DIRS) ; do $(MAKE) -C $$d $@ ; done + .PHONY: install depend install_examples -- 1.7.0.3 ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ perfmon2-devel mailing list perfmon2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perfmon2-devel