Mercurial > octave-dspies
view run-octave.in @ 13010:edc5ec6e949b
maint: allow --enable-static --disable-dl to work again
* oct-conf.h.in (OCTAVE_CONF_OCTAVE_LINK_DEPS,
OCTAVE_CONF_OCTAVE_LINK_OPTS, OCTAVE_CONF_OCT_LINK_DEPS,
OCTAVE_CONF_OCT_LINK_OPTS): New macros.
* common.mk (do_subst_config_vals): Substitute them.
* toplev.cc (octave_config_info): Add them to the info map
* libcruft/link-deps.mk, liboctave/link-deps.mk, src/link-deps.mk:
New files.
* libcruft/Makefile.am, liboctave/Makefile.am, src/Makefile.am:
Include link-deps.mk files to get link options and dependencies.
Set link options in _LDFLAGS variable, not _LIBADD variable.
* configure.ac (--enable-dl): Update help message.
* configure.ac (AMCOND_LINK_ALL_DEPS): New conditional.
* liboctave/link-deps.mk, src/link-deps.mk: Use it.
* src/DLD-FUNCTIONS/module-files: Store file-specific CPPFLAGS,
* LDFLAGS, and LIBRARY info here.
src/Makefile.am: Not here.
* src/DLD-FUNCTIONS/config-module.awk: Use file-specific CPPFLAGS,
LDFLAGS, and LIBRARY info from module-files to generate variable
definitions and rules.
* src/Makefile.am (DLD_DYNAMIC_SRC, DLD_STATIC_SRC, OCTAVE_LIBS,
OCTINTERP_LINK_DEPS): Delete.
(octave_LDADD): Set to liboctinerp.la and $(OCTAVE_LINK_DEPS), not
$(OCTAVE_LIBS).
(octave_LDFLAGS): New variable.
(DLD_STATIC_DEF_FILES, DLD_DYNAMIC_DEF_FILES): Delete.
(DLD_FUNCTIONS_DEF_FILES): New variable.
(DEF_FILES): Set conditionally.
(DLD_FUNCTIONS_PKG_ADD_FILE): New conditionally defined variable.
Change all uses of hard-coded file name.
(DLD-FUNCTIONS/PKG_ADD:): Conditionally define rule.
* mkoctfile.in, mkoctfile.cc.in: Update for new linking rules.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 26 Aug 2011 15:36:14 -0400 |
parents | fd0a3ac60b0e |
children | 12814f1fbbd2 |
line wrap: on
line source
#! /bin/sh ## ## run-octave -- run Octave in the build tree. ## ## Copyright (C) 2006-2011 John W. Eaton ## ## This file is part of Octave. ## ## Octave is free software; you can redistribute it and/or modify it ## under the terms of the GNU General Public License as published by the ## Free Software Foundation; either version 3 of the License, or (at ## your option) any later version. ## ## Octave is distributed in the hope that it will be useful, but WITHOUT ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ## for more details. ## ## You should have received a copy of the GNU General Public License ## along with Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. AWK=%AWK% FIND=%FIND% SED=%SED% # FIXME -- is there a better way to handle the possibility of spaces # in these names? top_srcdir='%abs_top_srcdir%' builddir='%builddir%' d1="$top_srcdir/test" d2="$top_srcdir/scripts" d3="$builddir/scripts" d4="$builddir/src" d1_list=`$FIND "$d1" -type d -a ! \( \( -name private -o -name '@*' \) -a -prune \) -exec echo '{}' ';' | $SED 's/$/:/'` d2_list=`$FIND "$d2" -type d -a ! \( \( -name private -o -name '@*' \) -a -prune \) -exec echo '{}' ';' | $SED 's/$/:/'` d3_list=`$FIND "$d3" -type d -a ! \( \( -name private -o -name '@*' \) -a -prune \) -exec echo '{}' ';' | $SED 's/$/:/'` d4_list=`$FIND "$d4" -type d -a ! \( \( -name private -o -name '@*' \) -a -prune \) -exec echo '{}' ';' | $SED 's/$/:/'` d1_path=`echo "$d1_list" | $AWK '{ t = (s $0); s = t; } END { sub (/:$/, "", s); print s; }'` d2_path=`echo "$d2_list" | $AWK '{ t = (s $0); s = t; } END { sub (/:$/, "", s); print s; }'` d3_path=`echo "$d3_list" | $AWK '{ t = (s $0); s = t; } END { sub (/:$/, "", s); print s; }'` d4_path=`echo "$d4_list" | $AWK '{ t = (s $0); s = t; } END { sub (/:$/, "", s); print s; }'` LOADPATH="$d1_path:$d2_path:$d3_path:$d4_path" IMAGEPATH="$top_srcdir/scripts/image" DOCFILE="$builddir/doc/interpreter/doc-cache" INFOFILE="$top_srcdir/doc/interpreter/octave.info" ## Checking for string equality below with prepended x's in order to ## handle problems with empty strings. if [ $# -gt 0 ]; then if [ "x$1" = "x-g" ]; then driver="gdb --args" shift elif [ "x$1" = "x-gud" ]; then ## Frontends for gdb (e.g. Emacs's GUD mode) need --annotate=3 driver="gdb --annotate=3 --args" shift elif [ "x$1" = "x-valgrind" ]; then driver="valgrind --tool=memcheck" shift elif [ "x$1" = "x-strace" ]; then driver="strace -o octave.trace" shift fi fi OCTAVE_SITE_INITFILE="$top_srcdir/scripts/startup/main-rcfile" \ exec $builddir/libtool --mode=execute $driver \ "$builddir/src/octave" --no-init-path --path="$LOADPATH" \ --image-path="$IMAGEPATH" --doc-cache-file="$DOCFILE" \ --info-file="$INFOFILE" "$@"