help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: install directory for add-on's


From: c.
Subject: Re: install directory for add-on's
Date: Wed, 21 Mar 2012 19:23:41 +0100

On 21 Mar 2012, at 12:13, Dan McMahill wrote:

> 
> I have an open source package that I develop/maintain and among other
> things I have a mex interface to it.  The package uses the usual
> autoconf/automake build system.  The question is about the best way to
> pick the install directory for the .mex files as well as the .m files
> that have the help for the functions.
> 
> I've used the output of
> 
> octave-config --print LOCALVEROCTFILEDIR
> 
> and appended ${PACKAGE}-${VERSION} to it.  This works nicely if I
> install the package as the same user as I installed octave.  However, if
> octave were installed by a sysadmin into /usr/local or some such
> location, it is more difficult for a single non-root user of the system
> to compile my package and access it.  In that case, addpath()'s can be
> added to ~/.octaverc but my real question is how should I make my
> package honor --prefix while at the same time doing something reasonable
> with LOCALVEROCTFILEDIR?
> 
> I suppose I could add a --with-site-oct= option for users who want to
> ignore the octave-config output, but I really prefer that
> 
> ./configure --prefix=${HOME}/opt
> 
> Just Work for folks.
> 
> Anyway, is there any sort of established best practice for this case?

Yes, you can arrange your .m and .c files in the form of a package
as described here:

     http://octave.sourceforge.net/developers.html

and then Octave will take care of the configure/build/install process
by itself and place all files in the appropriate locations.

There are a few scripts available that automate the taso of creating
a package from a directory containing a set of source files.


> Thanks
> -Dan
> 
> p.s. If you wonder "why .mex instead of .oct" it is because the
> limitations of mex are not issues for this package and mex let me
> support octave, scilab, and matlab in one shot.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]