[mpich-commits] r10821 - mpich2/trunk

goodell at mcs.anl.gov goodell at mcs.anl.gov
Thu Jan 3 14:41:35 CST 2013


Author: goodell
Date: 2013-01-03 14:41:35 -0600 (Thu, 03 Jan 2013)
New Revision: 10821

Modified:
   mpich2/trunk/Makefile.am
Log:
tt#1771: allow `+` in `--prefix=`, etc.

Satish pointed out that we were causing problems when the user specified
directories with a `+` in them.  The updated version uses a `|`, which
is a universally poor user choice for directory names (much like `:`
would be).  Single quotes are now also used instead of double quotes.
This sed code is still pretty fragile in the case of exotic path names,
but it's better now.  If this is still a problem for users, the next
step is either to give up on permitting make-time overrides of special
vars like `prefix` or to at least disable that functionality with a
configure switch of some sort.

Reviewed by balaji at .

Modified: mpich2/trunk/Makefile.am
===================================================================
--- mpich2/trunk/Makefile.am	2013-01-03 19:12:13 UTC (rev 10820)
+++ mpich2/trunk/Makefile.am	2013-01-03 20:41:35 UTC (rev 10821)
@@ -152,11 +152,11 @@
 	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 ; \
+			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 ; \



More information about the commits mailing list