comparison src/defaults.cc @ 14614:4e9dc46d4125

handle texinfo macros consistently in help system and manual * macros.texi: New file. Move macro definitions here from octave.texi. * doc/interpreter/Makefile.am (octetc_DATA): Include it in the list. (doc-cache): Pass macros.texi to mk_doc_cache.m. * octave.texi: Include macros.texi. * mk_doc_cache.m, __makeinfo__.m: Copy macros file to makeinfo input instead of handling macros specially. * configure.ac (texi_macros_file): New variable. * build-aux/common.mk (texi_macros_file, do_subst_default_vals): Substitute it. * run-octave.in (TEXIMACROSFILE): New variable. Pass --texi-macros-file to Octave. * defaults.in.h (OCTAVE_DEFAULT_TEXI_MACROS_FILE): New variable. * default.cc (set_default_texi_macros_file): New function. (install_defaults): Call it. * help.cc (Vtexi_macros_file): New variable. (Ftexi_macros_file): New function. * help.h (Vtexi_macros_file): Provide decl. * octave.cc (TEXI_MACROS_FILE_OPTION): New long option value. (long_opts): Include --texi-macros-file in the list. (octave_main): Handle TEXI_MACROS_FILE_OPTION.
author John W. Eaton <jwe@octave.org>
date Thu, 10 May 2012 12:01:42 -0400
parents eff4a5933e28
children
comparison
equal deleted inserted replaced
14613:e7c8e31f8e5d 14614:4e9dc46d4125
292 292
293 Vdoc_cache_file = env_file.empty () ? def_file : env_file; 293 Vdoc_cache_file = env_file.empty () ? def_file : env_file;
294 } 294 }
295 295
296 static void 296 static void
297 set_default_texi_macros_file (void)
298 {
299 std::string def_file = subst_octave_home (OCTAVE_TEXI_MACROS_FILE);
300
301 std::string env_file = octave_env::getenv ("OCTAVE_TEXI_MACROS_FILE");
302
303 Vtexi_macros_file = env_file.empty () ? def_file : env_file;
304 }
305
306 static void
297 set_default_info_file (void) 307 set_default_info_file (void)
298 { 308 {
299 std::string std_info_file = subst_octave_home (OCTAVE_INFOFILE); 309 std::string std_info_file = subst_octave_home (OCTAVE_INFOFILE);
300 310
301 std::string oct_info_file = octave_env::getenv ("OCTAVE_INFO_FILE"); 311 std::string oct_info_file = octave_env::getenv ("OCTAVE_INFO_FILE");
390 set_exec_path (); 400 set_exec_path ();
391 401
392 set_image_path (); 402 set_image_path ();
393 403
394 set_default_doc_cache_file (); 404 set_default_doc_cache_file ();
405
406 set_default_texi_macros_file ();
395 407
396 set_default_info_file (); 408 set_default_info_file ();
397 409
398 set_default_info_prog (); 410 set_default_info_prog ();
399 411