This patch changes the installation directories for examples to:
/usr/share/doc/libpfm-$(VERSION).$(REVISION).$(AGE)/examples
Signed-off-by: Robert Richter <[EMAIL PROTECTED]>
---
Makefile | 2 +-
config.mk | 5 ++++-
lib/Makefile | 9 +--------
libpfms/lib/Makefile | 2 +-
old_interface_ia64_examples/Makefile | 4 ++--
version.mk | 6 ++++++
6 files changed, 15 insertions(+), 13 deletions(-)
create mode 100644 version.mk
diff --git a/Makefile b/Makefile
index bde1fb7..53960c9 100644
--- a/Makefile
+++ b/Makefile
@@ -25,7 +25,7 @@
#
TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
-include config.mk
+include $(TOPDIR)/config.mk
DIRS=lib examples include docs
diff --git a/config.mk b/config.mk
index 3b3614b..df15d5f 100644
--- a/config.mk
+++ b/config.mk
@@ -23,6 +23,9 @@
# applications on Linux.
#
+# TOPDIR must be already defined when including config.mk
+include $(TOPDIR)/version.mk
+
#
# This file defines the global compilation settings.
# It is included by every Makefile
@@ -80,7 +83,7 @@ PREFIX=$(install_prefix)
LIBDIR=$(PREFIX)/lib
INCDIR=$(PREFIX)/include
MANDIR=$(PREFIX)/share/man
-EXAMPLESDIR=$(PREFIX)/share/doc/libpfm/examples
+EXAMPLESDIR=$(PREFIX)/share/doc/libpfm-$(VERSION).$(REVISION).$(AGE)/examples
#
# Configuration Paramaters for libpfm library
diff --git a/lib/Makefile b/lib/Makefile
index 16b5a0d..5db25d7 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -25,13 +25,6 @@ include $(TOPDIR)/config.mk
include $(TOPDIR)/rules.mk
#
-# Library version
-#
-VERSION=3
-REVISION=3
-AGE=0
-
-#
# Common files
#
SRCS=pfmlib_common.c pfmlib_priv.c
@@ -189,7 +182,7 @@ INCDEP=$(INC_COMMON) $(INCARCH)
all: $(TARGETS)
-$(OBJS) $(SOBJS): $(TOPDIR)/config.mk $(TOPDIR)/rules.mk Makefile $(INCDEP)
+$(OBJS) $(SOBJS): $(wildcard $(TOPDIR)/*.mk) Makefile $(INCDEP)
libpfm.a: $(OBJS)
$(RM) $@
diff --git a/libpfms/lib/Makefile b/libpfms/lib/Makefile
index 735a3e8..de7b083 100644
--- a/libpfms/lib/Makefile
+++ b/libpfms/lib/Makefile
@@ -61,7 +61,7 @@ CFLAGS+=-I$(PFMSINCDIR)
all: $(TARGETS)
-$(OBJS) $(SOBJS): $(TOPDIR)/config.mk $(TOPDIR)/rules.mk Makefile
+$(OBJS) $(SOBJS): $(wildcard $(TOPDIR)/*.mk) Makefile
libpfms.a: $(OBJS)
$(RM) $@
diff --git a/old_interface_ia64_examples/Makefile
b/old_interface_ia64_examples/Makefile
index cbd1726..47065c9 100644
--- a/old_interface_ia64_examples/Makefile
+++ b/old_interface_ia64_examples/Makefile
@@ -27,8 +27,8 @@
#
TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)/..
-include ../config.mk
-include ../rules.mk
+include $(TOPDIR)/config.mk
+include $(TOPDIR)/rules.mk
CFLAGS += -pthread
LDFLAGS+=-static
diff --git a/version.mk b/version.mk
new file mode 100644
index 0000000..e3e6946
--- /dev/null
+++ b/version.mk
@@ -0,0 +1,6 @@
+#
+# Library version
+#
+VERSION=3
+REVISION=3
+AGE=0
--
1.5.3.7
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
perfmon2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel