[cig-commits] [commit] QA: build: Make changes to scotch build permanent. (91bb0da)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Mon Jan 20 11:49:42 PST 2014


Repository : ssh://geoshell/specfem2d

On branch  : QA
Link       : https://github.com/geodynamics/specfem2d/compare/28743f19b9f9fdb75d359c135053825c0ffd05b3...5e8aa55e68fd17b6f475fb65531b84195e497aa1

>---------------------------------------------------------------

commit 91bb0dafeffa80c9f26c4ec4b15415d3416c46e1
Author: Elliott Sales de Andrade <esalesde at physics.utoronto.ca>
Date:   Mon Jan 6 23:40:07 2014 -0500

    build: Make changes to scotch build permanent.
    
    Every time you configured with internal scotch, you'd get modifications
    to its Makefiles which git would show as modified. This is troublesome
    whenever you want to commit or change branches, because you'd have to
    remember not to keep those changes.
    
    The changes to the scotch Makefiles are independent of any options you
    might pass to configure (except that they aren't done if you aren't
    using internal scotch). We can just make them permanently in git,
    especially because the changes have been made upstream in scotch as
    well.


>---------------------------------------------------------------

91bb0dafeffa80c9f26c4ec4b15415d3416c46e1
 .gitignore                                         |   3 -
 configure                                          | 147 ---------------------
 configure.ac                                       | 147 ---------------------
 .../scotch_5.1.12b/src/libscotch/Makefile          |  32 ++++-
 .../scotch_5.1.12b/src/libscotchmetis/Makefile     |  24 +++-
 src/meshfem2D/scotch_5.1.12b/src/scotch/Makefile   |  36 ++++-
 6 files changed, 74 insertions(+), 315 deletions(-)

