# HG changeset patch # User jwe # Date 1141963043 0 # Node ID 7b45fda215571d34ddabc12b01a8b223d86771b8 # Parent fb1de6e6343bbd65f254af8efd36799993f930af [project @ 2006-03-10 03:57:23 by jwe] diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,15 @@ +2006-03-09 John W. Eaton + + * Makeconf.in (do-subst-default-vals): Also substitute OCTAVE_RELEASE. + 2006-03-08 David Bateman * configure.in: Update the test for CXSPARSE for new upstream release. (OCTAVE_VERSION, OCTAVE_HOSTTYPE, OCTAVE_HOME,TEXINFO_UMFPACK, TEXINFO_COLAMD, TEXINFO_CHOLMOD): New variables for texinfo documentation. - (AC_CONFIG_FILES): Add doc/conf.texi and doc/interpreter/images/Makefile. + (AC_CONFIG_FILES): Add doc/interpreter/images/Makefile and + doc/conf.texi. 2006-03-02 Kurt Hornik diff --git a/Makeconf.in b/Makeconf.in --- a/Makeconf.in +++ b/Makeconf.in @@ -30,7 +30,7 @@ xfiles := $(TOPDIR)/src/version.h $(srcdir)/$(TOPDIR)/src/version.h version_file := $(firstword $(foreach file, $(xfiles), $(wildcard $(file)))) version := $(shell $(getversion) $(version_file)) -apiversion := $(shell $(getapiversion) $(version_file)) +api_version := $(shell $(getapiversion) $(version_file)) #### Start of system configuration section. #### @@ -534,7 +534,8 @@ -e "s|%OCTAVE_OCTLIBDIR%|\"${octlibdir}\"|" \ -e "s|%OCTAVE_STARTUPFILEDIR%|\"${startupfiledir}\"|" \ -e "s|%OCTAVE_PREFIX%|\"${prefix}\"|" \ - -e "s|%OCTAVE_API_VERSION%|\"${apiversion}\"|" \ + -e "s|%OCTAVE_API_VERSION%|\"${api_version}\"|" \ + -e "s|%OCTAVE_RELEASE%|\"${OCTAVE_RELEASE}\"|" \ -e "s|%OCTAVE_VERSION%|\"${version}\"|" $(top_srcdir)/move-if-change $@-t $@ endef diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2006-03-09 John W. Eaton + * defaults.h.in (OCTAVE_RELEASE): New macro. + + * octave.cc (F__version_info__): New arg, release. + (initialize_version_info): Pass release arg to F__version_info__. + * toplev.cc: Include api_version in the list. * Makefile.in (DIST_SRC): Include octave.cc here. diff --git a/src/Makefile.in b/src/Makefile.in --- a/src/Makefile.in +++ b/src/Makefile.in @@ -535,12 +535,21 @@ __gnuplot_raw__.cc : DLD-FUNCTIONS/__gnuplot_raw__.l $(LEX) $(LFLAGS) $< > $(@F) -defaults.h: defaults.h.in ../Makeconf Makefile +## We want to force an update of defaults.h and oct-conf.h every +## time make is run because some values may come from the command +## line or the environment. The substitution rules use move-if-change, +## so this should not cause trouble if the file already exists and the +## newly generated file is not different. + +defaults.h: defaults.h.in ../Makeconf Makefile FORCE @$(do-subst-default-vals) -oct-conf.h: oct-conf.h.in ../Makeconf Makefile +oct-conf.h: oct-conf.h.in ../Makeconf Makefile FORCE @$(do-subst-config-vals) +FORCE: +.PHONY: FORCE + oct-errno.cc: oct-errno.cc.in ../Makeconf Makefile @echo "making $@ from $<" @if test -n "$(PERL)"; then \ diff --git a/src/defaults.h.in b/src/defaults.h.in --- a/src/defaults.h.in +++ b/src/defaults.h.in @@ -169,6 +169,10 @@ #define OCTAVE_STARTUPFILEDIR %OCTAVE_STARTUPFILEDIR% #endif +#ifndef OCTAVE_RELEASE +#define OCTAVE_RELEASE %OCTAVE_RELEASE% +#endif + extern std::string Voctave_home; extern std::string Vbin_dir; diff --git a/src/octave.cc b/src/octave.cc --- a/src/octave.cc +++ b/src/octave.cc @@ -212,7 +212,7 @@ DEFUN (__version_info__, args, , "-*- texinfo -*-\n\ -@deftypefn {Function File} {retval =} __version_info__ (@var{name}, @var{version}, @var{date})\n\ +@deftypefn {Function File} {retval =} __version_info__ (@var{name}, @var{version}, @var{release}, @var{date})\n\ @end deftypefn") { octave_value retval; @@ -221,14 +221,14 @@ int nargin = args.length (); - if (nargin == 3) + if (nargin == 4) { octave_value idx (vinfo.numel () + 1); vinfo.assign (idx, "Name", Cell (octave_value (args (0)))); vinfo.assign (idx, "Version", Cell (octave_value (args (1)))); - vinfo.assign (idx, "Release", Cell (octave_value (args (1)))); - vinfo.assign (idx, "Date", Cell (octave_value (args (2)))); + vinfo.assign (idx, "Release", Cell (octave_value (args (2)))); + vinfo.assign (idx, "Date", Cell (octave_value (args (3)))); } else if (nargin == 0) retval = vinfo; @@ -243,7 +243,8 @@ { octave_value_list args; - args(2) = OCTAVE_RELEASE_DATE; + args(3) = OCTAVE_RELEASE_DATE; + args(2) = OCTAVE_RELEASE; args(1) = OCTAVE_VERSION; args(0) = "GNU Octave";