# HG changeset patch # User jwe # Date 1082613080 0 # Node ID 0358ed4394f58937d5e566c9dfff6a007842afd3 # Parent fe71c458f438af3db9430b13e88e1185dc8a5ff4 [project @ 2004-04-22 05:51:20 by jwe] diff -r fe71c458f438 -r 0358ed4394f5 ChangeLog --- a/ChangeLog Wed Apr 21 20:09:32 2004 +0000 +++ b/ChangeLog Thu Apr 22 05:51:20 2004 +0000 @@ -1,3 +1,8 @@ +2004-04-22 John W. Eaton + + * mkoctfile.in: Allow -Wx,option style options to be passed to the + compiler. From Al Niessner . + 2004-04-06 John W. Eaton * configure.in: Delete code for --with-ieee754. diff -r fe71c458f438 -r 0358ed4394f5 mkoctfile.in --- a/mkoctfile.in Wed Apr 21 20:09:32 2004 +0000 +++ b/mkoctfile.in Thu Apr 22 05:51:20 2004 +0000 @@ -74,6 +74,7 @@ defs= ldflags= dbg=: +pass_on_options= strip=false no_oct_file_strip_on_this_platform=%NO_OCT_FILE_STRIP% link=true @@ -160,6 +161,8 @@ -v, --verbose Echo commands as they are executed. + -W Pass flags though the compiler like -Wl,-rpath=... + FILE Compile or link FILE. Recognized file types are: .c C source @@ -217,6 +220,9 @@ --link-stand-alone) link_stand_alone=true ;; + -W*) + pass_on_options="$pass_on_options $1" + ;; *) echo "mkoctfile: unrecognized argument $1" 1>&2 exit 1 @@ -300,7 +306,7 @@ if [ -n "$F77" ]; then o=$b.o objfiles="$objfiles $o" - cmd="$F77 -c $FPICFLAG $ALL_FFLAGS $f -o $o" + cmd="$F77 -c $FPICFLAG $ALL_FFLAGS $pass_on_options $f -o $o" $dbg $cmd eval $cmd elif [ -n "$F2C" ]; then @@ -321,7 +327,7 @@ b=`echo $f | $SED 's,\.c$,,'` o=$b.o objfiles="$objfiles $o" - cmd="$CC -c $CPPFLAGS $CPICFLAG $ALL_CFLAGS $incflags $defs $f -o $o" + cmd="$CC -c $CPPFLAGS $CPICFLAG $ALL_CFLAGS $pass_on_options $incflags $defs $f -o $o" $dbg $cmd eval $cmd else @@ -346,7 +352,7 @@ esac o=$b.o objfiles="$objfiles $o" - cmd="$CXX -c $CPPFLAGS $CXXPICFLAG $ALL_CXXFLAGS $incflags $defs $f -o $o" + cmd="$CXX -c $CPPFLAGS $CXXPICFLAG $ALL_CXXFLAGS $pass_on_options $incflags $defs $f -o $o" $dbg $cmd eval $cmd else @@ -375,7 +381,7 @@ if $link; then if $link_stand_alone; then if [ -n "$LD_CXX" ]; then - cmd="$LD_CXX $CPPFLAGS $ALL_CXXFLAGS $RDYNAMIC_FLAG $ALL_LDFLAGS $output_option $objfiles $ldflags $LFLAGS $RLD_FLAG $OCTAVE_LIBS $BLAS_LIBS $FFTW_LIBS $LIBREADLINE $LIBS $FLIBS" + cmd="$LD_CXX $CPPFLAGS $ALL_CXXFLAGS $RDYNAMIC_FLAG $ALL_LDFLAGS $pass_on_options $output_option $objfiles $ldflags $LFLAGS $RLD_FLAG $OCTAVE_LIBS $BLAS_LIBS $FFTW_LIBS $LIBREADLINE $LIBS $FLIBS" $dbg $cmd eval $cmd else @@ -384,7 +390,7 @@ fi else LINK_DEPS="$LFLAGS $OCTAVE_LIBS $LDFLAGS $BLAS_LIBS $FFTW_LIBS $LIBS $FLIBS" - cmd="$DL_LD $DL_LDFLAGS -o $octfile $objfiles $ldflags $LINK_DEPS" + cmd="$DL_LD $DL_LDFLAGS $pass_on_options -o $octfile $objfiles $ldflags $LINK_DEPS" $dbg $cmd eval $cmd fi diff -r fe71c458f438 -r 0358ed4394f5 scripts/plot/hist.m --- a/scripts/plot/hist.m Wed Apr 21 20:09:32 2004 +0000 +++ b/scripts/plot/hist.m Thu Apr 22 05:51:20 2004 +0000 @@ -58,9 +58,8 @@ if (nargin == 1) n = 10; - delta = (max_val - min_val) / n / 2; - x = linspace (min_val+delta, max_val-delta, n); - cutoff = x + delta; + delta = (max_val - min_val) / (n-1) / 2; + cutoff = linspace (min_val+delta, max_val-delta, n-1); else ## nargin is either 2 or 3 if (isscalar (x)) @@ -68,9 +67,8 @@ if (n <= 0) error ("hist: number of bins must be positive"); endif - delta = (max_val - min_val) / n / 2; - x = linspace (min_val+delta, max_val-delta, n); - cutoff = x + delta; + delta = (max_val - min_val) / (n-1) / 2; + cutoff = linspace (min_val+delta, max_val-delta, n-1); elseif (isvector (x)) tmp = sort (x); if (any (tmp != x))