361e069
commit d239c350a17b0e329223f62e7efc1f786e3e7ac7
361e069
Author: William Cohen <wcohen@redhat.com>
361e069
Date:   Wed Nov 7 13:31:50 2012 -0500
361e069
361e069
    Factor out duplicate install code from Rules.pfm4_pe
361e069
    
361e069
    The Makefile.inc has a rule to installed shared libraries.  However,
361e069
    Rules.pfm4_pe also has a slightly different set of rules to install
361e069
    code for shared libraries.  This leads to the same shared library
361e069
    being installed under two different names.  The duplicate code has
361e069
    been removed from Rules.pfm4_pe and a symbolic link has been added to
361e069
    ensure that any code that might have linked with
361e069
    libpapi.so.$(PAPIVER).$(PAPIREV).$(PAPIAGE) still runs.
361e069
    
361e069
    Signed-off-by: William Cohen <wcohen@redhat.com>
361e069
361e069
diff --git a/src/Makefile.inc b/src/Makefile.inc
361e069
index 1cdb270..e733ed9 100644
361e069
--- a/src/Makefile.inc
361e069
+++ b/src/Makefile.inc
361e069
@@ -308,6 +308,7 @@ install-lib: native_install
361e069
 	@if test -r $(SHLIB) ; then \
361e069
 		cp -p $(SHLIB) $(DESTDIR)$(LIBDIR)/libpapi.so.$(PAPIVER).$(PAPIREV).$(PAPIAGE).$(PAPIINC); \
361e069
 		chmod go+r $(DESTDIR)$(LIBDIR)/libpapi.so.$(PAPIVER).$(PAPIREV).$(PAPIAGE).$(PAPIINC) ; \
361e069
+		cd $(DESTDIR)$(LIBDIR); ln -sf libpapi.so.$(PAPIVER).$(PAPIREV).$(PAPIAGE).$(PAPIINC) libpapi.so.$(PAPIVER).$(PAPIREV).$(PAPIAGE); \
361e069
 		cd $(DESTDIR)$(LIBDIR); ln -sf libpapi.so.$(PAPIVER).$(PAPIREV).$(PAPIAGE).$(PAPIINC) libpapi.so.$(PAPIVER); \
361e069
 		cd $(DESTDIR)$(LIBDIR); ln -sf libpapi.so.$(PAPIVER).$(PAPIREV).$(PAPIAGE).$(PAPIINC) libpapi.so; \
361e069
 	fi
361e069
diff --git a/src/Rules.pfm4_pe b/src/Rules.pfm4_pe
361e069
index 56a2f07..0f83ec4 100644
361e069
--- a/src/Rules.pfm4_pe
361e069
+++ b/src/Rules.pfm4_pe
361e069
@@ -66,11 +66,8 @@ ifneq (,${PFM_ROOT})
361e069
 	-$(MAKE) -C $(PFM_ROOT) ARCH="$(ARCH)" DESTDIR=$(DESTDIR) PREFIX=$(PREFIX) install_prefix=$(PREFIX) LIBDIR=$(LIBDIR) INCDIR=$(INCDIR) MANDIR=$(MANDIR) install
361e069
 endif
361e069
 	-install -d $(DESTDIR)$(LIBDIR)
361e069
-ifneq (,$(findstring shared,$(LIBS)))
361e069
-	cp -p $(SHLIB) $(DESTDIR)$(LIBDIR)/libpapi.so.$(PAPIVER).$(PAPIREV).$(PAPIAGE)
361e069
-	cd $(DESTDIR)$(LIBDIR); ln -sf libpapi.so.$(PAPIVER).$(PAPIREV).$(PAPIAGE) libpapi.so.$(PAPIVER)
361e069
-	cd $(DESTDIR)$(LIBDIR); ln -sf libpapi.so.$(PAPIVER).$(PAPIREV).$(PAPIAGE) libpapi.so
361e069
-endif
361e069
+# Makefile.inc already has installation of shared libraries so
361e069
+# there is no need to do it here
361e069
 	-install -d $(DESTDIR)$(DATADIR)
361e069
 	cp -f ./papi_events.csv $(DESTDIR)$(DATADIR)
361e069