This patch adds rules to install Perfmon2 examples. These are required
for systems with a Perfmon2 kernel only. The target directory is:

 /usr/share/doc/libpfm-3.7.0/examples/v2/

Signed-off-by: Robert Richter <[email protected]>
---
 Makefile                   |   10 +++++++---
 examples_v2.x/Makefile     |    4 ++--
 examples_v2.x/x86/Makefile |    4 ++--
 3 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/Makefile b/Makefile
index ac477ae..8b0e94e 100644
--- a/Makefile
+++ b/Makefile
@@ -27,10 +27,12 @@ TOPDIR  := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; 
else pwd; fi)
 
 include config.mk
 
-DIRS=lib examples_v2.x include docs
+DIRS=lib include docs
+
+EXAMPLES_DIRS = examples_v2.x
 
 ifneq ($(CONFIG_PFMLIB_OLD_PFMV2),y)
-DIRS += examples
+EXAMPLES_DIRS += examples
 endif
 
 ifeq ($(ARCH),ia64)
@@ -41,6 +43,8 @@ ifeq ($(SYS),Linux)
 DIRS +=libpfms
 endif
 
+DIRS += $(EXAMPLES_DIRS)
+
 all: 
        @echo Compiling for \'$(ARCH)\' target
        @set -e ; for d in $(DIRS) ; do $(MAKE) -C $$d $@ ; done
@@ -65,7 +69,7 @@ install:
        @set -e ; for d in $(DIRS) ; do $(MAKE) -C $$d $@ ; done
 
 install_examples:
-       $(MAKE) -C examples $@
+       @set -e ; for d in $(EXAMPLES_DIRS) ; do $(MAKE) -C $$d $@ ; done
 
 .PHONY: tar tarcvs lib
 
diff --git a/examples_v2.x/Makefile b/examples_v2.x/Makefile
index c1cb3bf..e91d98c 100644
--- a/examples_v2.x/Makefile
+++ b/examples_v2.x/Makefile
@@ -85,8 +85,8 @@ install_examples: $(TARGET_LINUX) $(TARGET_GEN)
 
 install_examples:
        @echo installing: $(TARGET_LINUX) $(TARGET_GEN)
-       -mkdir -p $(DESTDIR)$(EXAMPLESDIR)
-       $(INSTALL) -m 755 $(TARGET_LINUX) $(TARGET_GEN) $(DESTDIR)$(EXAMPLESDIR)
+       -mkdir -p $(DESTDIR)$(EXAMPLESDIR)/v2
+       $(INSTALL) -m 755 $(TARGET_LINUX) $(TARGET_GEN) 
$(DESTDIR)$(EXAMPLESDIR)/v2
        @set -e ; for d in $(DIRS) ; do $(MAKE) -C $$d $@ ; done
 #
 # examples are installed as part of the RPM install, typically in 
/usr/share/doc/libpfm-X.Y/
diff --git a/examples_v2.x/x86/Makefile b/examples_v2.x/x86/Makefile
index d0ef7b2..9ec7fd3 100644
--- a/examples_v2.x/x86/Makefile
+++ b/examples_v2.x/x86/Makefile
@@ -45,8 +45,8 @@ install_examples: $(TARGETS)
 
 install_examples:
        @echo installing: $(TARGETS)
-       -mkdir -p $(DESTDIR)$(EXAMPLESDIR)/x86
-       $(INSTALL) -m 755 $(TARGETS) $(DESTDIR)$(EXAMPLESDIR)/x86
+       -mkdir -p $(DESTDIR)$(EXAMPLESDIR)/v2/x86
+       $(INSTALL) -m 755 $(TARGETS) $(DESTDIR)$(EXAMPLESDIR)/v2/x86
 
 #
 # examples are installed as part of the RPM install, typically in 
/usr/share/doc/libpfm-X.Y/
-- 
1.6.1.2



------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
perfmon2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to