|
[Rivet-svn] r2740 - trunk/binblackhole at projects.hepforge.org blackhole at projects.hepforge.orgFri Oct 29 18:16:20 BST 2010
Author: buckley Date: Fri Oct 29 18:16:19 2010 New Revision: 2740 Log: Better version which also extracts @CXXFLAGS@ and the appropriate CPPFLAGS, and also uses the user env values of CXXFLAGS and CPPFLAGS in the build. No calls to rivet-config now. Further improvements? Modified: trunk/bin/rivet-buildplugin.in Modified: trunk/bin/rivet-buildplugin.in ============================================================================== --- trunk/bin/rivet-buildplugin.in Fri Oct 29 18:06:25 2010 (r2739) +++ trunk/bin/rivet-buildplugin.in Fri Oct 29 18:16:19 2010 (r2740) @@ -36,15 +36,34 @@ fi ## Get Rivet system C++ compiler (fall back to $CXX and then g++ if needed) -MYCXX=g++ -RIVETCXX=$(which "@CXX@" 2> /dev/null) -ABSCXX=$(which "$CXX" 2> /dev/null) -if [[ -x "$RIVETCXX" ]]; then - MYCXX="@CXX@" -elif [[ -x "$ABSCXX" ]]; then - MYCXX=$CXX +mycxx=g++ +rivetcxx=$(which "@CXX@" 2> /dev/null) +abscxx=$(which "$CXX" 2> /dev/null) +if [[ -x "$rivetcxx" ]]; then + mycxx="@CXX@" +elif [[ -x "$abscxx" ]]; then + mycxx=$CXX fi +## Get Rivet system C++ compiler flags +mycxxflags="" +if [[ -n "@CXXFLAGS@" ]]; then + mycxxflags="@CXXFLAGS@" +fi + +## Get Rivet system C preprocessor flags (duplicating that in rivet-config.in) +mycppflags="" +irivet="@includedir@" +test -n "$irivet" && mycppflags="$mycppflags -I${irivet}" +ihepmc="@HEPMCINCPATH@" +test -n "$ihepmc" && mycppflags="$mycppflags -I${ihepmc}" +ifastjet="@FASTJETINCPATH@" +test -n "$ifastjet" && mycppflags="$mycppflags -I${ifastjet}" +igsl="@GSLINCPATH@" +test -n "$igsl" && mycppflags="$mycppflags -I${igsl}" +iboost="@BOOSTINCPATH@" +test -n "$iboost" && mycppflags="$mycppflags -I${iboost}" + ## Link against ROOT if requested with_root=$(echo $* | egrep -- '--\<with-root\>') # echo $with_root @@ -69,11 +88,7 @@ sources_and_flags="$root_flags $sources_and_flags" fi -## Get Rivet include flags -RIVETCONFIG=$(PATH="`dirname $0`:$PATH:." which rivet-config) -cppflags=$($RIVETCONFIG --cppflags) - ## Build -cmd="$MYCXX -o \"$libname\" $shared_flags $cppflags $sources_and_flags" +cmd="$mycxx -o \"$libname\" $shared_flags $mycppflags $mycxxflags $CPPFLAGS $CXXFLAGS $sources_and_flags" echo $cmd eval $cmd
More information about the Rivet-svn mailing list |