Skip to content

Commit

Permalink
print build timing information in VERBOSE mode
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.cactuscode.org/projects/ExternalLibraries/LORENE/trunk@78 5c1b1641-b641-47ec-b3d9-0f93d4c445ee
  • Loading branch information
knarf committed Oct 4, 2016
1 parent 1ba3319 commit d879015
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ if [ "$(echo ${VERBOSE} | tr '[:upper:]' '[:lower:]')" = 'yes' ]; then
fi
set -e # Abort on errors


function printtime() {
if [ "$(echo ${VERBOSE} | tr '[:upper:]' '[:lower:]')" = 'yes' ]; then
perl -e 'eval { require("Time/HiRes.pm"); print(&Time::HiRes::gettimeofday()+0," "); }; if($@) { print time(); }'
fi
}

# Set locations
THORN=LORENE
Expand Down Expand Up @@ -116,13 +120,15 @@ EOF
if [ -n "$XARGS" ]; then echo "XARGS = $XARGS" >> local_settings; fi
if [ -n "$FIND" ]; then echo "FIND = $FIND" >> local_settings; fi

printtime
echo "LORENE: Building..."
# Note that this builds two versions of the library, a "regular"
# version and a "debug" version. Both are identical (since we
# specified identical build options above), and we ignore the "debug"
# version.
${MAKE} cpp fortran export

printtime
echo "LORENE: Installing..."
mv ${BUILD_DIR}/${NAME}/Lib ${INSTALL_DIR}
mkdir ${INSTALL_DIR}/C++
Expand Down

0 comments on commit d879015

Please sign in to comment.