Mercurial > hg > octave-terminal
changeset 4873:0358ed4394f5
[project @ 2004-04-22 05:51:20 by jwe]
author | jwe |
---|---|
date | Thu, 22 Apr 2004 05:51:20 +0000 |
parents | fe71c458f438 |
children | c69a6a16932b |
files | ChangeLog mkoctfile.in scripts/plot/hist.m |
diffstat | 3 files changed, 20 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-04-22 John W. Eaton <jwe@octave.org> + + * mkoctfile.in: Allow -Wx,option style options to be passed to the + compiler. From Al Niessner <Al.Niessner@jpl.nasa.gov>. + 2004-04-06 John W. Eaton <jwe@bevo.che.wisc.edu> * configure.in: Delete code for --with-ieee754.
--- a/mkoctfile.in +++ b/mkoctfile.in @@ -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
--- a/scripts/plot/hist.m +++ b/scripts/plot/hist.m @@ -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))