Mercurial > hg > octave-nkf
changeset 4443:aa345723c698
[project @ 2003-07-07 19:55:18 by jwe]
author | jwe |
---|---|
date | Mon, 07 Jul 2003 19:55:18 +0000 |
parents | e636265f2987 |
children | 9a2206207402 |
files | ChangeLog Makeconf.in octave-config.in src/ChangeLog src/defaults.h.in |
diffstat | 5 files changed, 86 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2003-07-07 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makeconf.in: Set and substitute values for startupfiledir and + localstartupfiledir. + + * octave-config.in: Allow other configuration defaults to be + accessed using --variable VAR option. + 2003-07-02 John W. Eaton <jwe@bevo.che.wisc.edu> * octMakefile.in (distclean): remove install-octave here.
--- a/Makeconf.in +++ b/Makeconf.in @@ -284,6 +284,10 @@ # The type of computer we are running on. canonical_host_type = @canonical_host_type@ +# Where Octave will look for startup files +startupfiledir = ${fcnfiledir}/startup +localstartupfiledir = ${localfcnfiledir}/startup + # The -I flags to use for the mkoctfile script. ifeq ($(includedir),/usr/include) MKOCTFILE_INCFLAGS = \ @@ -473,6 +477,7 @@ -e "s;%OCTAVE_LOCALFCNFILEPATH%;\"${localfcnfilepath}\";" \ -e "s;%OCTAVE_LOCALOCTFILEDIR%;\"${localoctfiledir}\";" \ -e "s;%OCTAVE_LOCALOCTFILEPATH%;\"${localoctfilepath}\";" \ + -e "s;%OCTAVE_LOCALSTARTUPFILEDIR%;\"${localstartupfile}\";" \ -e "s;%OCTAVE_LOCALVERARCHLIBDIR%;\"${localverarchlibdir}\";" \ -e "s;%OCTAVE_LOCALVERFCNFILEDIR%;\"${localverfcnfiledir}\";" \ -e "s;%OCTAVE_LOCALVEROCTFILEDIR%;\"${localveroctfiledir}\";" \ @@ -482,6 +487,7 @@ -e "s;%OCTAVE_OCTFILEDIR%;\"${octfiledir}\";" \ -e "s;%OCTAVE_OCTINCLUDEDIR%;\"${octincludedir}\";" \ -e "s;%OCTAVE_OCTLIBDIR%;\"${octlibdir}\";" \ + -e "s;%OCTAVE_STARTUPFILEDIR%;\"${startupfiledir}\";" \ -e "s;%OCTAVE_PREFIX%;\"${prefix}\";" \ -e "s;%OCTAVE_VERSION%;\"${version}\";" $(top_srcdir)/move-if-change $@-t $@
--- a/octave-config.in +++ b/octave-config.in @@ -5,9 +5,40 @@ # Rafael Laboissiere <rafael@laboissiere.net> # This script is in the public domain +CANONICAL_HOST_TYPE="%OCTAVE_CANONICAL_HOST_TYPE%" +DEFAULT_PAGER="%OCTAVE_DEFAULT_PAGER%" +ARCHLIBDIR="%OCTAVE_ARCHLIBDIR%" +BINDIR="%OCTAVE_BINDIR%" +DATADIR="%OCTAVE_DATADIR%" +EXEC_PREFIX="%OCTAVE_EXEC_PREFIX%" +FCNFILEDIR="%OCTAVE_FCNFILEDIR%" +FCNFILEPATH="%OCTAVE_FCNFILEPATH%" +IMAGEDIR="%OCTAVE_IMAGEDIR%" +IMAGEPATH="%OCTAVE_IMAGEPATH%" +INCLUDEDIR="%OCTAVE_INCLUDEDIR%" +INFODIR="%OCTAVE_INFODIR%" +INFOFILE="%OCTAVE_INFOFILE%" +LIBDIR="%OCTAVE_LIBDIR%" +LIBEXECDIR="%OCTAVE_LIBEXECDIR%" +LIBEXECDIR="%OCTAVE_LIBEXECDIR%" +LOCALARCHLIBDIR="%OCTAVE_LOCALARCHLIBDIR%" +LOCALFCNFILEDIR="%OCTAVE_LOCALFCNFILEDIR%" +LOCALFCNFILEPATH="%OCTAVE_LOCALFCNFILEPATH%" +LOCALOCTFILEDIR="%OCTAVE_LOCALOCTFILEDIR%" +LOCALOCTFILEPATH="%OCTAVE_LOCALOCTFILEPATH%" +LOCALSTARTUPFILEDIR="%OCTAVE_LOCALSTARTUPFILEDIR%" +LOCALVERARCHLIBDIR="%OCTAVE_LOCALVERARCHLIBDIR%" +LOCALVERFCNFILEDIR="%OCTAVE_LOCALVERFCNFILEDIR%" +LOCALVEROCTFILEDIR="%OCTAVE_LOCALVEROCTFILEDIR%" +MAN1DIR="%OCTAVE_MAN1DIR%" +MAN1EXT="%OCTAVE_MAN1EXT%" +MANDIR="%OCTAVE_MANDIR%" +OCTFILEDIR="%OCTAVE_OCTFILEDIR%" +OCTINCLUDEDIR="%OCTAVE_OCTINCLUDEDIR%" +OCTLIBDIR="%OCTAVE_OCTLIBDIR%" +PREFIX="%OCTAVE_PREFIX%" +STARTUPFILEDIR="%OCTAVE_STARTUPFILEDIR%" VERSION="%OCTAVE_VERSION%" -OCT_SITE_DIR="%OCTAVE_LOCALVEROCTFILEDIR%" -M_SITE_DIR="%OCTAVE_LOCALVERFCNFILEDIR%" usage_msg="usage: octave-config [options]" @@ -16,7 +47,7 @@ exit 1 fi -for arg +while [ $# -gt 0 ] do case "$1" in -h | -\? | --help) @@ -35,18 +66,47 @@ -v, --version Print the Octave version number. + --variable VAR Print the value of the given configuration + variable VAR: + + CANONICAL_HOST_TYPE LOCALFCNFILEDIR + DEFAULT_PAGER LOCALFCNFILEPATH + ARCHLIBDIR LOCALOCTFILEDIR + BINDIR LOCALOCTFILEPATH + DATADIR LOCALSTARTUPFILEDIR + EXEC_PREFIX LOCALVERARCHLIBDIR + FCNFILEDIR LOCALVERFCNFILEDIR + FCNFILEPATH LOCALVEROCTFILEDIR + IMAGEDIR MAN1DIR + IMAGEPATH MAN1EXT + INCLUDEDIR MANDIR + INFODIR OCTFILEDIR + INFOFILE OCTINCLUDEDIR + LIBDIR OCTLIBDIR + LIBEXECDIR PREFIX + LIBEXECDIR STARTUPFILEDIR + LOCALARCHLIBDIR VERSION + EOF exit 0 ;; --m-site-dir) - echo $M_SITE_DIR + echo $OCTAVE_LOCALVERFCNFILEDIR ;; --oct-site-dir) - echo $OCT_SITE_DIR + echo $OCTAVE_LOCALVEROCTFILEDIR ;; -v | --version) echo $VERSION ;; + --variable) + shift + if [ $# -eq 0 ]; then + echo "octave-config: --version option requires argument" 1>&2 + exit 1 + fi + eval echo \${$1} + ;; *) echo "octave-config: unrecognized argument $1" 2>&1 exit 1
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2003-07-07 John W. Eaton <jwe@bevo.che.wisc.edu> + + * defaults.h.in (OCTAVE_LOCALSTARTUPFILEDIR, OCTAVE_STARTUPFILEDIR): + Set values directly instead of constructing them. + 2003-06-28 Arno J. Klaassen <arno@heho.snv.jussieu.fr> * toplev.cc (octave_config_info): Key for OCTAVE_CONF_DEFS should
--- a/src/defaults.h.in +++ b/src/defaults.h.in @@ -113,7 +113,7 @@ #endif #ifndef OCTAVE_LOCALSTARTUPFILEDIR -#define OCTAVE_LOCALSTARTUPFILEDIR OCTAVE_LOCALFCNFILEDIR "/startup" +#define OCTAVE_LOCALSTARTUPFILEDIR %OCTAVE_LOCALSTARTUPFILEDIR% #endif #ifndef OCTAVE_LOCALVERARCHLIBDIR @@ -157,7 +157,7 @@ #endif #ifndef OCTAVE_STARTUPFILEDIR -#define OCTAVE_STARTUPFILEDIR OCTAVE_FCNFILEDIR "/startup" +#define OCTAVE_STARTUPFILEDIR %OCTAVE_STARTUPFILEDIR% #endif extern std::string Voctave_home;