From 7072a998e866e8494585e00000db10f7797d0236 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Tue, 16 Dec 2008 11:45:12 +0100 Subject: [PATCH] paraview build - add -abspath/-envpath options --- bin/buildParaView3.5-cvs | 23 +++++++++++++++++++++-- bin/tools/buildParaView3.3-cvs | 23 +++++++++++++++++++++-- bin/tools/buildParaViewFunctions | 14 +++++++++----- 3 files changed, 51 insertions(+), 9 deletions(-) diff --git a/bin/buildParaView3.5-cvs b/bin/buildParaView3.5-cvs index c809cd8f7e..5f953beaa1 100755 --- a/bin/buildParaView3.5-cvs +++ b/bin/buildParaView3.5-cvs @@ -65,7 +65,8 @@ usage() { usage: ${0##*/} [OPTION] options: - -fast skip configure for repeated builds - use with caution + -fast for repeated builds (-make -abspath -install) *use with caution* + -abspath suppress the '-envpath' stage of changing the cmake files -mpi with mpi (if not already enabled) -python with python (if not already enabled) -mesa with mesa (if not already enabled) @@ -76,6 +77,7 @@ For finer control, the build stages can be also selected individually (mutually exclusive) -config -make + -envpath -install Build and install $PARAVIEW_SRC @@ -94,6 +96,7 @@ case "$Script" in *-mesa*) WITH_MESA=ON;; esac runCONFIG=true runMAKE=true +runENVPATH=true runINSTALL=true # parse options @@ -106,27 +109,42 @@ do -config) # stage 1: config only runCONFIG=true runMAKE=false + runENVPATH=false runINSTALL=false shift ;; -make) # stage 2: make only runCONFIG=false runMAKE=true + runENVPATH=false runINSTALL=false shift ;; - -install) # stage 3: install only + -envpath) # stage 3: alter paths to use env variables runCONFIG=false runMAKE=false + runENVPATH=true + runINSTALL=false + shift + ;; + -install) # stage 4: install only + runCONFIG=false + runMAKE=false + runENVPATH=false runINSTALL=true shift ;; -fast) # shortcut for rebuild runCONFIG=false runMAKE=true + runENVPATH=false runINSTALL=true shift ;; + -abspath) # suppress changing the cmake files + runENVPATH=false + shift + ;; -mpi) WITH_MPI=ON shift @@ -162,6 +180,7 @@ getPaths # discover where things are or should be put # ~~~~~~~~~~~~~~~~~ [ $runCONFIG = true ] && configParaView [ $runMAKE = true ] && makeParaView +[ $runENVPATH = true ] && fixCMakeFiles [ $runINSTALL = true ] && installParaView echo "done" diff --git a/bin/tools/buildParaView3.3-cvs b/bin/tools/buildParaView3.3-cvs index 138de35166..cb28eb952f 100755 --- a/bin/tools/buildParaView3.3-cvs +++ b/bin/tools/buildParaView3.3-cvs @@ -65,7 +65,8 @@ usage() { usage: ${0##*/} [OPTION] options: - -fast skip configure for repeated builds - use with caution + -fast for repeated builds (-make -abspath -install) *use with caution* + -abspath suppress the '-envpath' stage of changing the cmake files -mpi with mpi (if not already enabled) -python with python (if not already enabled) -mesa with mesa (if not already enabled) @@ -76,6 +77,7 @@ For finer control, the build stages can be also selected individually (mutually exclusive) -config -make + -envpath -install Build and install $PARAVIEW_SRC @@ -94,6 +96,7 @@ case "$Script" in *-mesa*) WITH_MESA=ON;; esac runCONFIG=true runMAKE=true +runENVPATH=true runINSTALL=true # parse options @@ -106,27 +109,42 @@ do -config) # stage 1: config only runCONFIG=true runMAKE=false + runENVPATH=false runINSTALL=false shift ;; -make) # stage 2: make only runCONFIG=false runMAKE=true + runENVPATH=false runINSTALL=false shift ;; - -install) # stage 3: install only + -envpath) # stage 3: alter paths to use env variables runCONFIG=false runMAKE=false + runENVPATH=true + runINSTALL=false + shift + ;; + -install) # stage 4: install only + runCONFIG=false + runMAKE=false + runENVPATH=false runINSTALL=true shift ;; -fast) # shortcut for rebuild runCONFIG=false runMAKE=true + runENVPATH=false runINSTALL=true shift ;; + -abspath) # suppress changing the cmake files + runENVPATH=false + shift + ;; -mpi) WITH_MPI=ON shift @@ -162,6 +180,7 @@ getPaths # discover where things are or should be put # ~~~~~~~~~~~~~~~~~ [ $runCONFIG = true ] && configParaView [ $runMAKE = true ] && makeParaView +[ $runENVPATH = true ] && fixCMakeFiles [ $runINSTALL = true ] && installParaView echo "done" diff --git a/bin/tools/buildParaViewFunctions b/bin/tools/buildParaViewFunctions index 77381e6998..dbbd73c1f3 100644 --- a/bin/tools/buildParaViewFunctions +++ b/bin/tools/buildParaViewFunctions @@ -266,11 +266,17 @@ fixHardLinks() } +# This triggers a partial rebuild, but might let us find our files fixCMakeFiles() { # change to build/install folder cd $ParaView_DIR || exit 1 + # change to build/install folder + cd $ParaView_DIR || exit 1 + + echo " Installing ParaView" + # Replace path with env variable: ParaView_DIR fixHardLinks ParaView_DIR "$ParaView_DIR" '*.cmake' @@ -291,9 +297,9 @@ fixCMakeFiles() # Replace path with env variable: WM_COMPILER_DIR # (include cmake.check_cache) - ## SKIP THIS - it (it always triggers a complete rebuild) - ## when using cmake-2.6.2 - ## fixHardLinks WM_COMPILER_DIR "$WM_COMPILER_DIR" '*cmake*' + # This triggers a complete rebuild (with cmake-2.6.2), but is likely + # needed when redistributing files + fixHardLinks WM_COMPILER_DIR "$WM_COMPILER_DIR" '*cmake*' } @@ -308,8 +314,6 @@ installParaView() cd $ParaView_DIR || exit 1 echo " Installing ParaView" - ## This triggers a partial rebuild, but might let us find our files - ## fixCMakeFiles # skip the normal 'make install' in favour of simply creating # a softlink to the $ParaView_DIR/bin folder