[mpich2-commits] r9534 - mpich2/trunk

balaji at mcs.anl.gov balaji at mcs.anl.gov
Fri Feb 24 21:54:34 CST 2012


Author: balaji
Date: 2012-02-24 21:54:33 -0600 (Fri, 24 Feb 2012)
New Revision: 9534

Modified:
   mpich2/trunk/Makefile.am
Log:
Replace the libraries and headers that mpicc and friends point to at
"make install" time. Fixes ticket tt#1466.

Reviewed by goodell.

Modified: mpich2/trunk/Makefile.am
===================================================================
--- mpich2/trunk/Makefile.am	2012-02-25 00:56:01 UTC (rev 9533)
+++ mpich2/trunk/Makefile.am	2012-02-25 03:54:33 UTC (rev 9534)
@@ -137,6 +137,25 @@
 	    $(INSTALL_DATA) src/mpi/debugger/libtvmpich2.$(SHLIB_EXT) \
 			${DESTDIR}${libdir}/libtvmpich2.$(SHLIB_EXT) ; fi
 
+## FIXME: this should live in src/env/Makefile.mk. Moving it there
+## will not cause a problem, but it will break the build if another
+## Makefile.mk also decides to create a install-exec-hook target. A
+## better approach might be to have each Makefile.mk append to a
+## common set of rules.
+install-exec-hook:
+	for e in ${DESTDIR}${bindir}/mpicc ${DESTDIR}${bindir}/mpicxx \
+		${DESTDIR}${bindir}/mpif77 ${DESTDIR}${bindir}/mpif90 ; do \
+		if test -e $${e} ; then \
+			sed -e "s+^prefix=.*+prefix=${prefix}+g" \
+				-e "s+^exec_prefix=.*+exec_prefix=${exec_prefix}+g" \
+				-e "s+^sysconfdir=.*+sysconfdir=${sysconfdir}+g" \
+				-e "s+^includdir=.*+includedir=${includedir}+g" \
+				-e "s+^libdir=.*+libdir=${libdir}+g" $${e} > $${e}.tmp ; \
+			$(INSTALL_SCRIPT) $${e}.tmp $${e} ; \
+			rm -f $${e}.tmp ; \
+		fi ; \
+	done
+
 # the configure step checks for the 'lib' dir to decide whether a source
 # directory has been previously used for an in-path build before allowing a
 # VPATH build to continue



More information about the mpich2-commits mailing list