diff -urN mpich2-1.0.8/src/pm/mpd/Makefile.in mpich2-1.0.8_p/src/pm/mpd/Makefile.in --- mpich2-1.0.8/src/pm/mpd/Makefile.in 2008-09-17 16:40:53.000000000 -0400 +++ mpich2-1.0.8_p/src/pm/mpd/Makefile.in 2008-11-01 13:17:08.518285830 -0400 @@ -20,6 +20,10 @@ INSTALL = @INSTALL@ CFLAGS = @CFLAGS@ +LIBDIRNAME = `echo @libdir@ | sed 's:.*@prefix@/::'` +PYTHONDIR = ${prefix}/${LIBDIRNAME}/${PYTHON}/site-packages/mpich2 +PYTHONLINK = ../${LIBDIRNAME}/${PYTHON}/site-packages/mpich2 + C_COMPILE = ${CC} ${INCLUDES} ${CFLAGS} ${COPTIONS} C_LINK = ${CLINKER} ${CFLAGS} ${COPTIONS} ${LDFLAGS} @@ -125,29 +129,33 @@ else \ ${INSTALL} -m 755 mpdroot $(DESTDIR)${bindir}/mpdroot ;\ fi - @echo "copying python files/links into " $(DESTDIR)${bindir} + @echo "copying python files/links into " $(DESTDIR)${PYTHONDIR} + @if [ ! -d $(DESTDIR)${PYTHONDIR} ] ; then \ + echo "mkdir -p $(DESTDIR)${PYTHONDIR} " ;\ + mkdir -p $(DESTDIR)${PYTHONDIR} ; \ + fi -@for cmd in ${PYTHON_SOURCE} ; do \ if [ ! -s $(srcdir)/$$cmd.py ] ; then continue ; fi ; \ sed -e 's#/usr/bin/env python.*#/usr/bin/env ${PYTHON}#' ${srcdir}/$$cmd.py > $(DESTDIR)${bindir}/temp$$cmd.py ; \ - ${INSTALL} -m 755 $(DESTDIR)${bindir}/temp$$cmd.py $(DESTDIR)${bindir}/$$cmd.py; \ + ${INSTALL} -m 755 $(DESTDIR)${bindir}/temp$$cmd.py $(DESTDIR)${PYTHONDIR}/$$cmd.py; \ ( rm -f $(DESTDIR)${bindir}/temp$$cmd.py >/dev/null 2>&1 || exit 0 ) ; \ done -@cd $(DESTDIR)${bindir} && rm -f mpd - -@cd $(DESTDIR)${bindir} && @LN_S@ mpd.py mpd + -@cd $(DESTDIR)${bindir} && @LN_S@ ${PYTHONLINK}/mpd.py mpd -@cd $(DESTDIR)${bindir} && rm -f mpdboot - -@cd $(DESTDIR)${bindir} && @LN_S@ mpdboot.py mpdboot + -@cd $(DESTDIR)${bindir} && @LN_S@ ${PYTHONLINK}/mpdboot.py mpdboot -@for cmd in ${CMDS} ; do \ ( cd $(DESTDIR)${bindir} && rm -f $$cmd ; ) ; \ - ( cd $(DESTDIR)${bindir} && @LN_S@ $$cmd.py $$cmd ; ) \ + ( cd $(DESTDIR)${bindir} && @LN_S@ ${PYTHONLINK}/$$cmd.py $$cmd ; ) \ done -@( rm -f $(DESTDIR)${bindir}/mpdrun >/dev/null 2>&1 || exit 0 ) - -@( rm -f $(DESTDIR)${bindir}/mpdrun.py >/dev/null 2>&1 || exit 0 ) + -@( rm -f $(DESTDIR)${PYTHONDIR}/mpdrun.py >/dev/null 2>&1 || exit 0 ) -@( rm -f $(DESTDIR)${bindir}/mpirun >/dev/null 2>&1 || exit 0 ) - -@( rm -f $(DESTDIR)${bindir}/mpirun.py >/dev/null 2>&1 || exit 0 ) - -@cd $(DESTDIR)${bindir} && @LN_S@ mpiexec mpdrun - -@cd $(DESTDIR)${bindir} && @LN_S@ mpiexec.py mpdrun.py - -@cd $(DESTDIR)${bindir} && @LN_S@ mpiexec mpirun - -@cd $(DESTDIR)${bindir} && @LN_S@ mpiexec.py mpirun.py + -@( rm -f $(DESTDIR)${PYTHONDIR}/mpirun.py >/dev/null 2>&1 || exit 0 ) + -@cd $(DESTDIR)${bindir} && @LN_S@ ${PYTHONLINK}/mpiexec.py mpdrun + -@cd $(DESTDIR)${bindir} && @LN_S@ ${PYTHONLINK}/mpiexec.py mpdrun.py + -@cd $(DESTDIR)${bindir} && @LN_S@ ${PYTHONLINK}/mpiexec.py mpirun + -@cd $(DESTDIR)${bindir} && @LN_S@ ${PYTHONLINK}/mpiexec.py mpirun.py -@if [ "${DO_MTV}" = "yes" ] ; then \ ${INSTALL} -m 755 mtv.so $(DESTDIR)${bindir}/mtv.so ;\ fi @@ -166,43 +174,43 @@ -rm -f $(DESTDIR)${bindir}/mpdroot -rm -f $(DESTDIR)${bindir}/Zeroconf.py -rm -f $(DESTDIR)${bindir}/mpd - -rm -f $(DESTDIR)${bindir}/mpd.py + -rm -f $(DESTDIR)${PYTHONDIR}/mpd.py -rm -f $(DESTDIR)${bindir}/mpdallexit - -rm -f $(DESTDIR)${bindir}/mpdallexit.py + -rm -f $(DESTDIR)${PYTHONDIR}/mpdallexit.py -rm -f $(DESTDIR)${bindir}/mpdboot - -rm -f $(DESTDIR)${bindir}/mpdboot.py + -rm -f $(DESTDIR)${PYTHONDIR}/mpdboot.py -rm -f $(DESTDIR)${bindir}/mpdcheck - -rm -f $(DESTDIR)${bindir}/mpdcheck.py - -rm -f $(DESTDIR)${bindir}/mpdchkpyver.py + -rm -f $(DESTDIR)${PYTHONDIR}/mpdcheck.py + -rm -f $(DESTDIR)${PYTHONDIR}/mpdchkpyver.py -rm -f $(DESTDIR)${bindir}/mpdcleanup - -rm -f $(DESTDIR)${bindir}/mpdcleanup.py + -rm -f $(DESTDIR)${PYTHONDIR}/mpdcleanup.py -rm -f $(DESTDIR)${bindir}/mpdexit - -rm -f $(DESTDIR)${bindir}/mpdexit.py - -rm -f $(DESTDIR)${bindir}/mpdgdbdrv.py + -rm -f $(DESTDIR)${PYTHONDIR}/mpdexit.py + -rm -f $(DESTDIR)${PYTHONDIR}/mpdgdbdrv.py -rm -f $(DESTDIR)${bindir}/mpdhelp - -rm -f $(DESTDIR)${bindir}/mpdhelp.py + -rm -f $(DESTDIR)${PYTHONDIR}/mpdhelp.py -rm -f $(DESTDIR)${bindir}/mpdkilljob - -rm -f $(DESTDIR)${bindir}/mpdkilljob.py - -rm -f $(DESTDIR)${bindir}/mpdlib.py - -rm -f $(DESTDIR)${bindir}/mpdlib.pyc + -rm -f $(DESTDIR)${PYTHONDIR}/mpdkilljob.py + -rm -f $(DESTDIR)${PYTHONDIR}/mpdlib.py + -rm -f $(DESTDIR)${PYTHONDIR}/mpdlib.pyc -rm -f $(DESTDIR)${bindir}/mpdlistjobs - -rm -f $(DESTDIR)${bindir}/mpdlistjobs.py - -rm -f $(DESTDIR)${bindir}/mpdman.py - -rm -f $(DESTDIR)${bindir}/mpdman.pyc + -rm -f $(DESTDIR)${PYTHONDIR}/mpdlistjobs.py + -rm -f $(DESTDIR)${PYTHONDIR}/mpdman.py + -rm -f $(DESTDIR)${PYTHONDIR}/mpdman.pyc -rm -f $(DESTDIR)${bindir}/mpdringtest - -rm -f $(DESTDIR)${bindir}/mpdringtest.py + -rm -f $(DESTDIR)${PYTHONDIR}/mpdringtest.py -rm -f $(DESTDIR)${bindir}/mpdrun - -rm -f $(DESTDIR)${bindir}/mpdrun.py + -rm -f $(DESTDIR)${PYTHONDIR}/mpdrun.py -rm -f $(DESTDIR)${bindir}/mpdsigjob - -rm -f $(DESTDIR)${bindir}/mpdsigjob.py + -rm -f $(DESTDIR)${PYTHONDIR}/mpdsigjob.py -rm -f $(DESTDIR)${bindir}/mpdtrace - -rm -f $(DESTDIR)${bindir}/mpdtrace.py + -rm -f $(DESTDIR)${PYTHONDIR}/mpdtrace.py -rm -f $(DESTDIR)${bindir}/mpecc.in -rm -f $(DESTDIR)${bindir}/mpefc.in -rm -f $(DESTDIR)${bindir}/mpiexec - -rm -f $(DESTDIR)${bindir}/mpiexec.py + -rm -f $(DESTDIR)${PYTHONDIR}/mpiexec.py -rm -f $(DESTDIR)${bindir}/mpirun - -rm -f $(DESTDIR)${bindir}/mpirun.py + -rm -f $(DESTDIR)${PYTHONDIR}/mpirun.py mpich2-mpdroot: mpich2-mpdroot.o $(C_LINK) -o mpich2-mpdroot mpich2-mpdroot.o $(LIBS) @@ -224,25 +232,29 @@ echo "mkdir -p $(DESTDIR)${bindir} " ;\ mkdir -p $(DESTDIR)${bindir} ;\ fi + @if [ ! -d $(DESTDIR)${PYTHONDIR} ] ; then \ + echo "mkdir -p $(DESTDIR)${PYTHONDIR} " ;\ + mkdir -p $(DESTDIR)${PYTHONDIR} ; \ + fi for cmd in ${PYTHON_SOURCE} ; do \ if [ ! -s $(srcdir)/$$cmd.py ] ; then continue ; fi ; \ sed -e 's#/usr/bin/env python.*#/usr/bin/env ${PYTHON}#' ${srcdir}/$$cmd.py > $(DESTDIR)${bindir}/temp$$cmd.py ; \ - ${INSTALL} -m 755 $(DESTDIR)${bindir}/temp$$cmd.py $(DESTDIR)${bindir}/$$cmd.py; \ + ${INSTALL} -m 755 $(DESTDIR)${bindir}/temp$$cmd.py $(DESTDIR)${PYTHONDIR}/$$cmd.py; \ ( rm -f $(DESTDIR)${bindir}/temp$$cmd.py >/dev/null 2>&1 || exit 0 ) ; \ done cd $(DESTDIR)${bindir} && rm -f mpd - cd $(DESTDIR)${bindir} && @LN_S@ mpd.py mpd + cd $(DESTDIR)${bindir} && @LN_S@ ${PYTHONLINK}/mpd.py mpd cd $(DESTDIR)${bindir} && rm -f mpdboot - cd $(DESTDIR)${bindir} && @LN_S@ mpdboot.py mpdboot + cd $(DESTDIR)${bindir} && @LN_S@ ${PYTHONLINK}/mpdboot.py mpdboot for cmd in ${CMDS} ; do \ if [ $$cmd = "mpiexec" ] ; then continue ; fi ; \ ( cd $(DESTDIR)${bindir} && rm -f $$cmd ; ) ; \ - ( cd $(DESTDIR)${bindir} && @LN_S@ $$cmd.py $$cmd ; ) \ + ( cd $(DESTDIR)${bindir} && @LN_S@ )${PYTHONLINK}/$$cmd.py $$cmd ; ) \ done - ( rm -f $(DESTDIR)${bindir}/mpdrun >/dev/null 2>&1 || exit 0 ) + ( rm -f $(DESTDIR)${PYTHONDIR}/mpdrun >/dev/null 2>&1 || exit 0 ) ( rm -f $(DESTDIR)${bindir}/mpdrun.py >/dev/null 2>&1 || exit 0 ) - mv -f $(DESTDIR)${bindir}/mpiexec.py $(DESTDIR)${bindir}/mpiexec.mpd - cd $(DESTDIR)${bindir} && @LN_S@ mpiexec.mpd mpdrun + mv -f $(DESTDIR)${PYTHONDIR}/mpiexec.py $(DESTDIR)${PYTHONDIR}/mpiexec.mpd + cd $(DESTDIR)${bindir} && @LN_S@ )${PYTHONLINK}/mpiexec.mpd mpdrun # Empty dependencies target (MPICH2 wants this target) dependencies: