Mercurial > hg > octave-avbm
changeset 6311:e2a1aca62551
[project @ 2007-02-15 21:18:34 by jwe]
author | jwe |
---|---|
date | Thu, 15 Feb 2007 21:18:35 +0000 |
parents | cf8894bbc49d |
children | 725709ab0445 |
files | ChangeLog Makeconf.in mkoctfile.in octave-config.in src/ChangeLog src/oct-conf.h.in src/toplev.cc |
diffstat | 7 files changed, 101 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2007-02-15 John W. Eaton <jwe@octave.org> + + * octave-config.in (DATAROOTDIR): Include in list of vars. + Substitute OCTAVE_HOME. + + * Makeconf.in (MKOCTFILE_INCFLAGS, MKOCTFILE_LFLAGS): Delete vars. + (do-subst-config-vals): Don't substitute them. + Also substitute OCTAVE_CONF_INCLUDEDIR, OCTAVE_CONF_OCTINCLUDEDIR, + OCTAVE_CONF_OCTLIBDIR, and OCTAVE_CONF_PREFIX here. + * mkoctfile.in (OCTAVE_CONF_OCTINCLUDEDIR, OCTAVE_CONF_INCLUDEDIR, + OCTAVE_CONF_OCTLIBDIR): Substitute values and perform OCTAVE_HOME + substitution here. + (DEFAULT_INCFLAGS, DEFAULT_LFLAGS): New variables. Use them to + set default values for INCFLAGS and LFLAGS. + 2007-02-09 John W. Eaton <jwe@octave.org> * mkoctfile.in: Handle .a files.
--- a/Makeconf.in +++ b/Makeconf.in @@ -351,18 +351,6 @@ # LD_LIBRARY_PATH, DYLD_LIBRARY_PATH, PATH, ... library_path_var = @library_path_var@ -# The -I flags to use for the mkoctfile script. -ifeq ($(includedir),/usr/include) - MKOCTFILE_INCFLAGS = \ - -I$(octincludedir) -I$(octincludedir)/octave -else - MKOCTFILE_INCFLAGS = \ - -I$(octincludedir) -I$(octincludedir)/octave -I$(includedir) -endif - -# The -L flags to use for the mkoctfile scrip (for --link-stand-alone) -MKOCTFILE_LFLAGS = -L$(octlibdir) - MKOCTFILE_DL_LDFLAGS = @MKOCTFILE_DL_LDFLAGS@ NO_OCT_FILE_STRIP = @NO_OCT_FILE_STRIP@ @@ -495,6 +483,7 @@ -e "s|%OCTAVE_CONF_FPICFLAG%|\"${FPICFLAG}\"|" \ -e "s|%OCTAVE_CONF_GLPK_LIBS%|\"${GLPK_LIBS}\"|" \ -e "s|%OCTAVE_CONF_INCFLAGS%|\"${INCFLAGS}\"|" \ + -e "s|%OCTAVE_CONF_INCLUDEDIR%|\"${includedir}\"|" \ -e "s|%OCTAVE_CONF_LD_CXX%|\"${LD_CXX}\"|" \ -e "s|%OCTAVE_CONF_LDFLAGS%|\"${LDFLAGS}\"|" \ -e "s|%OCTAVE_CONF_LD_STATIC_FLAG%|\"${LD_STATIC_FLAG}\"|" \ @@ -512,8 +501,9 @@ -e "s|%OCTAVE_CONF_LIBS%|\"${LIBS}\"|" \ -e "s|%OCTAVE_CONF_LN_S%|\"${LN_S}\"|" \ -e "s|%OCTAVE_CONF_MKOCTFILE_DL_LDFLAGS%|\"${MKOCTFILE_DL_LDFLAGS}\"|" \ - -e "s|%OCTAVE_CONF_MKOCTFILE_INCFLAGS%|\"${MKOCTFILE_INCFLAGS}\"|" \ - -e "s|%OCTAVE_CONF_MKOCTFILE_LFLAGS%|\"${MKOCTFILE_LFLAGS}\"|" \ + -e "s|%OCTAVE_CONF_OCTINCLUDEDIR%|\"${octincludedir}\"|" \ + -e "s|%OCTAVE_CONF_OCTLIBDIR%|\"${octlibdir}\"|" \ + -e "s|%OCTAVE_CONF_PREFIX%|\"${prefix}\"|" \ -e "s|%OCTAVE_CONF_RANLIB%|\"${RANLIB}\"|" \ -e "s|%OCTAVE_CONF_RDYNAMIC_FLAG%|\"${RDYNAMIC_FLAG}\"|" \ -e "s|%OCTAVE_CONF_RLD_FLAG%|\"${RLD_FLAG}\"|" \
--- a/mkoctfile.in +++ b/mkoctfile.in @@ -7,15 +7,37 @@ set -e +: ${SED=%OCTAVE_CONF_SED%} + OCTAVE_VERSION=%OCTAVE_CONF_VERSION% +OCTAVE_PREFIX=%OCTAVE_CONF_PREFIX% + +DEFAULT_OCTINCLUDEDIR=%OCTAVE_CONF_OCTINCLUDEDIR% +DEFAULT_INCLUDEDIR=%OCTAVE_CONF_INCLUDEDIR% +DEFAULT_OCTLIBDIR=%OCTAVE_CONF_OCTLIBDIR% + +if [ -n "$OCTAVE_HOME" ]; then + DEFAULT_OCTINCLUDEDIR="`echo $DEFAULT_OCTINCLUDEDIR | $SED "s,^$OCTAVE_CONF_PREFIX,$OCTAVE_HOME,"`" + DEFAULT_INCLUDEDIR="`echo $DEFAULT_INCLUDEDIR | $SED "s,^$OCTAVE_CONF_PREFIX,$OCTAVE_HOME,"`" + DEFAULT_OCTLIBDIR="`echo $DEFAULT_OCTLIBDIR | $SED "s,^$OCTAVE_CONF_PREFIX,$OCTAVE_HOME,"`" +fi + +: ${OCTINCLUDEDIR=$DEFAULT_OCTINCLUDEDIR} +: ${INCLUDEDIR=$DEFAULT_INCLUDEDIR} +: ${OCTLIBDIR=$DEFAULT_OCTLIBDIR} + +DEFAULT_INCFLAGS="-I$OCTINCLUDEDIR -I$OCTINCLUDEDIR/octave" +if [ "$INCLUDEDIR" != /usr/include ]; then + DEFAULT_INCFLAGS="$DEFAULT_INCFLAGS -I$INCLUDEDIR" +fi + +DEFAULT_LFLAGS="-L$OCTLIBDIR" # Default values for these variables are filled in when Octave is # compiled. -: ${SED=%OCTAVE_CONF_SED%} - : ${CPPFLAGS=%OCTAVE_CONF_CPPFLAGS%} -: ${INCFLAGS=%OCTAVE_CONF_MKOCTFILE_INCFLAGS%} +: ${INCFLAGS=$DEFAULT_INCFLAGS} : ${F2C=%OCTAVE_CONF_F2C%} : ${F2CFLAGS=%OCTAVE_CONF_F2CFLAGS%} : ${F77=%OCTAVE_CONF_F77%} @@ -49,7 +71,7 @@ : ${LD_CXX=%OCTAVE_CONF_LD_CXX%} : ${LDFLAGS=%OCTAVE_CONF_LDFLAGS%} : ${LD_STATIC_FLAG=%OCTAVE_CONF_LD_STATIC_FLAG%} -: ${LFLAGS=%OCTAVE_CONF_MKOCTFILE_LFLAGS%} +: ${LFLAGS=$DEFAULT_LFLAGS} : ${ALL_FFLAGS="$FFLAGS"}
--- a/octave-config.in +++ b/octave-config.in @@ -11,6 +11,7 @@ ARCHLIBDIR=%OCTAVE_ARCHLIBDIR% BINDIR=%OCTAVE_BINDIR% DATADIR=%OCTAVE_DATADIR% +DATADIR=%OCTAVE_DATAROOTDIR% EXEC_PREFIX=%OCTAVE_EXEC_PREFIX% FCNFILEDIR=%OCTAVE_FCNFILEDIR% IMAGEDIR=%OCTAVE_IMAGEDIR% @@ -19,7 +20,6 @@ INFOFILE=%OCTAVE_INFOFILE% LIBDIR=%OCTAVE_LIBDIR% LIBEXECDIR=%OCTAVE_LIBEXECDIR% -LIBEXECDIR=%OCTAVE_LIBEXECDIR% LOCALAPIARCHLIBDIR=%OCTAVE_LOCALAPIARCHLIBDIR% LOCALAPIFCNFILEDIR=%OCTAVE_LOCALAPIFCNFILEDIR% LOCALAPIOCTFILEDIR=%OCTAVE_LOCALAPIOCTFILEDIR% @@ -40,6 +40,38 @@ STARTUPFILEDIR=%OCTAVE_STARTUPFILEDIR% VERSION=%OCTAVE_VERSION% +if [ -n "$OCTAVE_HOME" ]; then + ARCHLIBDIR="`echo $ARCHLIBDIR | sed "s,^$PREFIX,$OCTAVE_HOME,"`" + BINDIR="`echo $BINDIR | sed "s,^$PREFIX,$OCTAVE_HOME,"`" + DATADIR="`echo $DATADIR | sed "s,^$PREFIX,$OCTAVE_HOME,"`" + DATAROOTDIR="`echo $DATAROOTDIR | sed "s,^$PREFIX,$OCTAVE_HOME,"`" + EXEC_PREFIX="`echo $EXEC_PREFIX | sed "s,^$PREFIX,$OCTAVE_HOME,"`" + FCNFILEDIR="`echo $FCNFILEDIR | sed "s,^$PREFIX,$OCTAVE_HOME,"`" + IMAGEDIR="`echo $IMAGEDIR | sed "s,^$PREFIX,$OCTAVE_HOME,"`" + INCLUDEDIR="`echo $INCLUDEDIR | sed "s,^$PREFIX,$OCTAVE_HOME,"`" + INFODIR="`echo $INFODIR | sed "s,^$PREFIX,$OCTAVE_HOME,"`" + INFOFILE="`echo $INFOFILE | sed "s,^$PREFIX,$OCTAVE_HOME,"`" + LIBDIR="`echo $LIBDIR | sed "s,^$PREFIX,$OCTAVE_HOME,"`" + LIBEXECDIR="`echo $LIBEXECDIR | sed "s,^$PREFIX,$OCTAVE_HOME,"`" + LOCALAPIARCHLIBDIR="`echo $LOCALAPIARCHLIBDIR | sed "s,^$PREFIX,$OCTAVE_HOME,"`" + LOCALAPIFCNFILEDIR="`echo $LOCALAPIFCNFILEDIR | sed "s,^$PREFIX,$OCTAVE_HOME,"`" + LOCALAPIOCTFILEDIR="`echo $LOCALAPIOCTFILEDIR | sed "s,^$PREFIX,$OCTAVE_HOME,"`" + LOCALARCHLIBDIR="`echo $LOCALARCHLIBDIR | sed "s,^$PREFIX,$OCTAVE_HOME,"`" + LOCALFCNFILEDIR="`echo $LOCALFCNFILEDIR | sed "s,^$PREFIX,$OCTAVE_HOME,"`" + LOCALOCTFILEDIR="`echo $LOCALOCTFILEDIR | sed "s,^$PREFIX,$OCTAVE_HOME,"`" + LOCALSTARTUPFILEDIR="`echo $LOCALSTARTUPFILEDIR | sed "s,^$PREFIX,$OCTAVE_HOME,"`" + LOCALVERARCHLIBDIR="`echo $LOCALVERARCHLIBDIR | sed "s,^$PREFIX,$OCTAVE_HOME,"`" + LOCALVERFCNFILEDIR="`echo $LOCALVERFCNFILEDIR | sed "s,^$PREFIX,$OCTAVE_HOME,"`" + LOCALVEROCTFILEDIR="`echo $LOCALVEROCTFILEDIR | sed "s,^$PREFIX,$OCTAVE_HOME,"`" + MAN1DIR="`echo $MAN1DIR | sed "s,^$PREFIX,$OCTAVE_HOME,"`" + MANDIR="`echo $MANDIR | sed "s,^$PREFIX,$OCTAVE_HOME,"`" + OCTFILEDIR="`echo $OCTFILEDIR | sed "s,^$PREFIX,$OCTAVE_HOME,"`" + OCTINCLUDEDIR="`echo $OCTINCLUDEDIR | sed "s,^$PREFIX,$OCTAVE_HOME,"`" + OCTLIBDIR="`echo $OCTLIBDIR | sed "s,^$PREFIX,$OCTAVE_HOME,"`" + STARTUPFILEDIR="`echo $STARTUPFILEDIR | sed "s,^$PREFIX,$OCTAVE_HOME,"`" +fi +PREFIX="$OCTAVE_HOME" + usage_msg="usage: octave-config [options]" if [ $# -eq 0 ]; then
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2007-02-15 John W. Eaton <jwe@octave.org> + + * toplev.cc (Foctave_config_info): Remove + OCTAVE_CONF_MKOCTFILE_INCFLAGS and OCTAVE_CONF_MKOCTFILE_LFLAGS + from the list. + * oct-conf.h.in (OCTAVE_CONF_MKOCTFILE_INCFLAGS, + OCTAVE_CONF_MKOCTFILE_LFLAGS): Don't define. + (OCTAVE_CONF_INCLUDEDIR, OCTAVE_CONF_OCTINCLUDEDIR, + OCTAVE_CONF_OCTLIBDIR, OCTAVE_CONF_PREFIX): New definitions. + 2007-02-14 Alexander Barth <abarth@marine.usf.edu> * DLD-FUNCTIONS/interpn.cc: New file.
--- a/src/oct-conf.h.in +++ b/src/oct-conf.h.in @@ -165,6 +165,10 @@ #define OCTAVE_CONF_INCFLAGS %OCTAVE_CONF_INCFLAGS% #endif +#ifndef OCTAVE_CONF_INCLUDEDIR +#define OCTAVE_CONF_INCLUDEDIR %OCTAVE_CONF_INCLUDEDIR% +#endif + #ifndef OCTAVE_CONF_LDFLAGS #define OCTAVE_CONF_LDFLAGS %OCTAVE_CONF_LDFLAGS% #endif @@ -233,12 +237,16 @@ #define OCTAVE_CONF_MKOCTFILE_DL_LDFLAGS %OCTAVE_CONF_MKOCTFILE_DL_LDFLAGS% #endif -#ifndef OCTAVE_CONF_MKOCTFILE_INCFLAGS -#define OCTAVE_CONF_MKOCTFILE_INCFLAGS %OCTAVE_CONF_MKOCTFILE_INCFLAGS% +#ifndef OCTAVE_CONF_OCTINCLUDEDIR +#define OCTAVE_CONF_OCTINCLUDEDIR %OCTAVE_CONF_OCTINCLUDEDIR% #endif -#ifndef OCTAVE_CONF_MKOCTFILE_LFLAGS -#define OCTAVE_CONF_MKOCTFILE_LFLAGS %OCTAVE_CONF_MKOCTFILE_LFLAGS% +#ifndef OCTAVE_CONF_OCTLIBDIR +#define OCTAVE_CONF_OCTLIBDIR %OCTAVE_CONF_OCTLIBDIR% +#endif + +#ifndef OCTAVE_CONF_PREFIX +#define OCTAVE_CONF_PREFIX %OCTAVE_CONF_PREFIX% #endif #ifndef OCTAVE_CONF_RANLIB
--- a/src/toplev.cc +++ b/src/toplev.cc @@ -787,8 +787,6 @@ { false, "LIBS", OCTAVE_CONF_LIBS }, { false, "LN_S", OCTAVE_CONF_LN_S }, { false, "MKOCTFILE_DL_LDFLAGS", OCTAVE_CONF_MKOCTFILE_DL_LDFLAGS }, - { false, "MKOCTFILE_INCFLAGS", OCTAVE_CONF_MKOCTFILE_INCFLAGS }, - { false, "MKOCTFILE_LFLAGS", OCTAVE_CONF_MKOCTFILE_LFLAGS }, { false, "RANLIB", OCTAVE_CONF_RANLIB }, { false, "RDYNAMIC_FLAG", OCTAVE_CONF_RDYNAMIC_FLAG }, { false, "RLD_FLAG", OCTAVE_CONF_RLD_FLAG }, @@ -822,13 +820,13 @@ { true, "infofile", OCTAVE_INFOFILE }, { true, "libdir", OCTAVE_LIBDIR }, { true, "libexecdir", OCTAVE_LIBEXECDIR }, + { true, "localapiarchlibdir", OCTAVE_LOCALAPIARCHLIBDIR }, { true, "localapifcnfiledir", OCTAVE_LOCALAPIFCNFILEDIR }, { true, "localapioctfiledir", OCTAVE_LOCALAPIOCTFILEDIR }, { true, "localarchlibdir", OCTAVE_LOCALARCHLIBDIR }, { true, "localfcnfiledir", OCTAVE_LOCALFCNFILEDIR }, { true, "localoctfiledir", OCTAVE_LOCALOCTFILEDIR }, { true, "localstartupfiledir", OCTAVE_LOCALSTARTUPFILEDIR }, - { true, "localapiarchlibdir", OCTAVE_LOCALAPIARCHLIBDIR }, { true, "localverarchlibdir", OCTAVE_LOCALVERARCHLIBDIR }, { true, "localverfcnfiledir", OCTAVE_LOCALVERFCNFILEDIR }, { true, "localveroctfiledir", OCTAVE_LOCALVEROCTFILEDIR },