From: <aba...@us...> - 2012-07-03 12:35:21
|
Revision: 10714 http://octave.svn.sourceforge.net/octave/?rev=10714&view=rev Author: abarth93 Date: 2012-07-03 12:35:14 +0000 (Tue, 03 Jul 2012) Log Message: ----------- Modified Paths: -------------- trunk/octave-forge/main/octcdf/DESCRIPTION trunk/octave-forge/main/octcdf/inst/ncread.m trunk/octave-forge/main/octcdf/src/Makeconf.in trunk/octave-forge/main/octcdf/src/Makefile trunk/octave-forge/main/octcdf/src/configure.base Modified: trunk/octave-forge/main/octcdf/DESCRIPTION =================================================================== --- trunk/octave-forge/main/octcdf/DESCRIPTION 2012-07-03 12:06:21 UTC (rev 10713) +++ trunk/octave-forge/main/octcdf/DESCRIPTION 2012-07-03 12:35:14 UTC (rev 10714) @@ -1,6 +1,6 @@ Name: octcdf -Version: 1.1.4 -Date: 2012-02-17 +Version: 1.1.5 +Date: 2012-04-30 Author: Alexander Barth <bar...@gm...> Maintainer: Alexander Barth <bar...@gm...> Title: octcdf Modified: trunk/octave-forge/main/octcdf/inst/ncread.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/ncread.m 2012-07-03 12:06:21 UTC (rev 10713) +++ trunk/octave-forge/main/octcdf/inst/ncread.m 2012-07-03 12:35:14 UTC (rev 10714) @@ -21,14 +21,18 @@ stride = ones(1,nd); end +% replace inf in count +i = count == inf; +count(i) = (sz(i)-start(i))./stride(i) + 1; + % end index endi = start + (count-1).*stride; % replace inf in count -i = endi == inf; -endi(i) = sz(i); +%i = endi == inf; +%endi(i) = sz(i); % load data @@ -68,5 +72,5 @@ end x = permute(x,[ndims(x):-1:1]); - +x = reshape(x,count); close(nc) Modified: trunk/octave-forge/main/octcdf/src/Makeconf.in =================================================================== --- trunk/octave-forge/main/octcdf/src/Makeconf.in 2012-07-03 12:06:21 UTC (rev 10713) +++ trunk/octave-forge/main/octcdf/src/Makeconf.in 2012-07-03 12:35:14 UTC (rev 10714) @@ -36,18 +36,18 @@ # cannot use mkoctfile directly can request the flags that mkoctfile # would use as follows: # FLAG = $(shell $(MKOCTFILE) -p FLAG) -# The following flags are for compiling programs that are independent -# of Octave. How confusing. -CC = @CC@ -CFLAGS = @CFLAGS@ -CPPFLAGS = @CPPFLAGS@ -CPICFLAG = @CPICFLAG@ -CXX = @CXX@ -CXXFLAGS = @CXXFLAGS@ -CXXPICFLAG = @CXXPICFLAG@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -FPICFLAG = @FPICFLAG@ +# # The following flags are for compiling programs that are independent +# # of Octave. How confusing. +# CC = @CC@ +# CFLAGS = @CFLAGS@ +# CPPFLAGS = @CPPFLAGS@ +# CPICFLAG = @CPICFLAG@ +# CXX = @CXX@ +# CXXFLAGS = @CXXFLAGS@ +# CXXPICFLAG = @CXXPICFLAG@ +# F77 = @F77@ +# FFLAGS = @FFLAGS@ +# FPICFLAG = @FPICFLAG@ OCTAVE = @OCTAVE@ OCTAVE_VERSION = @OCTAVE_VERSION@ Modified: trunk/octave-forge/main/octcdf/src/Makefile =================================================================== --- trunk/octave-forge/main/octcdf/src/Makefile 2012-07-03 12:06:21 UTC (rev 10713) +++ trunk/octave-forge/main/octcdf/src/Makefile 2012-07-03 12:35:14 UTC (rev 10714) @@ -70,5 +70,4 @@ $(MFILES): nctype.m4 m4 --define=TYPE=$(patsubst nc%.m,%,$@) nctype.m4 > $@ -clean: ; -$(RM) *.o core* octave-core *.oct *~ *.nc - +clean: ; -$(RM) -R *.o core* octave-core *.oct *~ *.nc autom4te.cache Modified: trunk/octave-forge/main/octcdf/src/configure.base =================================================================== --- trunk/octave-forge/main/octcdf/src/configure.base 2012-07-03 12:06:21 UTC (rev 10713) +++ trunk/octave-forge/main/octcdf/src/configure.base 2012-07-03 12:35:14 UTC (rev 10714) @@ -152,41 +152,51 @@ dnl ******************************************************************* +dnl Get LDFLAGS and CPPFLAGS set by user +dnl These flags will be added to the mkoctfile command line +OCTCDF_LIBS="$LDFLAGS" +OCTCDF_CFLAGS="$CPPFLAGS" + + dnl XXX FIXME XXX Should we allow the user to override these? dnl Do we even need them? The individual makefiles can call mkoctfile -p dnl themselves, so the only reason to keep them is for configure, and dnl for those things which are not built using mkoctfile (e.g., aurecord) dnl but it is not clear we should be using octave compile flags for those. -dnl C compiler and flags -AC_MSG_RESULT([retrieving compile and link flags from $MKOCTFILE]) -CC=`$MKOCTFILE -p CC` -CFLAGS=`$MKOCTFILE -p CFLAGS` -CPPFLAGS=`$MKOCTFILE -p CPPFLAGS` -CPICFLAG=`$MKOCTFILE -p CPICFLAG` -LDFLAGS=`$MKOCTFILE -p LDFLAGS` -LIBS=`$MKOCTFILE -p LIBS` -AC_SUBST(CC) -AC_SUBST(CFLAGS) -AC_SUBST(CPPFLAGS) -AC_SUBST(CPICFLAG) +dnl octcdf does not need CFLAGS, CPPFLAGS,... from mkoctfile +dnl -> comment corresponding lines -dnl Fortran compiler and flags -F77=`$MKOCTFILE -p F77` -FFLAGS=`$MKOCTFILE -p FFLAGS` -FPICFLAG=`$MKOCTFILE -p FPICFLAG` -AC_SUBST(F77) -AC_SUBST(FFLAGS) -AC_SUBST(FPICFLAG) +# dnl C compiler and flags +# AC_MSG_RESULT([retrieving compile and link flags from $MKOCTFILE]) +# CC=`$MKOCTFILE -p CC` +# CFLAGS=`$MKOCTFILE -p CFLAGS` +# CPPFLAGS=`$MKOCTFILE -p CPPFLAGS` +# CPPFLAGS="not used" +# CPICFLAG=`$MKOCTFILE -p CPICFLAG` +# LDFLAGS=`$MKOCTFILE -p LDFLAGS` +# LIBS=`$MKOCTFILE -p LIBS` +# AC_SUBST(CC) +# AC_SUBST(CFLAGS) +# AC_SUBST(CPPFLAGS) +# AC_SUBST(CPICFLAG) -dnl C++ compiler and flags -CXX=`$MKOCTFILE -p CXX` -CXXFLAGS=`$MKOCTFILE -p CXXFLAGS` -CXXPICFLAG=`$MKOCTFILE -p CXXPICFLAG` -AC_SUBST(CXX) -AC_SUBST(CXXFLAGS) -AC_SUBST(CXXPICFLAG) +# dnl Fortran compiler and flags +# F77=`$MKOCTFILE -p F77` +# FFLAGS=`$MKOCTFILE -p FFLAGS` +# FPICFLAG=`$MKOCTFILE -p FPICFLAG` +# AC_SUBST(F77) +# AC_SUBST(FFLAGS) +# AC_SUBST(FPICFLAG) +# dnl C++ compiler and flags +# CXX=`$MKOCTFILE -p CXX` +# CXXFLAGS=`$MKOCTFILE -p CXXFLAGS` +# CXXPICFLAG=`$MKOCTFILE -p CXXPICFLAG` +# AC_SUBST(CXX) +# AC_SUBST(CXXFLAGS) +# AC_SUBST(CXXPICFLAG) + dnl ******************************************************************* dnl Check for features of your version of mkoctfile. @@ -298,13 +308,6 @@ ;; esac -AC_SUBST(HAVE_NETCDF) -AC_SUBST(OCTCDF_LIBS) -AC_SUBST(OCTCDF_CFLAGS) - -OCTCDF_LIBS="$LDFLAGS" -OCTCDF_CFLAGS="$CPPFLAGS" - dnl first checking for nc-config, then nc-dap AC_MSG_CHECKING([for nc-config]) @@ -328,6 +331,7 @@ AC_MSG_RESULT([no]) dnl if no opendap, checking if the NetCDF library exists. + dnl AC_CHECK_LIB takes the value of LDFLAGS into account AC_CHECK_LIB(netcdf,nc_open, HAVE_NETCDF=yes, HAVE_NETCDF=no,) @@ -335,11 +339,17 @@ OCTCDF_LIBS="$OCTCDF_LIBS -lnetcdf" dnl we have the libraries, no we have also the headers? + dnl AC_CHECK_HEADER takes the value of CPPFLAGS into account + AC_CHECK_HEADER(netcdf.h, HAVE_NETCDF=yes, HAVE_NETCDF=no) fi fi fi +AC_SUBST(HAVE_NETCDF) +AC_SUBST(OCTCDF_LIBS) +AC_SUBST(OCTCDF_CFLAGS) + if test $HAVE_NETCDF = yes ; then OCTCDFSTATUS=yes else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |