|
[Rivet-svn] r3425 - in branches/2011-07-aida2yoda: . binblackhole at projects.hepforge.org blackhole at projects.hepforge.orgThu Oct 6 22:24:09 BST 2011
Author: hoeth Date: Thu Oct 6 22:24:09 2011 New Revision: 3425 Log: merge r3392 from trunk. Korinna Zapp reported that this is broken. Modified: branches/2011-07-aida2yoda/ChangeLog branches/2011-07-aida2yoda/bin/rivet-buildplugin.in Modified: branches/2011-07-aida2yoda/ChangeLog ============================================================================== --- branches/2011-07-aida2yoda/ChangeLog Thu Oct 6 22:20:28 2011 (r3424) +++ branches/2011-07-aida2yoda/ChangeLog Thu Oct 6 22:24:09 2011 (r3425) @@ -1,3 +1,9 @@ +2011-09-26 Andy Buckley <andy at insectnation.org> + + * Adding a default libname argument to rivet-buildplugin. If the + first argument doesn't have a .so library suffix, then use + RivetAnalysis.so as the default. + 2011-09-19 Hendrik Hoeth <hendrik.hoeth at cern.ch> * make-plots: Fixing regex for \physicscoor. Adding "FrameColor" Modified: branches/2011-07-aida2yoda/bin/rivet-buildplugin.in ============================================================================== --- branches/2011-07-aida2yoda/bin/rivet-buildplugin.in Thu Oct 6 22:20:28 2011 (r3424) +++ branches/2011-07-aida2yoda/bin/rivet-buildplugin.in Thu Oct 6 22:24:09 2011 (r3425) @@ -4,13 +4,14 @@ ## Print help PROG=$(basename $0) -tmp=$(echo $* | egrep -- '--\<help\>|-\<h\>') -if test $# -lt 2 || test -n "$tmp"; then +tmp=$(echo $* |& egrep -- '--\<help\>|-\<h\>') +if test $# -lt 1 || test -n "$tmp"; then echo "$PROG: compilation helper for Rivet analysis plugins" echo - echo "Usage: $PROG <libname> <source1> [<source2> [compiler_flags] ...]" + echo "Usage: $PROG [<libname>] <source1> [<source2> [compiler_flags] ...]" echo echo "<libname> can be a path, provided the filename is of the form 'Rivet*.so'" + echo "If <libname> is not specified, the default name is 'RivetAnalysis.so'." echo echo "To make special build variations you can add appropriate compiler flags" echo "to the arguments and these will be passed directly to the compiler. For" @@ -20,6 +21,9 @@ echo "Options:" echo " -h | --help: display this help message" echo " --with-root: add ROOT link options (requires root-config on system)" + echo + echo "TODO:" + echo " * is there a GCC option to parallelise the single-command compilation?" test -n "$tmp" exit $? fi @@ -77,14 +81,22 @@ ## Get and check the library name libname=$1 -match=$(basename "$libname" | egrep '^Rivet.*\.so') -if test -z "$match"; then - echo "Library name '$libname' does not have the required 'Rivet*.so' name pattern" 1>&2 - exit 1 +match1=$(basename "$libname" |& egrep '^.*\.so') +match2=$(basename "$libname" |& egrep '^Rivet.*\.so') +if test -n "$match1"; then + if test -z "$match2"; then + echo "Library name '$libname' does not have the required 'Rivet*.so' name pattern" 1>&2 + exit 1 + fi + ## If we're using the first arg as the library name, shift it off the positional list + shift +else + echo "Using default library name 'RivetAnalysis.so'" + libname="RivetAnalysis.so" fi + ## Get the source files (and more flags) -shift sources_and_flags="$@" if [[ -n $with_root ]]; then root_flags=$(root-config --libs --cflags 2> /dev/null)
More information about the Rivet-svn mailing list |