Mercurial > hg > octave-nkf
changeset 18164:c56ce7c65019
maint: Periodic merge of gui-release to default.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 23 Dec 2013 20:17:51 -0500 |
parents | 8071c0a9d193 (current diff) eb51f47d9dee (diff) |
children | d6aaf821cf8f |
files | configure.ac src/Makefile.am |
diffstat | 4 files changed, 33 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgtags +++ b/.hgtags @@ -81,3 +81,4 @@ 3a9efb68272df556dccb84c87933dd8238e88902 ss-3-7-6 cc13924a4266fb0359f59fabdce11071e6051d48 ss-3-7-7 d734216aa2b1022c190e6b07d7ccdd59fe15678f rc-3-8-0-1 +f1fa148766d623f7f24cf541ea8b88d8c1b63d33 rc-3-8-0-2
--- a/configure.ac +++ b/configure.ac @@ -25,7 +25,7 @@ OCTAVE_VERSION="$PACKAGE_VERSION" OCTAVE_API_VERSION_NUMBER="49" OCTAVE_API_VERSION="api-v$OCTAVE_API_VERSION_NUMBER+" -OCTAVE_RELEASE_DATE="2013-12-04" +OCTAVE_RELEASE_DATE="2013-12-21" OCTAVE_COPYRIGHT="Copyright (C) 2013 John W. Eaton and others." AC_SUBST(OCTAVE_VERSION) AC_SUBST(OCTAVE_API_VERSION_NUMBER)
--- a/src/Makefile.am +++ b/src/Makefile.am @@ -49,11 +49,11 @@ octave \ octave-cli -OCTAVE_VERSION_LINKS = octave-cli-$(version) +OCTAVE_VERSION_LINKS = octave-cli-$(version)$(EXEEXT) if AMCOND_BUILD_GUI - OCTAVE_BINARIES += octave-gui - OCTAVE_VERSION_LINKS += octave-gui-$(version) + archlib_PROGRAMS = octave-gui + OCTAVE_VERSION_LINKS += octave-gui-$(version)$(EXEEXT) endif OCTAVE_CORE_LIBS = \ @@ -197,11 +197,11 @@ ## We need these file names in the build tree because the wrapper ## program (main.cc) will try to invoke the versioned binaries. -octave-cli-$(version): octave-cli +octave-cli-$(version)$(EXEEXT): octave-cli$(EXEEXT) rm -f $@ $(LN_S) $< $@ -octave-gui-$(version): octave-gui +octave-gui-$(version)$(EXEEXT): octave-gui$(EXEEXT) rm -f $@ $(LN_S) $< $@
--- a/src/main.in.cc +++ b/src/main.in.cc @@ -46,6 +46,10 @@ #define OCTAVE_VERSION %OCTAVE_VERSION% #endif +#ifndef OCTAVE_ARCHLIBDIR +#define OCTAVE_ARCHLIBDIR %OCTAVE_ARCHLIBDIR% +#endif + #ifndef OCTAVE_BINDIR #define OCTAVE_BINDIR %OCTAVE_BINDIR% #endif @@ -439,6 +443,20 @@ return obd.empty () ? subst_octave_home (std::string (OCTAVE_BINDIR)) : obd; } +static std::string +get_octave_archlibdir (void) +{ + // Accept value from the environment literally, but substitute + // OCTAVE_HOME in the configuration value OCTAVE_ARCHLIBDIR in case + // Octave has been relocated to some installation directory other than + // the one originally configured. + + std::string dir = octave_getenv ("OCTAVE_ARCHLIBDIR"); + + return dir.empty () + ? subst_octave_home (std::string (OCTAVE_ARCHLIBDIR)) : dir; +} + // Adapted from libtool wrapper. #if defined (__WIN32__) && ! defined (__CYGWIN__) @@ -593,13 +611,17 @@ bool gui_libs = true; std::string octave_bindir = get_octave_bindir (); - - std::string file = octave_bindir + dir_sep_char; + std::string octave_archlibdir = get_octave_archlibdir (); #if defined (HAVE_OCTAVE_GUI) - file += "octave-gui-" OCTAVE_VERSION; + // The Octave version number is already embedded in the + // octave_archlibdir directory name so we don't need to append it to + // the octave-gui file name. + + std::string file = octave_archlibdir + dir_sep_char + "octave-gui"; #else - file += "octave-cli-" OCTAVE_VERSION; + std::string file + = octave_bindir + dir_sep_char + "octave-cli-" OCTAVE_VERSION; #endif char **new_argv = new char * [argc + 1];