Mercurial > octave
diff build-aux/subst-config-vals.in.sh @ 23712:b95c430c0649
revamp insertion of config variables into binaries and eliminate some macros
* subst-config-vals.in.sh, subst-cross-config-vals.in.sh,
subst-default-vals.in.sh: Strip "^${prefix}/" or "^${exec_prefix} from
directory and file variables before substitution.
* defaults.h: Rename from defaults.in.h.
* defaults.in.cc: Rename from defaults.cc. Move macro substitutions
here from defaults.h
* libinterp/corefcn/module.mk: Generate defaults.cc instead of defaults.in.h
* defaults.h, defaults.in.cc (prepend_octave_home): Rename from
subst_octave_home. Prepend instead of substitute OCTAVE_HOME.
Skip absolute directory and file names.
(prepend_octave_exec_home): New function to handle OCTAVE_EXEC_HOME
separately from OCTAVE_HOME.
(FOCTAVE_EXEC_HOME): New function.
Expose more configuration variables as internal Octave variables.
Change all uses of macros to use variables instead.
* toplev.cc (F__octave_config_info__): Use std::map initializer to
create structs.
* shared-fcns.h (prepend_octave_home): Rename from subst_octave_home.
Prepend instead of substitute OCTAVE_HOME.
(prepend_octave_exec_home): Handle OCTAVE_EXEC_HOME separately from
OCTAVE_HOME.
Import additional support functions.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 28 Jun 2017 15:20:02 -0400 |
parents | 092078913d54 |
children | bba752b37f8e |
line wrap: on
line diff
--- a/build-aux/subst-config-vals.in.sh Wed Jun 28 01:15:21 2017 -0400 +++ b/build-aux/subst-config-vals.in.sh Wed Jun 28 15:20:02 2017 -0400 @@ -21,7 +21,6 @@ : ${SED=@SED@} NO_OCT_FILE_STRIP="@NO_OCT_FILE_STRIP@" -bindir="@bindir@" AMD_CPPFLAGS="@AMD_CPPFLAGS@" AMD_LDFLAGS="@AMD_LDFLAGS@" AMD_LIBS="@AMD_LIBS@" @@ -94,7 +93,6 @@ HDF5_CPPFLAGS="@HDF5_CPPFLAGS@" HDF5_LDFLAGS="@HDF5_LDFLAGS@" HDF5_LIBS="@HDF5_LIBS@" -includedir="@includedir@" KLU_CPPFLAGS="@KLU_CPPFLAGS@" KLU_LDFLAGS="@KLU_LDFLAGS@" KLU_LIBS="@KLU_LIBS@" @@ -105,7 +103,6 @@ LEX="@LEX@" LEXLIB="@LEXLIB@" LFLAGS="@LFLAGS@" -libdir="@libdir@" LIBOCTAVE="@LIBOCTAVE@" LIBOCTINTERP="@LIBOCTINTERP@" LIBS="@LIBS@" @@ -126,8 +123,6 @@ MKOCTFILE_RANLIB="@MKOCTFILE_RANLIB@" OCTAVE_LINK_DEPS="@OCTAVE_LINK_DEPS@" OCTAVE_LINK_OPTS="@OCTAVE_LINK_OPTS@" -octincludedir="@octincludedir@" -octlibdir="@octlibdir@" OCT_LINK_DEPS="@OCT_LINK_DEPS@" OCT_LINK_OPTS="@OCT_LINK_OPTS@" OPENGL_LIBS="@OPENGL_LIBS@" @@ -137,7 +132,6 @@ PCRE_CPPFLAGS="@PCRE_CPPFLAGS@" PCRE_LDFLAGS="@PCRE_LDFLAGS@" PCRE_LIBS="@PCRE_LIBS@" -prefix="@prefix@" PTHREAD_CFLAGS="@PTHREAD_CFLAGS@" PTHREAD_LIBS="@PTHREAD_LIBS@" QHULL_CPPFLAGS="@QHULL_CPPFLAGS@" @@ -182,6 +176,16 @@ Z_LIBS="@Z_LIBS@" config_opts="@config_opts@" +prefix="@prefix@" +exec_prefix="@exec_prefix@" + +bindir=`echo "@bindir@" | sed "s|^${exec_prefix}/||"` +libdir=`echo "@libdir@" | sed "s|^${exec_prefix}/||"` +octlibdir=`echo "@octlibdir@" | sed "s|^${exec_prefix}/||"` + +includedir=`echo "@includedir@" | sed "s|^${prefix}/||"` +octincludedir=`echo "@octincludedir@" | sed "s|^${prefix}/||"` + $SED \ -e "s|%NO_EDIT_WARNING%|DO NOT EDIT! Generated automatically by subst-config-vals.|" \ -e "s|%NO_OCT_FILE_STRIP%|${NO_OCT_FILE_STRIP}|" \ @@ -229,6 +233,7 @@ -e "s|%OCTAVE_CONF_DL_LD%|\"${DL_LD}\"|" \ -e "s|%OCTAVE_CONF_DL_LDFLAGS%|\"${DL_LDFLAGS}\"|" \ -e "s|%OCTAVE_CONF_DL_LIBS%|\"${DL_LIBS}\"|" \ + -e "s|%OCTAVE_CONF_EXEC_PREFIX%|\"${exec_prefix}\"|" \ -e "s|%OCTAVE_CONF_EXEEXT%|\"${EXEEXT}\"|" \ -e "s|%OCTAVE_CONF_GCC_VERSION%|\"${GCC_VERSION}\"|" \ -e "s|%OCTAVE_CONF_GXX_VERSION%|\"${GXX_VERSION}\"|" \