changeset 5658:7b45fda21557

[project @ 2006-03-10 03:57:23 by jwe]
author jwe
date Fri, 10 Mar 2006 03:57:23 +0000
parents fb1de6e6343b
children 960f4b9a26af
files ChangeLog Makeconf.in src/ChangeLog src/Makefile.in src/defaults.h.in src/octave.cc
diffstat 6 files changed, 35 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Mar 09 19:21:39 2006 +0000
+++ b/ChangeLog	Fri Mar 10 03:57:23 2006 +0000
@@ -1,10 +1,15 @@
+2006-03-09  John W. Eaton  <jwe@octave.org>
+
+	* Makeconf.in (do-subst-default-vals): Also substitute OCTAVE_RELEASE.
+
 2006-03-08  David Bateman  <dbateman@free.fr>
 
 	* 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  <Kurt.Hornik@wu-wien.ac.at>
 
--- a/Makeconf.in	Thu Mar 09 19:21:39 2006 +0000
+++ b/Makeconf.in	Fri Mar 10 03:57:23 2006 +0000
@@ -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
--- a/src/ChangeLog	Thu Mar 09 19:21:39 2006 +0000
+++ b/src/ChangeLog	Fri Mar 10 03:57:23 2006 +0000
@@ -1,5 +1,10 @@
 2006-03-09  John W. Eaton  <jwe@octave.org>
 
+	* 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.
--- a/src/Makefile.in	Thu Mar 09 19:21:39 2006 +0000
+++ b/src/Makefile.in	Fri Mar 10 03:57:23 2006 +0000
@@ -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 \
--- a/src/defaults.h.in	Thu Mar 09 19:21:39 2006 +0000
+++ b/src/defaults.h.in	Fri Mar 10 03:57:23 2006 +0000
@@ -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;
--- a/src/octave.cc	Thu Mar 09 19:21:39 2006 +0000
+++ b/src/octave.cc	Fri Mar 10 03:57:23 2006 +0000
@@ -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";