diff --git a/.gitignore b/.gitignore
index 393573d..43ac712 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,7 +19,6 @@ src/meshfem2D/scotch_5.1.12b/include/
 src/meshfem2D/scotch_5.1.12b/lib/
 src/meshfem2D/scotch_5.1.12b/src/libscotch/*.o
 src/meshfem2D/scotch_5.1.12b/src/libscotch/*.a
-src/meshfem2D/scotch_5.1.12b/src/libscotch/Makefile.org
 src/meshfem2D/scotch_5.1.12b/src/libscotch/dummysizes
 src/meshfem2D/scotch_5.1.12b/src/libscotch/parser_ll.c
 src/meshfem2D/scotch_5.1.12b/src/libscotch/parser_ly.h
@@ -28,9 +27,7 @@ src/meshfem2D/scotch_5.1.12b/src/libscotch/scotch.h
 src/meshfem2D/scotch_5.1.12b/src/libscotch/scotchf.h
 src/meshfem2D/scotch_5.1.12b/src/libscotch/y.output
 src/meshfem2D/scotch_5.1.12b/src/libscotchmetis/*.o
-src/meshfem2D/scotch_5.1.12b/src/libscotchmetis/Makefile.org
 src/meshfem2D/scotch_5.1.12b/src/libscotchmetis/libscotchmetis.a
-src/meshfem2D/scotch_5.1.12b/src/scotch/Makefile.org
 src/meshfem2D/scotch_5.1.12b/src/scotch/acpl
 src/meshfem2D/scotch_5.1.12b/src/scotch/amk_ccc
 src/meshfem2D/scotch_5.1.12b/src/scotch/amk_fft2
diff --git a/configure b/configure
index a129ee9..b2c9b7b 100755
--- a/configure
+++ b/configure
@@ -6059,153 +6059,6 @@ test -n "$YACC" || YACC="yacc"
  SCOTCH_LIBDIR="${SCOTCH_DIR}/lib"
  SCOTCH_INCLUDEDIR="${SCOTCH_DIR}/include"
 
- # the following modifies the default scotch Makefile such that the package
- # will only be compiled once (no recompilation) when calling make
- #
- builddir=`pwd`
- cd src/meshfem2D/
-
- if test ! -f "${SCOTCH_DIR}/src/scotch/Makefile.org"; then
-
-  # no Makefile backup files yet
-  # modifies Makefiles once
-
-  # creates backup copies of original Makefiles
-  # src/scotch/
-  cp ${SCOTCH_DIR}/src/scotch/Makefile ${SCOTCH_DIR}/src/scotch/Makefile.org
-  # src/libscotch/
-  cp ${SCOTCH_DIR}/src/libscotch/Makefile ${SCOTCH_DIR}/src/libscotch/Makefile.org
-  # src/libscotchmetis/
-  cp ${SCOTCH_DIR}/src/libscotchmetis/Makefile ${SCOTCH_DIR}/src/libscotchmetis/Makefile.org
-
- fi
-
-  # replacement text in the default scotch Makefiles
-  cat > conftmp.scotch.cmd <<_ACEOF
-# scotch replacement text for install line
-\$(bindir)/acpl\$(EXE): acpl\$(EXE)
-	-\$(CP) acpl\$(EXE) \$(bindir)/acpl\$(EXE)
-\$(bindir)/amk_ccc\$(EXE): amk_ccc\$(EXE)
-	-\$(CP) amk_ccc\$(EXE) \$(bindir)/amk_ccc\$(EXE)
-\$(bindir)/amk_fft2\$(EXE): amk_fft2\$(EXE)
-	-\$(CP) amk_fft2\$(EXE) \$(bindir)/amk_fft2\$(EXE)
-\$(bindir)/amk_grf\$(EXE): amk_grf\$(EXE)
-	-\$(CP) amk_grf\$(EXE) \$(bindir)/amk_grf\$(EXE)
-\$(bindir)/amk_hy\$(EXE): amk_hy\$(EXE)
-	-\$(CP) amk_hy\$(EXE) \$(bindir)/amk_hy\$(EXE)
-\$(bindir)/amk_m2\$(EXE): amk_m2\$(EXE)
-	-\$(CP) amk_m2\$(EXE) \$(bindir)/amk_m2\$(EXE)
-\$(bindir)/amk_p2\$(EXE): amk_p2\$(EXE)
-	-\$(CP) amk_p2\$(EXE) \$(bindir)/amk_p2\$(EXE)
-\$(bindir)/atst\$(EXE): atst\$(EXE)
-	-\$(CP) atst\$(EXE) \$(bindir)/atst\$(EXE)
-\$(bindir)/gbase\$(EXE): gbase\$(EXE)
-	-\$(CP) gbase\$(EXE) \$(bindir)/gbase\$(EXE)
-\$(bindir)/gcv\$(EXE): gcv\$(EXE)
-	-\$(CP) gcv\$(EXE) \$(bindir)/gcv\$(EXE)
-\$(bindir)/gmap\$(EXE): gmap\$(EXE)
-	-\$(CP) gmap\$(EXE) \$(bindir)/gmap\$(EXE)
-\$(bindir)/gmk_hy\$(EXE): gmk_hy\$(EXE)
-	-\$(CP) gmk_hy\$(EXE) \$(bindir)/gmk_hy\$(EXE)
-\$(bindir)/gmk_m2\$(EXE): gmk_m2\$(EXE)
-	-\$(CP) gmk_m2\$(EXE) \$(bindir)/gmk_m2\$(EXE)
-\$(bindir)/gmk_m3\$(EXE): gmk_m3\$(EXE)
-	-\$(CP) gmk_m3\$(EXE) \$(bindir)/gmk_m3\$(EXE)
-\$(bindir)/gmk_msh\$(EXE): gmk_msh\$(EXE)
-	-\$(CP) gmk_msh\$(EXE) \$(bindir)/gmk_msh\$(EXE)
-\$(bindir)/gmk_ub2\$(EXE): gmk_ub2\$(EXE)
-	-\$(CP) gmk_ub2\$(EXE) \$(bindir)/gmk_ub2\$(EXE)
-\$(bindir)/gmtst\$(EXE): gmtst\$(EXE)
-	-\$(CP) gmtst\$(EXE) \$(bindir)/gmtst\$(EXE)
-\$(bindir)/gord\$(EXE): gord\$(EXE)
-	-\$(CP) gord\$(EXE) \$(bindir)/gord\$(EXE)
-\$(bindir)/gotst\$(EXE): gotst\$(EXE)
-	-\$(CP) gotst\$(EXE) \$(bindir)/gotst\$(EXE)
-\$(bindir)/gout\$(EXE): gout\$(EXE)
-	-\$(CP) gout\$(EXE) \$(bindir)/gout\$(EXE)
-\$(bindir)/gpart\$(EXE): \$(bindir)/gmap\$(EXE)
-	-\$(RM) \$(bindir)/gpart\$(EXE)
-	-\$(LN) \$(bindir)/gmap\$(EXE) \$(bindir)/gpart\$(EXE)
-\$(bindir)/gscat\$(EXE): gscat\$(EXE)
-	-\$(CP) gscat\$(EXE) \$(bindir)/gscat\$(EXE)
-\$(bindir)/gtst\$(EXE): gtst\$(EXE)
-	-\$(CP) gtst\$(EXE) \$(bindir)/gtst\$(EXE)
-\$(bindir)/mcv\$(EXE): mcv\$(EXE)
-	-\$(CP) mcv\$(EXE) \$(bindir)/mcv\$(EXE)
-\$(bindir)/mmk_m2\$(EXE): mmk_m2\$(EXE)
-	-\$(CP) mmk_m2\$(EXE) \$(bindir)/mmk_m2\$(EXE)
-\$(bindir)/mmk_m3\$(EXE): mmk_m3\$(EXE)
-	-\$(CP) mmk_m3\$(EXE) \$(bindir)/mmk_m3\$(EXE)
-\$(bindir)/mord\$(EXE): mord\$(EXE)
-	-\$(CP) mord\$(EXE) \$(bindir)/mord\$(EXE)
-\$(bindir)/mtst\$(EXE): mtst\$(EXE)
-	-\$(CP) mtst\$(EXE) \$(bindir)/mtst\$(EXE)
-
-
-install				: \$(bindir)/acpl\$(EXE) \$(bindir)/amk_ccc\$(EXE) \\
-	\$(bindir)/amk_fft2\$(EXE) \$(bindir)/amk_grf\$(EXE) \\
-	\$(bindir)/amk_hy\$(EXE) \$(bindir)/amk_m2\$(EXE) \\
-	\$(bindir)/amk_p2\$(EXE) \$(bindir)/atst\$(EXE) \\
-	\$(bindir)/gbase\$(EXE) \$(bindir)/gcv\$(EXE) \\
-	\$(bindir)/gmap\$(EXE) \$(bindir)/gmk_hy\$(EXE) \\
-	\$(bindir)/gmk_m2\$(EXE) \$(bindir)/gmk_m3\$(EXE) \\
-	\$(bindir)/gmk_msh\$(EXE) \$(bindir)/gmk_ub2\$(EXE) \\
-	\$(bindir)/gmtst\$(EXE) \$(bindir)/gord\$(EXE) \\
-	\$(bindir)/gotst\$(EXE) \$(bindir)/gout\$(EXE) \\
-	\$(bindir)/gpart\$(EXE) \$(bindir)/gscat\$(EXE) \\
-	\$(bindir)/gtst\$(EXE) \$(bindir)/mcv\$(EXE) \\
-	\$(bindir)/mmk_m2\$(EXE) \$(bindir)/mmk_m3\$(EXE) \\
-	\$(bindir)/mord\$(EXE) \$(bindir)/mtst\$(EXE)
-
-_ACEOF
-
-  # avoids lines between 98 to 101, containing install lines, and replaces them
-  awk '{if(NR<98)print $0}' ${SCOTCH_DIR}/src/scotch/Makefile.org > ${SCOTCH_DIR}/src/scotch/Makefile
-  cat conftmp.scotch.cmd >> ${SCOTCH_DIR}/src/scotch/Makefile
-  awk '{if(NR>101)print $0}' ${SCOTCH_DIR}/src/scotch/Makefile.org >> ${SCOTCH_DIR}/src/scotch/Makefile
-  rm -f conftmp.scotch.cmd
-
-  # replacement text in the default libscotch Makefile
-  cat > conftmp.libscotch.cmd <<_ACEOF
-# libscotch replacement text for install line
-\$(libdir)/libscotch\$(LIB): libscotch\$(LIB)
-	-\$(CP) libscotch\$(LIB) \$(libdir)
-\$(libdir)/libscotcherr\$(LIB): libscotcherr\$(LIB)
-	-\$(CP) libscotcherr\$(LIB) \$(libdir)
-\$(libdir)/libscotcherrexit\$(LIB): libscotcherrexit\$(LIB)
-	-\$(CP) libscotcherrexit\$(LIB) \$(libdir)
-\$(includedir)/scotch.h: scotch.h
-	-\$(CP) scotch.h \$(includedir)
-\$(includedir)/scotchf.h: scotchf.h
-	-\$(CP) scotchf.h \$(includedir)
-
-install				: \$(libdir)/libscotch\$(LIB) \$(libdir)/libscotcherr\$(LIB) \\
-	\$(libdir)/libscotcherrexit\$(LIB)	\\
-	\$(includedir)/scotch.h \$(includedir)/scotchf.h
-
-_ACEOF
-
-  # avoids lines between 71 to 73, containing install lines, and replaces them
-  awk '{if(NR<71)print $0}' ${SCOTCH_DIR}/src/libscotch/Makefile.org > ${SCOTCH_DIR}/src/libscotch/Makefile
-  cat conftmp.libscotch.cmd >> ${SCOTCH_DIR}/src/libscotch/Makefile
-  awk '{if(NR>73)print $0}' ${SCOTCH_DIR}/src/libscotch/Makefile.org >> ${SCOTCH_DIR}/src/libscotch/Makefile
-  rm -f conftmp.libscotch.cmd
-
-  # replaces single scotch line in Makefiles
-  # src/scotch/
-  sed "s/^scotch.*clean/scotch     : /" ${SCOTCH_DIR}/src/scotch/Makefile > conftmp.libscotch.mk
-  mv conftmp.libscotch.mk ${SCOTCH_DIR}/src/scotch/Makefile
-  # src/libscotch/
-  sed "s/^scotch.*clean/scotch     : /" ${SCOTCH_DIR}/src/libscotch/Makefile > conftmp.libscotch.mk
-  mv conftmp.libscotch.mk ${SCOTCH_DIR}/src/libscotch/Makefile
-  # src/libscotchmetis/
-  sed "s/^scotch.*clean/scotch     : /" ${SCOTCH_DIR}/src/libscotchmetis/Makefile > conftmp.libscotch.mk
-  mv conftmp.libscotch.mk ${SCOTCH_DIR}/src/libscotchmetis/Makefile
-
- cd $builddir
-
- # done scotch Makefile modification
-
  else
 
  # no mpi support, scotch not needed
diff --git a/configure.ac b/configure.ac
index af59a9e..385c9be 100644
--- a/configure.ac
+++ b/configure.ac
@@ -193,153 +193,6 @@ else
  SCOTCH_LIBDIR="${SCOTCH_DIR}/lib"
  SCOTCH_INCLUDEDIR="${SCOTCH_DIR}/include"
 
- # the following modifies the default scotch Makefile such that the package
- # will only be compiled once (no recompilation) when calling make
- #
- builddir=`pwd`
- cd src/meshfem2D/
-
- if test ! -f "${SCOTCH_DIR}/src/scotch/Makefile.org"; then
-
-  # no Makefile backup files yet
-  # modifies Makefiles once
-
-  # creates backup copies of original Makefiles
-  # src/scotch/
-  cp ${SCOTCH_DIR}/src/scotch/Makefile ${SCOTCH_DIR}/src/scotch/Makefile.org
-  # src/libscotch/
-  cp ${SCOTCH_DIR}/src/libscotch/Makefile ${SCOTCH_DIR}/src/libscotch/Makefile.org
-  # src/libscotchmetis/
-  cp ${SCOTCH_DIR}/src/libscotchmetis/Makefile ${SCOTCH_DIR}/src/libscotchmetis/Makefile.org
-
- fi
-
-  # replacement text in the default scotch Makefiles
-  cat > conftmp.scotch.cmd <<_ACEOF
-# scotch replacement text for install line
-\$(bindir)/acpl\$(EXE): acpl\$(EXE)
-	-\$(CP) acpl\$(EXE) \$(bindir)/acpl\$(EXE)
-\$(bindir)/amk_ccc\$(EXE): amk_ccc\$(EXE)
-	-\$(CP) amk_ccc\$(EXE) \$(bindir)/amk_ccc\$(EXE)
-\$(bindir)/amk_fft2\$(EXE): amk_fft2\$(EXE)
-	-\$(CP) amk_fft2\$(EXE) \$(bindir)/amk_fft2\$(EXE)
-\$(bindir)/amk_grf\$(EXE): amk_grf\$(EXE)
-	-\$(CP) amk_grf\$(EXE) \$(bindir)/amk_grf\$(EXE)
-\$(bindir)/amk_hy\$(EXE): amk_hy\$(EXE)
-	-\$(CP) amk_hy\$(EXE) \$(bindir)/amk_hy\$(EXE)
-\$(bindir)/amk_m2\$(EXE): amk_m2\$(EXE)
-	-\$(CP) amk_m2\$(EXE) \$(bindir)/amk_m2\$(EXE)
-\$(bindir)/amk_p2\$(EXE): amk_p2\$(EXE)
-	-\$(CP) amk_p2\$(EXE) \$(bindir)/amk_p2\$(EXE)
-\$(bindir)/atst\$(EXE): atst\$(EXE)
-	-\$(CP) atst\$(EXE) \$(bindir)/atst\$(EXE)
-\$(bindir)/gbase\$(EXE): gbase\$(EXE)
-	-\$(CP) gbase\$(EXE) \$(bindir)/gbase\$(EXE)
-\$(bindir)/gcv\$(EXE): gcv\$(EXE)
-	-\$(CP) gcv\$(EXE) \$(bindir)/gcv\$(EXE)
-\$(bindir)/gmap\$(EXE): gmap\$(EXE)
-	-\$(CP) gmap\$(EXE) \$(bindir)/gmap\$(EXE)
-\$(bindir)/gmk_hy\$(EXE): gmk_hy\$(EXE)
-	-\$(CP) gmk_hy\$(EXE) \$(bindir)/gmk_hy\$(EXE)
-\$(bindir)/gmk_m2\$(EXE): gmk_m2\$(EXE)
-	-\$(CP) gmk_m2\$(EXE) \$(bindir)/gmk_m2\$(EXE)
-\$(bindir)/gmk_m3\$(EXE): gmk_m3\$(EXE)
-	-\$(CP) gmk_m3\$(EXE) \$(bindir)/gmk_m3\$(EXE)
-\$(bindir)/gmk_msh\$(EXE): gmk_msh\$(EXE)
-	-\$(CP) gmk_msh\$(EXE) \$(bindir)/gmk_msh\$(EXE)
-\$(bindir)/gmk_ub2\$(EXE): gmk_ub2\$(EXE)
-	-\$(CP) gmk_ub2\$(EXE) \$(bindir)/gmk_ub2\$(EXE)
-\$(bindir)/gmtst\$(EXE): gmtst\$(EXE)
-	-\$(CP) gmtst\$(EXE) \$(bindir)/gmtst\$(EXE)
-\$(bindir)/gord\$(EXE): gord\$(EXE)
-	-\$(CP) gord\$(EXE) \$(bindir)/gord\$(EXE)
-\$(bindir)/gotst\$(EXE): gotst\$(EXE)
-	-\$(CP) gotst\$(EXE) \$(bindir)/gotst\$(EXE)
-\$(bindir)/gout\$(EXE): gout\$(EXE)
-	-\$(CP) gout\$(EXE) \$(bindir)/gout\$(EXE)
-\$(bindir)/gpart\$(EXE): \$(bindir)/gmap\$(EXE)
-	-\$(RM) \$(bindir)/gpart\$(EXE)
-	-\$(LN) \$(bindir)/gmap\$(EXE) \$(bindir)/gpart\$(EXE)
-\$(bindir)/gscat\$(EXE): gscat\$(EXE)
-	-\$(CP) gscat\$(EXE) \$(bindir)/gscat\$(EXE)
-\$(bindir)/gtst\$(EXE): gtst\$(EXE)
-	-\$(CP) gtst\$(EXE) \$(bindir)/gtst\$(EXE)
-\$(bindir)/mcv\$(EXE): mcv\$(EXE)
-	-\$(CP) mcv\$(EXE) \$(bindir)/mcv\$(EXE)
-\$(bindir)/mmk_m2\$(EXE): mmk_m2\$(EXE)
-	-\$(CP) mmk_m2\$(EXE) \$(bindir)/mmk_m2\$(EXE)
-\$(bindir)/mmk_m3\$(EXE): mmk_m3\$(EXE)
-	-\$(CP) mmk_m3\$(EXE) \$(bindir)/mmk_m3\$(EXE)
-\$(bindir)/mord\$(EXE): mord\$(EXE)
-	-\$(CP) mord\$(EXE) \$(bindir)/mord\$(EXE)
-\$(bindir)/mtst\$(EXE): mtst\$(EXE)
-	-\$(CP) mtst\$(EXE) \$(bindir)/mtst\$(EXE)
-
-
-install				: \$(bindir)/acpl\$(EXE) \$(bindir)/amk_ccc\$(EXE) \\
-	\$(bindir)/amk_fft2\$(EXE) \$(bindir)/amk_grf\$(EXE) \\
-	\$(bindir)/amk_hy\$(EXE) \$(bindir)/amk_m2\$(EXE) \\
-	\$(bindir)/amk_p2\$(EXE) \$(bindir)/atst\$(EXE) \\
-	\$(bindir)/gbase\$(EXE) \$(bindir)/gcv\$(EXE) \\
-	\$(bindir)/gmap\$(EXE) \$(bindir)/gmk_hy\$(EXE) \\
-	\$(bindir)/gmk_m2\$(EXE) \$(bindir)/gmk_m3\$(EXE) \\
-	\$(bindir)/gmk_msh\$(EXE) \$(bindir)/gmk_ub2\$(EXE) \\
-	\$(bindir)/gmtst\$(EXE) \$(bindir)/gord\$(EXE) \\
-	\$(bindir)/gotst\$(EXE) \$(bindir)/gout\$(EXE) \\
-	\$(bindir)/gpart\$(EXE) \$(bindir)/gscat\$(EXE) \\
-	\$(bindir)/gtst\$(EXE) \$(bindir)/mcv\$(EXE) \\
-	\$(bindir)/mmk_m2\$(EXE) \$(bindir)/mmk_m3\$(EXE) \\
-	\$(bindir)/mord\$(EXE) \$(bindir)/mtst\$(EXE)
-
-_ACEOF
-
-  # avoids lines between 98 to 101, containing install lines, and replaces them
-  awk '{if(NR<98)print $0}' ${SCOTCH_DIR}/src/scotch/Makefile.org > ${SCOTCH_DIR}/src/scotch/Makefile
-  cat conftmp.scotch.cmd >> ${SCOTCH_DIR}/src/scotch/Makefile
-  awk '{if(NR>101)print $0}' ${SCOTCH_DIR}/src/scotch/Makefile.org >> ${SCOTCH_DIR}/src/scotch/Makefile
-  rm -f conftmp.scotch.cmd
-
-  # replacement text in the default libscotch Makefile
-  cat > conftmp.libscotch.cmd <<_ACEOF
-# libscotch replacement text for install line
-\$(libdir)/libscotch\$(LIB): libscotch\$(LIB)
-	-\$(CP) libscotch\$(LIB) \$(libdir)
-\$(libdir)/libscotcherr\$(LIB): libscotcherr\$(LIB)
-	-\$(CP) libscotcherr\$(LIB) \$(libdir)
-\$(libdir)/libscotcherrexit\$(LIB): libscotcherrexit\$(LIB)
-	-\$(CP) libscotcherrexit\$(LIB) \$(libdir)
-\$(includedir)/scotch.h: scotch.h
-	-\$(CP) scotch.h \$(includedir)
-\$(includedir)/scotchf.h: scotchf.h
-	-\$(CP) scotchf.h \$(includedir)
-
-install				: \$(libdir)/libscotch\$(LIB) \$(libdir)/libscotcherr\$(LIB) \\
-	\$(libdir)/libscotcherrexit\$(LIB)	\\
-	\$(includedir)/scotch.h \$(includedir)/scotchf.h
-
-_ACEOF
-
-  # avoids lines between 71 to 73, containing install lines, and replaces them
-  awk '{if(NR<71)print $0}' ${SCOTCH_DIR}/src/libscotch/Makefile.org > ${SCOTCH_DIR}/src/libscotch/Makefile
-  cat conftmp.libscotch.cmd >> ${SCOTCH_DIR}/src/libscotch/Makefile
-  awk '{if(NR>73)print $0}' ${SCOTCH_DIR}/src/libscotch/Makefile.org >> ${SCOTCH_DIR}/src/libscotch/Makefile
-  rm -f conftmp.libscotch.cmd
-
-  # replaces single scotch line in Makefiles
-  # src/scotch/
-  sed "s/^scotch.*clean/scotch     : /" ${SCOTCH_DIR}/src/scotch/Makefile > conftmp.libscotch.mk
-  mv conftmp.libscotch.mk ${SCOTCH_DIR}/src/scotch/Makefile
-  # src/libscotch/
-  sed "s/^scotch.*clean/scotch     : /" ${SCOTCH_DIR}/src/libscotch/Makefile > conftmp.libscotch.mk
-  mv conftmp.libscotch.mk ${SCOTCH_DIR}/src/libscotch/Makefile
-  # src/libscotchmetis/
-  sed "s/^scotch.*clean/scotch     : /" ${SCOTCH_DIR}/src/libscotchmetis/Makefile > conftmp.libscotch.mk
-  mv conftmp.libscotch.mk ${SCOTCH_DIR}/src/libscotchmetis/Makefile
-
- cd $builddir
-
- # done scotch Makefile modification
-
  else
 
  # no mpi support, scotch not needed
diff --git a/src/meshfem2D/scotch_5.1.12b/src/libscotch/Makefile b/src/meshfem2D/scotch_5.1.12b/src/libscotch/Makefile
index 6fe8759..2476631 100644
--- a/src/meshfem2D/scotch_5.1.12b/src/libscotch/Makefile
+++ b/src/meshfem2D/scotch_5.1.12b/src/libscotch/Makefile
@@ -51,7 +51,7 @@ include ../Makefile.inc
 
 .PHONY				:	ptscotch	scotch	ptinstall	install	clean	realclean
 
-scotch				:	clean
+scotch				:
 					$(MAKE) CC="$(CCS)" CCD="$(CCS)"	\
 					scotch.h				\
 					scotchf.h				\
@@ -59,7 +59,7 @@ scotch				:	clean
 					libscotcherr$(LIB)			\
 					libscotcherrexit$(LIB)
 
-ptscotch			:	clean
+ptscotch			:
 					$(MAKE) CFLAGS="$(CFLAGS) -DSCOTCH_PTSCOTCH" CC="$(CCP)"	\
 					scotch.h							\
 					scotchf.h							\
@@ -68,9 +68,11 @@ ptscotch			:	clean
 					libptscotcherr$(LIB)						\
 					libptscotcherrexit$(LIB)
 
-install				:
-					-$(CP) scotch.h scotchf.h $(includedir)
-					-$(CP) libscotch$(LIB) libscotcherr*$(LIB) $(libdir)
+install				:	$(includedir)/scotch.h		\
+					$(includedir)/scotchf.h			\
+					$(libdir)/libscotch$(LIB)		\
+					$(libdir)/libscotcherr$(LIB)		\
+					$(libdir)/libscotcherrexit$(LIB)
 
 ptinstall			:
 					-$(CP) scotch.h $(includedir)/ptscotch.h
@@ -82,6 +84,26 @@ clean				:
 
 realclean			:	clean
 
+
+##
+##  Installation dependencies.
+##
+
+$(includedir)/scotch.h		:	scotch.h
+					-$(CP) scotch.h $(includedir)
+
+$(includedir)/scotchf.h	:	scotchf.h
+					-$(CP) scotchf.h $(includedir)
+
+$(libdir)/libscotch$(LIB)	:	libscotch$(LIB)
+					-$(CP) libscotch$(LIB) $(libdir)
+
+$(libdir)/libscotcherr$(LIB)	:	libscotcherr$(LIB)
+					-$(CP) libscotcherr$(LIB) $(libdir)
+
+$(libdir)/libscotcherrexit$(LIB):	libscotcherrexit$(LIB)
+					-$(CP) libscotcherrexit$(LIB) $(libdir)
+
 ##
 ##  Library dependencies.
 ##
diff --git a/src/meshfem2D/scotch_5.1.12b/src/libscotchmetis/Makefile b/src/meshfem2D/scotch_5.1.12b/src/libscotchmetis/Makefile
index d81d02c..ebeaebb 100644
--- a/src/meshfem2D/scotch_5.1.12b/src/libscotchmetis/Makefile
+++ b/src/meshfem2D/scotch_5.1.12b/src/libscotchmetis/Makefile
@@ -60,13 +60,9 @@ ptscotch			:
 					$(MAKE) CFLAGS="$(CFLAGS) -DSCOTCH_PTSCOTCH" CC="$(CCP)" SCOTCHLIB=ptscotch	\
 					libptscotchparmetis$(LIB)
 
-install				:	scotch
-					-$(CP) metis.h $(includedir)
-					-$(CP) libscotchmetis$(LIB) $(libdir)
+install				:	scotch $(includedir)/metis.h $(libdir)/libscotchmetis$(LIB)
 
-ptinstall			:	ptscotch
-					-$(CP) parmetis.h $(includedir)
-					-$(CP) libptscotchparmetis$(LIB) $(libdir)
+ptinstall			:	ptscotch $(includedir)/parmetis.h $(libdir)/libptscotchparmetis$(LIB)
 
 clean				:
 					-$(RM) *~ *$(OBJ) lib*$(LIB)
@@ -74,6 +70,22 @@ clean				:
 realclean			:	clean
 
 ##
+##  Installation dependencies.
+##
+
+$(includedir)/metis.h		:	metis.h
+					-$(CP) metis.h $(includedir)
+
+$(libdir)/libscotchmetis$(LIB)	:	libscotchmetis$(LIB)
+					-$(CP) libscotchmetis$(LIB) $(libdir)
+
+$(includedir)/parmetis.h	:	parmetis.h
+					-$(CP) parmetis.h $(includedir)
+
+$(libdir)/libptscotchparmetis$(LIB):	libptscotchparmetis$(LIB)
+					-$(CP) libptscotchparmetis$(LIB) $(libdir)
+
+##
 ##  Todo list.
 ##
 
diff --git a/src/meshfem2D/scotch_5.1.12b/src/scotch/Makefile b/src/meshfem2D/scotch_5.1.12b/src/scotch/Makefile
index ed81cd4..b091be4 100644
--- a/src/meshfem2D/scotch_5.1.12b/src/scotch/Makefile
+++ b/src/meshfem2D/scotch_5.1.12b/src/scotch/Makefile
@@ -55,7 +55,7 @@ include ../Makefile.inc
 
 .PHONY				:	ptscotch	scotch	ptinstall	install	clean	realclean
 
-scotch				:	clean
+scotch				:
 					$(MAKE) CC="$(CCS)" SCOTCHLIB=scotch	\
 					acpl$(EXE)				\
 					amk_ccc$(EXE)				\
@@ -86,7 +86,7 @@ scotch				:	clean
 					mord$(EXE)				\
 					mtst$(EXE)
 
-ptscotch			:	clean
+ptscotch			:
 					$(MAKE) CC="$(CCP)" SCOTCHLIB=ptscotch	\
 					dggath$(EXE)				\
 					dgmap$(EXE)				\
@@ -95,11 +95,26 @@ ptscotch			:	clean
 					dgscat$(EXE)				\
 					dgtst$(EXE)
 
-install				:
-					-$(CP) acpl$(EXE) amk_ccc$(EXE) amk_fft2$(EXE) amk_grf$(EXE) amk_hy$(EXE) amk_m2$(EXE) amk_p2$(EXE) atst$(EXE) gbase$(EXE) gcv$(EXE) gmap$(EXE) gmk_hy$(EXE) gmk_m2$(EXE) gmk_m3$(EXE) gmk_msh$(EXE) gmk_ub2$(EXE) gmtst$(EXE) gord$(EXE) gotst$(EXE) gout$(EXE) gpart$(EXE) *gtst$(EXE) gscat$(EXE) mcv$(EXE) mmk_m2$(EXE) mmk_m3$(EXE) mord$(EXE) mtst$(EXE) $(bindir)
-
-ptinstall			:
-					-$(CP) dggath$(EXE) dgmap$(EXE) dgord$(EXE) dgpart$(EXE) dgscat$(EXE) dgtst$(EXE) $(bindir)
+install				: \
+	$(bindir)/acpl$(EXE) $(bindir)/amk_ccc$(EXE) \
+	$(bindir)/amk_fft2$(EXE) $(bindir)/amk_grf$(EXE) \
+	$(bindir)/amk_hy$(EXE) $(bindir)/amk_m2$(EXE) \
+	$(bindir)/amk_p2$(EXE) $(bindir)/atst$(EXE) \
+	$(bindir)/gbase$(EXE) $(bindir)/gcv$(EXE) \
+	$(bindir)/gmap$(EXE) $(bindir)/gmk_hy$(EXE) \
+	$(bindir)/gmk_m2$(EXE) $(bindir)/gmk_m3$(EXE) \
+	$(bindir)/gmk_msh$(EXE) $(bindir)/gmk_ub2$(EXE) \
+	$(bindir)/gmtst$(EXE) $(bindir)/gord$(EXE) \
+	$(bindir)/gotst$(EXE) $(bindir)/gout$(EXE) \
+	$(bindir)/gpart$(EXE) $(bindir)/gscat$(EXE) \
+	$(bindir)/gtst$(EXE) $(bindir)/mcv$(EXE) \
+	$(bindir)/mmk_m2$(EXE) $(bindir)/mmk_m3$(EXE) \
+	$(bindir)/mord$(EXE) $(bindir)/mtst$(EXE)
+
+ptinstall			: \
+	$(bindir)/dggath$(EXE) $(bindir)/dgmap$(EXE) \
+	$(bindir)/dgord$(EXE) $(bindir)/dgpart$(EXE) \
+	$(bindir)/dgscat$(EXE) $(bindir)/dgtst$(EXE)
 
 clean				:
 					-$(RM) *~ *$(OBJ) acpl$(EXE) amk_ccc$(EXE) amk_fft2$(EXE) amk_grf$(EXE) amk_hy$(EXE) amk_m2$(EXE) amk_p2$(EXE) atst$(EXE) gbase$(EXE) gcv$(EXE) *ggath$(EXE) *gmap$(EXE) gmk_hy$(EXE) gmk_m2$(EXE) gmk_m3$(EXE) gmk_msh$(EXE) gmk_ub2$(EXE) gmtst$(EXE) *gord$(EXE) gotst$(EXE) gout$(EXE) *gpart$(EXE) *gscat$(EXE) *gtst$(EXE) mcv$(EXE) mmk_m2$(EXE) mmk_m3$(EXE) mord$(EXE) mtst$(EXE)
@@ -107,6 +122,13 @@ clean				:
 realclean			:	clean
 
 ##
+##  Installation dependencies.
+##
+
+$(bindir)/%$(EXE)		:	%$(EXE)
+					-$(CP) $? $@
+
+##
 ##  Todo list.
 ##
 



More information about the CIG-COMMITS mailing list