Building: Difference between revisions

1,526 bytes removed ,  28 October 2019
Strip subsection in favor of MXE.
(→‎Tweaks: Overhaul section.)
(Strip subsection in favor of MXE.)
Line 216: Line 216:


In any case, don't forget to remove any created ''alias'' entries in {{Path|~/.bashrc}}.
In any case, don't forget to remove any created ''alias'' entries in {{Path|~/.bashrc}}.
=== Managing your own program hierarchy (optional) ===
If you intend to compile for yourself a lot of utilities, you may use a specific "usr" hierachy into your own dir (Linux from scratch way). Go back to step 2, and configure octave as:
./configure --prefix=${HOME}/usr
The other steps (make; make install) do not change. In order to use your own hierachy, you should set a few environment variables in your .profile:
  # set LD_LIBRARY_PATH if not set
  (echo $LD_LIBRARY_PATH | grep -q lib) || export LD_LIBRARY_PATH="/usr/local/lib:$HOME/usr/lib:$HOME/usr/local/lib"
  # set PATH so it includes user's private bin if it exists
  if [ -d "$HOME/bin" ] ; then
        (echo $PATH | grep -q $HOME/usr/bin) || export PATH="$HOME/bin:$HOME/usr/bin:$HOME/usr/local/bin:$PATH"
  fi
 
  # set MANPATH so it includes user's private bin if it exists
  if [ -d "$HOME/usr/share/man" ] ; then
    (echo $MANPATH | grep -q $HOME/usr/share/man) || export MANPATH="$HOME/usr/local/share/man:$HOME/usr/share/man:`manpath -q`"
  fi
 
  if [ -d "$HOME/usr/share/info" ]; then
    export INFOPATH="$INFOPATH:$HOME/usr/share/info"
  fi
 
  if [ -d "$HOME/usr/lib/python" ]; then
    (echo $PYTHONPATH | grep -q $HOME/usr/lib/python) || export PYTHONPATH="$HOME/usr/local/lib/python:$HOME/usr/lib/python"
  fi
 
  if [ -d "$HOME/usr/lib/pkgconfig" ]; then
    (echo $PKG_CONFIG_PATH | grep -q $HOME/usr/lib/pkgconfig) || export PKG_CONFIG_PATH="$HOME/usr/lib/pkgconfig"
  fi
This way, most ordinary commands like "man octave", "info octave", or launching octave itself, will first explore your own hierachy.


== See also ==
== See also ==
Line 257: Line 221:
* [https://hg.savannah.gnu.org/hgweb/octave/file/tip/README <code>README</code>] and [https://hg.savannah.gnu.org/hgweb/octave/file/tip/etc/HACKING.md <code>/etc/HACKING.md</code>] in the development repository.  
* [https://hg.savannah.gnu.org/hgweb/octave/file/tip/README <code>README</code>] and [https://hg.savannah.gnu.org/hgweb/octave/file/tip/etc/HACKING.md <code>/etc/HACKING.md</code>] in the development repository.  
* https://octave.org/doc/interpreter/Installation.html
* https://octave.org/doc/interpreter/Installation.html
* [[MXE]] -- a more customized Octave build including many self-compiled tools.


== Footnotes ==
== Footnotes ==