Mercurial > hg > octave-lyh
changeset 4759:364bbf35dbfa
[project @ 2004-02-15 00:08:06 by jwe]
author | jwe |
---|---|
date | Sun, 15 Feb 2004 00:08:07 +0000 |
parents | a308566c8b42 |
children | 8ece12f60ba2 |
files | ChangeLog Makeconf.in configure.in liboctave/Array.cc liboctave/ChangeLog mkoctfile.in src/ChangeLog src/Makefile.in src/oct-conf.h.in src/ov-base-scalar.h src/toplev.cc |
diffstat | 11 files changed, 125 insertions(+), 28 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,24 @@ +2004-02-14 John W. Eaton <jwe@bevo.che.wisc.edu> + + * mkoctfile (SH_LD, SH_LDFLAGS): Delete. + (DL_LD, DL_LDFLAGS): New variables. Use them instead of SH_LD and + SH_LDFLAGS for creating .oct files. + Fix help text. + + * configure.in (MKOCTFILE_SH_LDFLAGS): Delete. + (MKOCTFILE_DL_LDFLAGS): New variable, default to DL_LDFLAGS. + + * Makeconf.in (do-subst-config-vals): Add DL_LD, DL_LDFLAGS, and + MKOCTFILE_DL_LDFLAGS to the list of substitutions. + Delete MKOCTFILE_SH_LDFLAGS. + +2004-02-14 Per Persson <persquare@mac.com> + + * configure.in (DL_LD, DL_LDFLAGS): New variables, default to + SH_LD and SH_LDFLAGS, respectively. + Define independently for SH_LD and SH_LDFLAGS for *-*-darwin* targets. + * Makeconf.in (DL_LD, DL_LDFLAGS): Substitute them here. + 2004-02-13 John W. Eaton <jwe@bevo.che.wisc.edu> * Makefile.in (header-msg): Required bison version now 1.31 or later.
--- a/Makeconf.in +++ b/Makeconf.in @@ -158,6 +158,9 @@ SH_LD = @SH_LD@ SH_LDFLAGS = @SH_LDFLAGS@ +DL_LD = @DL_LD@ +DL_LDFLAGS = @DL_LDFLAGS@ + SONAME_FLAGS = @SONAME_FLAGS@ RDYNAMIC_FLAG = @RDYNAMIC_FLAG@ @@ -311,7 +314,7 @@ # The -L flags to use for the mkoctfile scrip (for --link-stand-alone) MKOCTFILE_LFLAGS = -L$(octlibdir) -MKOCTFILE_SH_LDFLAGS = @MKOCTFILE_SH_LDFLAGS@ +MKOCTFILE_DL_LDFLAGS = @MKOCTFILE_DL_DFLAGS@ NO_OCT_FILE_STRIP = @NO_OCT_FILE_STRIP@ @@ -408,6 +411,8 @@ -e "s;%OCTAVE_CONF_DEPEND_FLAGS%;\"${DEPEND_FLAGS}\";" \ -e "s;%OCTAVE_CONF_DEPEND_EXTRA_SED_PATTERN%;\"${DEPEND_EXTRA_SED_PATTERN}\";" \ -e "s;%OCTAVE_CONF_DLFCN_INCFLAGS%;\"${DLFCN_INCFLAGS}\";" \ + -e "s;%OCTAVE_CONF_DL_LD%;\"${DL_LD}\";" \ + -e "s;%OCTAVE_CONF_DL_LDFLAGS%;\"${DL_LDFLAGS}\";" \ -e "s;%OCTAVE_CONF_EXEEXT%;\"${EXEEXT}\";" \ -e "s;%OCTAVE_CONF_F2C%;\"${F2C}\";" \ -e "s;%OCTAVE_CONF_F2CFLAGS%;\"${F2CFLAGS}\";" \ @@ -437,9 +442,9 @@ -e "s;%OCTAVE_CONF_LIBREADLINE%;\"${LIBREADLINE}\";" \ -e "s;%OCTAVE_CONF_LIBS%;\"${LIBS}\";" \ -e "s;%OCTAVE_CONF_LN_S%;\"${LN_S}\";" \ + -e "s;%OCTAVE_CONF_MKOCTFILE_DL_LDFLAGS%;\"${MKOCTFILE_DL_LDFLAGS}\";" \ -e "s;%OCTAVE_CONF_MKOCTFILE_INCFLAGS%;\"${MKOCTFILE_INCFLAGS}\";" \ -e "s;%OCTAVE_CONF_MKOCTFILE_LFLAGS%;\"${MKOCTFILE_LFLAGS}\";" \ - -e "s;%OCTAVE_CONF_MKOCTFILE_SH_LDFLAGS%;\"${MKOCTFILE_SH_LDFLAGS}\";" \ -e "s;%OCTAVE_CONF_RANLIB%;\"${RANLIB}\";" \ -e "s;%OCTAVE_CONF_RDYNAMIC_FLAG%;\"${RDYNAMIC_FLAG}\";" \ -e "s;%OCTAVE_CONF_RLD_FLAG%;\"${RLD_FLAG}\";" \
--- a/configure.in +++ b/configure.in @@ -29,7 +29,7 @@ EXTERN_CXXFLAGS="$CXXFLAGS" AC_INIT -AC_REVISION($Revision: 1.443 $) +AC_REVISION($Revision: 1.444 $) AC_PREREQ(2.57) AC_CONFIG_SRCDIR([src/octave.cc]) AC_CONFIG_HEADER(config.h) @@ -665,7 +665,9 @@ SHLLINKEXT= SH_LD='$(CXX)' SH_LDFLAGS=-shared -MKOCTFILE_SH_LDFLAGS='$(SH_LDFLAGS)' +DL_LD='$(SH_LD)' +DL_LDFLAGS='$(SH_LDFLAGS)' +MKOCTFILE_DL_LDFLAGS='$(DL_LDFLAGS)' SONAME_FLAGS= RLD_FLAG= NO_OCT_FILE_STRIP=false @@ -690,13 +692,19 @@ RLD_FLAG='-Wl,-rpath -Wl,$(octlibdir)' ;; *-*-darwin*) - SH_LDFLAGS='-bundle -bundle_loader $(TOPDIR)/src/octave' - MKOCTFILE_SH_LDFLAGS='-bundle -bundle_loader $(bindir)/octave-$(version)$(EXEEXT)' + DL_LDFLAGS='-bundle -bundle_loader $(TOPDIR)/src/octave $(LDFLAGS)' + MKOCTFILE_DL_LDFLAGS='-bundle -bundle_loader $(bindir)/octave-$(version)$(EXEEXT)' + SH_LDFLAGS='-dynamiclib -single_module $(LDFLAGS)' CXXPICFLAG= CPICFLAG= FPICFLAG= + SHLEXT=dylib + SHLLIB='$(SHLEXT)' + SHLEXT_VER='$(version).$(SHLEXT)' + SHLLIB_VER='$(version).$(SHLLIB)' INCLUDE_LINK_DEPS=true NO_OCT_FILE_STRIP=true + library_path_var=DYLD_LIBRARY_PATH ;; *-*-cygwin* | *-*-mingw*) CXXPICFLAG= @@ -802,7 +810,9 @@ AC_MSG_RESULT([defining DLFCN_DIR to be $DLFCN_DIR]) AC_MSG_RESULT([defining SH_LD to be $SH_LD]) AC_MSG_RESULT([defining SH_LDFLAGS to be $SH_LDFLAGS]) -AC_MSG_RESULT([defining MKOCTFILE_SH_LDFLAGS to be $MKOCTFILE_SH_LDFLAGS]) +AC_MSG_RESULT([defining DL_LD to be $DL_LD]) +AC_MSG_RESULT([defining DL_LDFLAGS to be $DL_LDFLAGS]) +AC_MSG_RESULT([defining MKOCTFILE_DL_LDFLAGS to be $MKOCTFILE_DL_LDFLAGS]) AC_MSG_RESULT([defining SONAME_FLAGS to be $SONAME_FLAGS]) AC_MSG_RESULT([defining NO_OCT_FILE_STRIP to be $NO_OCT_FILE_STRIP]) AC_MSG_RESULT([defining RLD_FLAG to be $RLD_FLAG]) @@ -823,7 +833,9 @@ AC_SUBST(DLFCN_DIR) AC_SUBST(SH_LD) AC_SUBST(SH_LDFLAGS) -AC_SUBST(MKOCTFILE_SH_LDFLAGS) +AC_SUBST(DL_LD) +AC_SUBST(DL_LDFLAGS) +AC_SUBST(MKOCTFILE_DL_LDFLAGS) AC_SUBST(SONAME_FLAGS) AC_SUBST(NO_OCT_FILE_STRIP) AC_SUBST(RLD_FLAG)
--- a/liboctave/Array.cc +++ b/liboctave/Array.cc @@ -76,10 +76,35 @@ if (dims_changed) { - if (k == 0) - new_dimensions = dim_vector (1); - else - new_dimensions.resize (k); + switch (k) + { + case 0: + new_dimensions = dim_vector (1, 1); + break; + + case 1: + { + int tmp = new_dimensions(0); + + new_dimensions.resize (2); + + if (dimensions(0) == 1) + { + new_dimensions(0) = 1; + new_dimensions(1) = tmp; + } + else + { + new_dimensions(0) = tmp; + new_dimensions(1) = 1; + } + } + break; + + default: + new_dimensions.resize (k); + break; + } retval.make_unique ();
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,8 @@ +2004-02-14 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Array.cc (Array<T>::squeeze): Always return an array with at + least two dimensions. + 2004-02-13 Petter Risholm <risholm@stud.ntnu.no> * mx-inlines.cc (MX_ND_CAT): New macro.
--- a/mkoctfile.in +++ b/mkoctfile.in @@ -31,8 +31,8 @@ : ${DEPEND_FLAGS=%OCTAVE_CONF_DEPEND_FLAGS%} : ${DEPEND_EXTRA_SED_PATTERN=%OCTAVE_CONF_DEPEND_EXTRA_SED_PATTERN%} -: ${SH_LD=%OCTAVE_CONF_SH_LD%} -: ${SH_LDFLAGS=%OCTAVE_CONF_MKOCTFILE_SH_LDFLAGS%} +: ${DL_LD=%OCTAVE_CONF_DL_LD%} +: ${DL_LDFLAGS=%OCTAVE_CONF_MKOCTFILE_DL_LDFLAGS%} : ${RLD_FLAG=%OCTAVE_CONF_RLD_FLAG%} : ${RDYNAMIC_FLAG=%OCTAVE_CONF_RDYNAMIC_FLAG%} @@ -143,8 +143,8 @@ F77 XTRA_CFLAGS FFLAGS XTRA_CXXFLAGS FPICFLAG SHLEXT - CC SH_LD - CFLAGS SH_LDFLAGS + CC DL_LD + CFLAGS DL_LDFLAGS INCLUDE_LINK_DEPS @@ -390,7 +390,7 @@ if $INCLUDE_LINK_DEPS ; then LINK_DEPS="$LFLAGS $LIBOCTAVE $LIBCRUFT $LIBOCTINTERP $BLAS_LIBS $FFTW_LIBS" fi - cmd="$SH_LD $SH_LDFLAGS -o $octfile $objfiles $ldflags $LINK_DEPS" + cmd="$DL_LD $DL_LDFLAGS -o $octfile $objfiles $ldflags $LINK_DEPS" $dbg $cmd eval $cmd fi
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,20 @@ +2004-02-14 John W. Eaton <jwe@bevo.che.wisc.edu> + + * oct-conf.h.in: Add OCTAVE_CONF_DL_LD, OCTAVE_CONF_DL_LDFLAGS, + and OCTAVE_CONF_MKOCTFILE_DL_LDFLAGS. + Delete OCTAVE_CONF_MKOCTFILE_SH_LDFLAGS. + + * toplev.cc (octave_config_info): Delete MKOCTFILE_SH_LDFLAGS. + Add DL_LD, DL_LDFLAGS, and MKOCTFILE_DL_LDFLAGS to the struct. + +2004-02-14 Per Persson <persquare@mac.com> + + * Makefile.in (%.oct): Use DL_LD instead of SH_LD to build .oct files. + +2004-02-14 John W. Eaton <jwe@bevo.che.wisc.edu> + + * ov-base-scalar.h (octave_base_scalar::squeeze): New function. + 2004-02-13 Petter Risholm <risholm@stud.ntnu.no> * data.cc (Fcat): New function.
--- a/src/Makefile.in +++ b/src/Makefile.in @@ -32,10 +32,10 @@ ifeq ($(ENABLE_DYNAMIC_LINKING), true) ifdef CXXPICFLAG %.oct : pic/%.o octave$(EXEEXT) - $(SH_LD) $(SH_LDFLAGS) -o $@ $< $(OCT_LINK_DEPS) + $(DL_LD) $(DL_LDFLAGS) -o $@ $< $(OCT_LINK_DEPS) else %.oct : %.o octave$(EXEEXT) - $(SH_LD) $(SH_LDFLAGS) -o $@ $< $(OCT_LINK_DEPS) + $(DL_LD) $(DL_LDFLAGS) -o $@ $< $(OCT_LINK_DEPS) endif endif
--- a/src/oct-conf.h.in +++ b/src/oct-conf.h.in @@ -104,6 +104,14 @@ #define OCTAVE_CONF_DLFCN_INCFLAGS %OCTAVE_CONF_DLFCN_INCFLAGS% #endif +#ifndef OCTAVE_CONF_DL_LD +#define OCTAVE_CONF_DL_LD %OCTAVE_CONF_DL_LD% +#endif + +#ifndef OCTAVE_CONF_DL_LDFLAGS +#define OCTAVE_CONF_DL_LDFLAGS %OCTAVE_CONF_DL_LDFLAGS% +#endif + #ifndef OCTAVE_CONF_EXEEXT #define OCTAVE_CONF_EXEEXT %OCTAVE_CONF_EXEEXT% #endif @@ -216,6 +224,10 @@ #define OCTAVE_CONF_LN_S %OCTAVE_CONF_LN_S% #endif +#ifndef OCTAVE_CONF_MKOCTFILE_DL_LDFLAGS +#define OCTAVE_CONF_MKOCTFILE_DL_LDFLAGS %OCTAVE_CONF_MKOCTFILE_DL_LDFLAGS% +#endif + #ifndef OCTAVE_CONF_MKOCTFILE_INCFLAGS #define OCTAVE_CONF_MKOCTFILE_INCFLAGS %OCTAVE_CONF_MKOCTFILE_INCFLAGS% #endif @@ -224,10 +236,6 @@ #define OCTAVE_CONF_MKOCTFILE_LFLAGS %OCTAVE_CONF_MKOCTFILE_LFLAGS% #endif -#ifndef OCTAVE_CONF_MKOCTFILE_SH_LDFLAGS -#define OCTAVE_CONF_MKOCTFILE_SH_LDFLAGS %OCTAVE_CONF_MKOCTFILE_SH_LDFLAGS% -#endif - #ifndef OCTAVE_CONF_RANLIB #define OCTAVE_CONF_RANLIB %OCTAVE_CONF_RANLIB% #endif @@ -260,14 +268,14 @@ #define OCTAVE_CONF_SHLEXT_VER %OCTAVE_CONF_SHLEXT_VER% #endif +#ifndef OCTAVE_CONF_SH_LD +#define OCTAVE_CONF_SH_LD %OCTAVE_CONF_SH_LD% +#endif + #ifndef OCTAVE_CONF_SH_LDFLAGS #define OCTAVE_CONF_SH_LDFLAGS %OCTAVE_CONF_SH_LDFLAGS% #endif -#ifndef OCTAVE_CONF_SH_LD -#define OCTAVE_CONF_SH_LD %OCTAVE_CONF_SH_LD% -#endif - #ifndef OCTAVE_CONF_SONAME_FLAGS #define OCTAVE_CONF_SONAME_FLAGS %OCTAVE_CONF_SONAME_FLAGS% #endif
--- a/src/ov-base-scalar.h +++ b/src/ov-base-scalar.h @@ -59,6 +59,8 @@ ~octave_base_scalar (void) { } + octave_value squeeze (void) const { return scalar; } + octave_value subsref (const std::string& type, const std::list<octave_value_list>& idx);
--- a/src/toplev.cc +++ b/src/toplev.cc @@ -653,6 +653,8 @@ "CXXPICFLAG", OCTAVE_CONF_CXXPICFLAG, "CXX_VERSION", OCTAVE_CONF_CXX_VERSION, "DEFAULT_PAGER", OCTAVE_DEFAULT_PAGER, + "DL_LD", OCTAVE_CONF_DL_LD, + "DL_LDFLAGS", OCTAVE_CONF_DL_LDFLAGS, "DLFCN_INCFLAGS", OCTAVE_CONF_DLFCN_INCFLAGS, "EXEEXT", OCTAVE_CONF_EXEEXT, "F2C", OCTAVE_CONF_F2C, @@ -684,7 +686,7 @@ "LN_S", OCTAVE_CONF_LN_S, "MKOCTFILE_INCFLAGS", OCTAVE_CONF_MKOCTFILE_INCFLAGS, "MKOCTFILE_LFLAGS", OCTAVE_CONF_MKOCTFILE_LFLAGS, - "MKOCTFILE_SH_LDFLAGS", OCTAVE_CONF_MKOCTFILE_SH_LDFLAGS, + "MKOCTFILE_DL_LDFLAGS", OCTAVE_CONF_MKOCTFILE_DL_LDFLAGS, "RANLIB", OCTAVE_CONF_RANLIB, "RDYNAMIC_FLAG", OCTAVE_CONF_RDYNAMIC_FLAG, "RLD_FLAG", OCTAVE_CONF_RLD_FLAG,