# HG changeset patch # User John W. Eaton # Date 1235543052 18000 # Node ID eace5649a8b5c77766b84034465cc986ab621cf0 # Parent 4d328b8979c80f738b376ccf24409a76549dab3f set default value for doc_cache_file variable diff -r 4d328b8979c8 -r eace5649a8b5 ChangeLog --- a/ChangeLog Wed Feb 25 06:47:16 2009 +0100 +++ b/ChangeLog Wed Feb 25 01:24:12 2009 -0500 @@ -1,3 +1,8 @@ +2009-02-25 John W. Eaton + + * configure.in (doc_cache_file): New default variable + * Makeconf.in (@doc_cache_file, do-subst-default-vals): Substitute it. + 2009-02-24 John W. Eaton * run-octave.in (DOCFILE): New variable. Pass --doc-cache-file diff -r 4d328b8979c8 -r eace5649a8b5 Makeconf.in --- a/Makeconf.in Wed Feb 25 06:47:16 2009 +0100 +++ b/Makeconf.in Wed Feb 25 01:24:12 2009 -0500 @@ -312,10 +312,13 @@ man1dir = @man1dir@ man1ext = @man1ext@ +# The full path to the default doc cache file. +doc_cache_file = @doc_cache_file@ + # Where to install and expect the info files describing Octave.. infodir = @infodir@ -# The fill path to the default info file. +# The full path to the default info file. infofile = @infofile@ # ==================== Octave-specific directories ==================== @@ -567,6 +570,7 @@ -e "s|%OCTAVE_DATADIR%|\"${datadir}\"|" \ -e "s|%OCTAVE_DATAROOTDIR%|\"${datarootdir}\"|" \ -e "s|%OCTAVE_DEFAULT_PAGER%|\"${DEFAULT_PAGER}\"|" \ + -e "s|%OCTAVE_DOC_CACHE_FILE%|\"${doc_cache_file}\"|" \ -e "s|%OCTAVE_EXEC_PREFIX%|\"${exec_prefix}\"|" \ -e "s|%OCTAVE_FCNFILEDIR%|\"${fcnfiledir}\"|" \ -e "s|%OCTAVE_IMAGEDIR%|\"${imagedir}\"|" \ diff -r 4d328b8979c8 -r eace5649a8b5 configure.in --- a/configure.in Wed Feb 25 06:47:16 2009 +0100 +++ b/configure.in Wed Feb 25 01:24:12 2009 -0500 @@ -88,6 +88,7 @@ OCTAVE_SET_DEFAULT(man1dir, '$(mandir)/man1') OCTAVE_SET_DEFAULT(man1ext, '.1') +OCTAVE_SET_DEFAULT(doc_cache_file, '$(octetcdir)/DOC') OCTAVE_SET_DEFAULT(infofile, '$(infodir)/octave.info') OCTAVE_SET_DEFAULT(octincludedir, '$(includedir)/octave-$(version)') OCTAVE_SET_DEFAULT(fcnfiledir, '$(datadir)/octave/$(version)/m') diff -r 4d328b8979c8 -r eace5649a8b5 src/ChangeLog --- a/src/ChangeLog Wed Feb 25 06:47:16 2009 +0100 +++ b/src/ChangeLog Wed Feb 25 01:24:12 2009 -0500 @@ -1,5 +1,9 @@ 2009-02-25 John W. Eaton + * defaults.h.in (OCTAVE_DOC_CACHE_FILE): New macro. + * defaults.cc (set_default_doc_cache_file): New function. + (install_defaults): Call it. + * help.cc (__list_functions__): Simplify * input.cc (get_debug_input): Don't pass arbitrary input to diff -r 4d328b8979c8 -r eace5649a8b5 src/defaults.cc --- a/src/defaults.cc Wed Feb 25 06:47:16 2009 +0100 +++ b/src/defaults.cc Wed Feb 25 01:24:12 2009 -0500 @@ -278,6 +278,16 @@ } static void +set_default_doc_cache_file (void) +{ + std::string def_file = subst_octave_home (OCTAVE_DOC_CACHE_FILE); + + std::string env_file = octave_env::getenv ("OCTAVE_DOC_CACHE_FILE"); + + Vdoc_cache_file = env_file.empty () ? def_file : env_file; +} + +static void set_default_info_file (void) { std::string std_info_file = subst_octave_home (OCTAVE_INFOFILE); @@ -375,6 +385,8 @@ set_image_path (); + set_default_doc_cache_file (); + set_default_info_file (); set_default_info_prog (); diff -r 4d328b8979c8 -r eace5649a8b5 src/defaults.h.in --- a/src/defaults.h.in Wed Feb 25 06:47:16 2009 +0100 +++ b/src/defaults.h.in Wed Feb 25 01:24:12 2009 -0500 @@ -53,6 +53,10 @@ #define OCTAVE_DATAROOTDIR %OCTAVE_DATAROOTDIR% #endif +#ifndef OCTAVE_DOC_CACHE_FILE +#define OCTAVE_DOC_CACHE_FILE %OCTAVE_DOC_CACHE_FILE% +#endif + #ifndef OCTAVE_EXEC_PREFIX #define OCTAVE_EXEC_PREFIX %OCTAVE_EXEC_PREFIX% #endif