Reply to comment

A quick shell include for setting paths for programs installed in non-traditional locations

A page in the Beyond Linux from Scratch manual describes environment variables that should be set when installing software in a non-traditional location (e.g. your home directory).

I've written a sh/bash include that can be included from .bashrc to set these variables, as well as PYTHON_PATH for separately installed Python libraries:

#!/bin/bash

PREFIX=$HOME/usr

export PATH="$PREFIX/bin:$PATH"
export PYTHONPATH="$PREFIX/lib/python2.4/site-packages:$PYTHON_PATH"
export MANPATH="$PREFIX/man:$MANPATH"
export INFOPATH="$PREFIX/info:$INFOPATH"
export LD_LIBRARY_PATH="$PREFIX/lib:$LD_LIBRARY_PATH"
export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH"
export CPPFLAGS="-I$PREFIX/includes $CPPFLAGS"
export LDFLAGS="-L$PREFIX/lib $LDFLAGS"

Trackback URL for this post:

http://samat.org/trackback/115

Reply

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Insert Flickr images: [flickr-photo:id=230452326,size=s] or [flickr-photoset:id=72157594262419167,size=m].
  • You may use [inline:xx] tags to display uploaded files or images inline.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.

More information about formatting options