Mercurial > octave
annotate libinterp/corefcn/defaults.cc @ 29462:280defaf2023
pkg.m: Install local packages in version dependent path (bug #58299).
* scripts/pkg/pkg.m: Store local package list in (platform-specific) version
dependent path.
* scripts/pkg/private/default_prefix.m: Change the default local package
installation location to a (platform-specific) version dependent path.
* doc/interpreter/package.txi: Adapt documentation.
* scripts/pkg/private/install.m: Create directory for local package list if it
doesn't exist yet.
* libinterp/corefcn/toplev.cc (__octave_config_info__): Add
OCTAVE_MAJOR_VERSION, OCTAVE_MINOR_VERSION, and OCTAVE_PATCH_VERSION to
output.
* libinterp/corefcn/defaults.cc (Fuser_config_dir, Fuser_data_dir): Add new
functions to query platform-specific path for user data and user configuration
files.
* doc/interpreter/system.txi: Add docstrings of new functions to manual.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Sun, 21 Mar 2021 18:10:14 +0100 |
parents | 0a5b15007766 |
children | 32c3a5805893 |
rev | line source |
---|---|
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
1 //////////////////////////////////////////////////////////////////////// |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
2 // |
29358
0a5b15007766
update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents:
27957
diff
changeset
|
3 // Copyright (C) 1996-2021 The Octave Project Developers |
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
4 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
5 // See the file COPYRIGHT.md in the top-level directory of this |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
6 // distribution or <https://octave.org/copyright/>. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
7 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
8 // This file is part of Octave. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
9 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
10 // Octave is free software: you can redistribute it and/or modify it |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
11 // under the terms of the GNU General Public License as published by |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
12 // the Free Software Foundation, either version 3 of the License, or |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
13 // (at your option) any later version. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
14 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
15 // Octave is distributed in the hope that it will be useful, but |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
16 // WITHOUT ANY WARRANTY; without even the implied warranty of |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
18 // GNU General Public License for more details. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
19 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
20 // You should have received a copy of the GNU General Public License |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
21 // along with Octave; see the file COPYING. If not, see |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
22 // <https://www.gnu.org/licenses/>. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
23 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
24 //////////////////////////////////////////////////////////////////////// |
2203 | 25 |
21724
aba2e6293dd8
use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents:
21301
diff
changeset
|
26 #if defined (HAVE_CONFIG_H) |
21301
40de9f8f23a6
Use '#include "config.h"' rather than <config.h>.
Rik <rik@octave.org>
parents:
21200
diff
changeset
|
27 # include "config.h" |
2203 | 28 #endif |
29 | |
30 #include <cstdlib> | |
31 | |
6114 | 32 #include <algorithm> |
2203 | 33 #include <string> |
34 | |
5814 | 35 #include "dir-ops.h" |
23721
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
36 #include "file-ops.h" |
2926 | 37 #include "oct-env.h" |
38 | |
23466
5da300c55e89
use "" instead of <> for including defaults.h and version.h
John W. Eaton <jwe@octave.org>
parents:
23450
diff
changeset
|
39 #include "defaults.h" |
2203 | 40 #include "defun.h" |
41 #include "error.h" | |
3040 | 42 #include "file-ops.h" |
20940
48b2ad5ee801
maint: Rename oct-obj.[cc|h] to ovl.[cc|h] for clarity.
Rik <rik@octave.org>
parents:
20853
diff
changeset
|
43 #include "ovl.h" |
2390 | 44 #include "ov.h" |
2203 | 45 #include "variables.h" |
23466
5da300c55e89
use "" instead of <> for including defaults.h and version.h
John W. Eaton <jwe@octave.org>
parents:
23450
diff
changeset
|
46 #include "version.h" |
2203 | 47 |
23720
d3a9ffc9fdbd
move config macros from defaults.cc to a separate file
John W. Eaton <jwe@octave.org>
parents:
23719
diff
changeset
|
48 #include "default-defs.h" |
23713
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
49 |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
50 namespace octave |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
51 { |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
52 namespace config |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
53 { |
25460
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
54 // Variables that name directories or files are substituted into source |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
55 // files with "${prefix}/" stripped from the beginning of the string. |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
56 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
57 // All configure variables of this form should be specified as absolute |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
58 // directory names. The only ones that should not be absolute here are |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
59 // ones that have had "${prefix}/" or "${exec_prefix} stripped. |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
60 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
61 static std::string |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
62 prepend_home_dir (const std::string& hd, const std::string& s) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
63 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
64 std::string retval = s; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
65 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
66 char dir_sep_char = sys::file_ops::dir_sep_char (); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
67 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
68 if (! sys::env::absolute_pathname (retval)) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
69 retval = hd + dir_sep_char + s; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
70 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
71 if (dir_sep_char != '/') |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
72 std::replace (retval.begin (), retval.end (), '/', dir_sep_char); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
73 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
74 return retval; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
75 } |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
76 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
77 static std::string get_octave_home (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
78 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
79 std::string op = OCTAVE_PREFIX; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
80 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
81 std::string oh = sys::env::getenv ("OCTAVE_HOME"); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
82 |
27956
2310164737b3
fix many spelling errors (bug #57613)
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
83 // If OCTAVE_HOME is set in the environment, use that. Otherwise, |
25460
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
84 // default to ${prefix} from configure. |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
85 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
86 return oh.empty () ? op : oh; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
87 } |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
88 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
89 static std::string get_octave_exec_home (void) |
23721
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
90 { |
25460
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
91 std::string op = OCTAVE_PREFIX; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
92 std::string oep = OCTAVE_EXEC_PREFIX; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
93 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
94 std::string oh = sys::env::getenv ("OCTAVE_HOME"); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
95 std::string oeh = sys::env::getenv ("OCTAVE_EXEC_HOME"); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
96 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
97 // If OCTAVE_EXEC_HOME is set in the environment, use that. |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
98 // Otherwise, if ${prefix} and ${exec_prefix} from configure are set |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
99 // to the same value, use OCTAVE_HOME from the environment if it is set. |
27956
2310164737b3
fix many spelling errors (bug #57613)
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
100 // Otherwise, default to ${exec_prefix} from configure. |
25460
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
101 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
102 if (! oeh.empty ()) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
103 return oeh; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
104 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
105 if (op == oep && ! oh.empty ()) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
106 return oh; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
107 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
108 return oep; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
109 } |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
110 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
111 static std::string get_local_site_defaults_file (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
112 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
113 std::string lsf = sys::env::getenv ("OCTAVE_SITE_INITFILE"); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
114 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
115 return lsf.empty () ? local_startupfile_dir () + "/octaverc" : lsf; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
116 } |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
117 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
118 static std::string get_site_defaults_file (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
119 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
120 std::string sf = sys::env::getenv ("OCTAVE_VERSION_INITFILE"); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
121 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
122 return sf.empty () ? startupfile_dir () + "/octaverc" : sf; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
123 } |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
124 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
125 std::string prepend_octave_home (const std::string& s) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
126 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
127 return prepend_home_dir (octave_home (), s); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
128 } |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
129 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
130 std::string prepend_octave_exec_home (const std::string& s) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
131 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
132 return prepend_home_dir (octave_exec_home (), s); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
133 } |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
134 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
135 std::string canonical_host_type (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
136 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
137 static const std::string s_canonical_host_type |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
138 = OCTAVE_CANONICAL_HOST_TYPE; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
139 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
140 return s_canonical_host_type; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
141 } |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
142 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
143 std::string release (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
144 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
145 static const std::string s_octave_release = OCTAVE_RELEASE; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
146 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
147 return s_octave_release; |
23721
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
148 } |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
149 |
25460
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
150 std::string default_pager (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
151 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
152 static const std::string s_default_pager = OCTAVE_DEFAULT_PAGER; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
153 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
154 return s_default_pager; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
155 } |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
156 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
157 std::string octave_home (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
158 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
159 static const std::string s_octave_home = get_octave_home (); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
160 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
161 return s_octave_home; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
162 } |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
163 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
164 std::string octave_exec_home (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
165 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
166 static const std::string s_octave_exec_home = get_octave_exec_home (); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
167 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
168 return s_octave_exec_home; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
169 } |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
170 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
171 std::string bin_dir (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
172 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
173 static const std::string s_bin_dir |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
174 = prepend_octave_exec_home (OCTAVE_BINDIR); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
175 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
176 return s_bin_dir; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
177 } |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
178 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
179 std::string data_dir (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
180 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
181 static const std::string s_data_dir |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
182 = prepend_octave_home (OCTAVE_DATADIR); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
183 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
184 return s_data_dir; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
185 } |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
186 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
187 std::string dataroot_dir (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
188 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
189 static const std::string s_dataroot_dir |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
190 = prepend_octave_home (OCTAVE_DATAROOTDIR); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
191 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
192 return s_dataroot_dir; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
193 } |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
194 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
195 std::string include_dir (void) |
23721
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
196 { |
25460
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
197 static const std::string s_include_dir |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
198 = prepend_octave_home (OCTAVE_INCLUDEDIR); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
199 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
200 return s_include_dir; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
201 } |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
202 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
203 std::string lib_dir (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
204 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
205 static const std::string s_lib_dir |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
206 = prepend_octave_exec_home (OCTAVE_LIBDIR); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
207 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
208 return s_lib_dir; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
209 } |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
210 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
211 std::string libexec_dir (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
212 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
213 static const std::string s_libexec_dir |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
214 = prepend_octave_exec_home (OCTAVE_LIBEXECDIR); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
215 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
216 return s_libexec_dir; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
217 } |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
218 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
219 std::string arch_lib_dir (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
220 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
221 static const std::string s_arch_lib_dir |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
222 = prepend_octave_exec_home (OCTAVE_ARCHLIBDIR); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
223 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
224 return s_arch_lib_dir; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
225 } |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
226 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
227 std::string info_dir (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
228 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
229 static const std::string s_info_dir |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
230 = prepend_octave_exec_home (OCTAVE_INFODIR); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
231 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
232 return s_info_dir; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
233 } |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
234 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
235 std::string local_ver_arch_lib_dir (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
236 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
237 static const std::string s_local_ver_arch_lib_dir |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
238 = prepend_octave_exec_home (OCTAVE_LOCALVERARCHLIBDIR); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
239 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
240 return s_local_ver_arch_lib_dir; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
241 } |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
242 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
243 std::string local_api_arch_lib_dir (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
244 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
245 static const std::string s_local_api_arch_lib_dir |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
246 = prepend_octave_exec_home (OCTAVE_LOCALAPIARCHLIBDIR); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
247 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
248 return s_local_api_arch_lib_dir; |
23721
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
249 } |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
250 |
25460
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
251 std::string local_arch_lib_dir (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
252 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
253 static const std::string s_local_arch_lib_dir |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
254 = prepend_octave_exec_home (OCTAVE_LOCALARCHLIBDIR); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
255 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
256 return s_local_arch_lib_dir; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
257 } |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
258 |
25460
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
259 std::string local_ver_oct_file_dir (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
260 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
261 static const std::string s_local_ver_oct_file_dir |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
262 = prepend_octave_exec_home (OCTAVE_LOCALVEROCTFILEDIR); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
263 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
264 return s_local_ver_oct_file_dir; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
265 } |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
266 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
267 std::string local_api_oct_file_dir (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
268 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
269 static const std::string s_local_api_oct_file_dir |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
270 = prepend_octave_exec_home (OCTAVE_LOCALAPIOCTFILEDIR); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
271 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
272 return s_local_api_oct_file_dir; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
273 } |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
274 |
25460
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
275 std::string local_oct_file_dir (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
276 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
277 static const std::string s_local_oct_file_dir |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
278 = prepend_octave_exec_home (OCTAVE_LOCALOCTFILEDIR); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
279 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
280 return s_local_oct_file_dir; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
281 } |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
282 |
25460
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
283 std::string oct_file_dir (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
284 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
285 static const std::string s_oct_file_dir |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
286 = prepend_octave_exec_home (OCTAVE_OCTFILEDIR); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
287 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
288 return s_oct_file_dir; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
289 } |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
290 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
291 std::string local_ver_fcn_file_dir (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
292 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
293 static const std::string s_local_ver_fcn_file_dir |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
294 = prepend_octave_home (OCTAVE_LOCALVERFCNFILEDIR); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
295 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
296 return s_local_ver_fcn_file_dir; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
297 } |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
298 |
25460
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
299 std::string local_api_fcn_file_dir (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
300 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
301 static const std::string s_local_api_fcn_file_dir |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
302 = prepend_octave_home (OCTAVE_LOCALAPIFCNFILEDIR); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
303 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
304 return s_local_api_fcn_file_dir; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
305 } |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
306 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
307 std::string local_fcn_file_dir (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
308 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
309 static const std::string s_local_fcn_file_dir |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
310 = prepend_octave_home (OCTAVE_LOCALFCNFILEDIR); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
311 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
312 return s_local_fcn_file_dir; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
313 } |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
314 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
315 std::string fcn_file_dir (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
316 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
317 static const std::string s_fcn_file_dir |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
318 = prepend_octave_home (OCTAVE_FCNFILEDIR); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
319 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
320 return s_fcn_file_dir; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
321 } |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
322 |
25460
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
323 std::string oct_data_dir (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
324 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
325 static const std::string s_oct_data_dir |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
326 = prepend_octave_home (OCTAVE_OCTDATADIR); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
327 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
328 return s_oct_data_dir; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
329 } |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
330 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
331 std::string oct_doc_dir (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
332 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
333 static const std::string s_oct_doc_dir |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
334 = prepend_octave_home (OCTAVE_OCTDOCDIR); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
335 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
336 return s_oct_doc_dir; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
337 } |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
338 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
339 std::string oct_etc_dir (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
340 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
341 static const std::string s_oct_etc_dir |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
342 = prepend_octave_home (OCTAVE_OCTETCDIR); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
343 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
344 return s_oct_etc_dir; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
345 } |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
346 |
25460
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
347 std::string oct_fonts_dir (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
348 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
349 static const std::string s_oct_fonts_dir |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
350 = prepend_octave_home (OCTAVE_OCTFONTSDIR); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
351 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
352 return s_oct_fonts_dir; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
353 } |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
354 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
355 std::string oct_include_dir (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
356 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
357 static const std::string s_oct_include_dir |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
358 = prepend_octave_home (OCTAVE_OCTINCLUDEDIR); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
359 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
360 return s_oct_include_dir; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
361 } |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
362 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
363 std::string oct_lib_dir (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
364 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
365 static const std::string s_oct_lib_dir |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
366 = prepend_octave_exec_home (OCTAVE_OCTLIBDIR); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
367 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
368 return s_oct_lib_dir; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
369 } |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
370 |
25460
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
371 std::string oct_locale_dir (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
372 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
373 static const std::string s_oct_locale_dir |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
374 = prepend_octave_home (OCTAVE_OCTLOCALEDIR); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
375 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
376 return s_oct_locale_dir; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
377 } |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
378 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
379 std::string oct_tests_dir (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
380 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
381 static const std::string s_oct_tests_dir |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
382 = prepend_octave_home (OCTAVE_OCTTESTSDIR); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
383 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
384 return s_oct_tests_dir; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
385 } |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
386 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
387 std::string man_dir (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
388 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
389 static const std::string s_man_dir |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
390 = prepend_octave_home (OCTAVE_MANDIR); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
391 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
392 return s_man_dir; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
393 } |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
394 |
25460
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
395 std::string man1_dir (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
396 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
397 static const std::string s_man1_dir |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
398 = prepend_octave_home (OCTAVE_MAN1DIR); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
399 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
400 return s_man1_dir; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
401 } |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
402 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
403 std::string man1_ext (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
404 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
405 static const std::string s_man1_ext = OCTAVE_MAN1EXT; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
406 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
407 return s_man1_ext; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
408 } |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
409 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
410 std::string image_dir (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
411 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
412 static const std::string s_image_dir |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
413 = prepend_octave_home (OCTAVE_IMAGEDIR); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
414 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
415 return s_image_dir; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
416 } |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
417 |
25460
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
418 std::string local_startupfile_dir (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
419 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
420 static const std::string s_local_startupfile_dir |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
421 = prepend_octave_home (OCTAVE_LOCALSTARTUPFILEDIR); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
422 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
423 return s_local_startupfile_dir; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
424 } |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
425 |
25460
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
426 std::string startupfile_dir (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
427 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
428 static const std::string s_startupfile_dir |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
429 = prepend_octave_home (OCTAVE_STARTUPFILEDIR); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
430 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
431 return s_startupfile_dir; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
432 } |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
433 |
25460
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
434 std::string local_site_defaults_file (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
435 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
436 static const std::string s_local_site_defaults_file |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
437 = get_local_site_defaults_file (); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
438 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
439 return s_local_site_defaults_file; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
440 } |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
441 |
25460
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
442 std::string site_defaults_file (void) |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
443 { |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
444 static const std::string s_site_defaults_file |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
445 = get_site_defaults_file (); |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
446 |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
447 return s_site_defaults_file; |
627d6bde9b8d
solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
448 } |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
449 } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
450 } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
451 |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
452 |
5780 | 453 DEFUN (OCTAVE_HOME, args, , |
21966
112b20240c87
move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents:
21962
diff
changeset
|
454 doc: /* -*- texinfo -*- |
112b20240c87
move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents:
21962
diff
changeset
|
455 @deftypefn {} {} OCTAVE_HOME () |
112b20240c87
move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents:
21962
diff
changeset
|
456 Return the name of the top-level Octave installation directory. |
23713
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
457 OCTAVE_HOME corresponds to the configuration variable @var{prefix}. |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
458 @seealso{EXEC_PATH, IMAGE_PATH, OCTAVE_EXEC_HOME} |
21966
112b20240c87
move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents:
21962
diff
changeset
|
459 @end deftypefn */) |
5780 | 460 { |
20802
8bb38ba1bad6
eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents:
20172
diff
changeset
|
461 if (args.length () != 0) |
5823 | 462 print_usage (); |
5780 | 463 |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
464 return ovl (octave::config::octave_home ()); |
5749 | 465 } |
3446 | 466 |
12851
7fce673b934a
codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
467 /* |
14429
eff4a5933e28
Update %!tests in src/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
468 %!assert (ischar (OCTAVE_HOME ())) |
eff4a5933e28
Update %!tests in src/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
469 %!error OCTAVE_HOME (1) |
12851
7fce673b934a
codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
470 */ |
7fce673b934a
codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
471 |
23713
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
472 DEFUN (OCTAVE_EXEC_HOME, args, , |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
473 doc: /* -*- texinfo -*- |
25579
07c2c42f457e
doc: Miscellaneous documentation fixes all over the manual (bug #54288).
Rik <rik@octave.org>
parents:
25054
diff
changeset
|
474 @deftypefn {} {} OCTAVE_EXEC_HOME () |
23713
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
475 Return the name of the top-level Octave installation directory for |
25003
2365c2661b3c
doc: Spellcheck documentation ahead of 4.4 release.
Rik <rik@octave.org>
parents:
24986
diff
changeset
|
476 architecture-dependent files. If not specified separately, the value |
24986
0b9e7fcaab91
doc: grammarcheck docstrings in C++ files ahead of 4.4 release.
Rik <rik@octave.org>
parents:
24899
diff
changeset
|
477 is the same as OCTAVE_HOME@. OCTAVE_EXEC_HOME corresponds to the |
23713
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
478 configuration variable @var{exec_prefix}. |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
479 @seealso{EXEC_PATH, IMAGE_PATH, OCTAVE_HOME} |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
480 @end deftypefn */) |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
481 { |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
482 if (args.length () != 0) |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
483 print_usage (); |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
484 |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
485 return ovl (octave::config::octave_exec_home ()); |
23713
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
486 } |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
487 |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
488 /* |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
489 %!assert (ischar (OCTAVE_EXEC_HOME ())) |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
490 %!error OCTAVE_EXEC_HOME (1) |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
491 */ |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
492 |
5749 | 493 DEFUNX ("OCTAVE_VERSION", FOCTAVE_VERSION, args, , |
21966
112b20240c87
move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents:
21962
diff
changeset
|
494 doc: /* -*- texinfo -*- |
112b20240c87
move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents:
21962
diff
changeset
|
495 @deftypefn {} {} OCTAVE_VERSION () |
112b20240c87
move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents:
21962
diff
changeset
|
496 Return the version number of Octave as a string. |
112b20240c87
move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents:
21962
diff
changeset
|
497 @seealso{ver, version} |
112b20240c87
move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents:
21962
diff
changeset
|
498 @end deftypefn */) |
5749 | 499 { |
20802
8bb38ba1bad6
eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents:
20172
diff
changeset
|
500 if (args.length () != 0) |
5823 | 501 print_usage (); |
5749 | 502 |
21127
df7891224709
maint: Use "return ovl (...)" in DEFUN macros.
Rik <rik@octave.org>
parents:
21100
diff
changeset
|
503 return ovl (OCTAVE_VERSION); |
2203 | 504 } |
12851
7fce673b934a
codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
505 |
7fce673b934a
codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
506 /* |
14429
eff4a5933e28
Update %!tests in src/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
507 %!assert (ischar (OCTAVE_VERSION ())) |
eff4a5933e28
Update %!tests in src/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
508 %!error OCTAVE_VERSION (1) |
12851
7fce673b934a
codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
509 */ |
29462
280defaf2023
pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29358
diff
changeset
|
510 |
280defaf2023
pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29358
diff
changeset
|
511 DEFUN (user_config_dir, args, , |
280defaf2023
pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29358
diff
changeset
|
512 doc: /* -*- texinfo -*- |
280defaf2023
pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29358
diff
changeset
|
513 @deftypefn {} {cfg_dir = } user_config_dir () |
280defaf2023
pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29358
diff
changeset
|
514 Return the (platform-specific) directory for user configuration. |
280defaf2023
pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29358
diff
changeset
|
515 @seealso{user_data_dir} |
280defaf2023
pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29358
diff
changeset
|
516 @end deftypefn */) |
280defaf2023
pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29358
diff
changeset
|
517 { |
280defaf2023
pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29358
diff
changeset
|
518 if (args.length () != 0) |
280defaf2023
pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29358
diff
changeset
|
519 print_usage (); |
280defaf2023
pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29358
diff
changeset
|
520 |
280defaf2023
pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29358
diff
changeset
|
521 return ovl (octave::sys::env::get_user_config_directory ()); |
280defaf2023
pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29358
diff
changeset
|
522 } |
280defaf2023
pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29358
diff
changeset
|
523 |
280defaf2023
pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29358
diff
changeset
|
524 /* |
280defaf2023
pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29358
diff
changeset
|
525 %!assert (ischar (user_config_dir ())) |
280defaf2023
pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29358
diff
changeset
|
526 %!error user_config_dir (1) |
280defaf2023
pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29358
diff
changeset
|
527 */ |
280defaf2023
pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29358
diff
changeset
|
528 |
280defaf2023
pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29358
diff
changeset
|
529 DEFUN (user_data_dir, args, , |
280defaf2023
pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29358
diff
changeset
|
530 doc: /* -*- texinfo -*- |
280defaf2023
pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29358
diff
changeset
|
531 @deftypefn {} {data_dir = } user_data_dir () |
280defaf2023
pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29358
diff
changeset
|
532 Return the (platform-specific) directory for user data. |
280defaf2023
pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29358
diff
changeset
|
533 @seealso{user_config_dir} |
280defaf2023
pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29358
diff
changeset
|
534 @end deftypefn */) |
280defaf2023
pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29358
diff
changeset
|
535 { |
280defaf2023
pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29358
diff
changeset
|
536 if (args.length () != 0) |
280defaf2023
pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29358
diff
changeset
|
537 print_usage (); |
280defaf2023
pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29358
diff
changeset
|
538 |
280defaf2023
pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29358
diff
changeset
|
539 return ovl (octave::sys::env::get_user_data_directory ()); |
280defaf2023
pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29358
diff
changeset
|
540 } |
280defaf2023
pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29358
diff
changeset
|
541 |
280defaf2023
pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29358
diff
changeset
|
542 /* |
280defaf2023
pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29358
diff
changeset
|
543 %!assert (ischar (user_data_dir ())) |
280defaf2023
pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29358
diff
changeset
|
544 %!error user_data_dir (1) |
280defaf2023
pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29358
diff
changeset
|
545 */ |
280defaf2023
pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29358
diff
changeset
|
546 |