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 e53f02f..635b7f5 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 python +EXAMPLE_DIRS=examples perf_examples +DIRS=lib $(EXAMPLE_DIRS) include docs python 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 5b7d7d7..8147ed1 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 07c33b7..1949d5a 100644 --- a/perf_examples/Makefile +++ b/perf_examples/Makefile @@ -61,6 +61,8 @@ TARGETS+=self self_basic self_count task task_attach_timeout syst \ XTRA += rtop endif +EXAMPLESDIR=$(DOCDIR)/perf_examples + all: $(TARGETS) $(XTRA) @set -e ; for d in $(DIRS) ; do $(MAKE) -C $$d $@ ; done # diff --git a/perf_examples/x86/Makefile b/perf_examples/x86/Makefile index 1d1f602..7a0e805 100644 --- a/perf_examples/x86/Makefile +++ b/perf_examples/x86/Makefile @@ -39,6 +39,8 @@ LPC_UTILS=../perf_util.o TARGETS += bts_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.1 ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ perfmon2-devel mailing list perfmon2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perfmon2-devel