User:Mtmiller/mkoctfile notes

From Octave
< User:Mtmiller
Revision as of 21:10, 26 April 2012 by Mtmiller (talk | contribs) (Dump some notes about Octave-Forge packages, Makefiles, and use of mkoctfile)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Maybe comm is an outlier, but it uses the MKOCTFILE variable exported by "pkg install" which makes sure it's linking with the right Octave version, path, flags, etc. I have done some searching and found uses of both "mkoctfile" and "MKOCTFILE" throughout the repo. Maybe some packages do and some don't.

This change added environment variables to the "pkg install" function:


Are all packages that have roughly the same?

I think it would be good practice for packages that have simple Makefiles to declare

 MKOCTFILE = mkoctfile

and build using that variable, no ifndef required, minimal change, but this at least allows it to be overridden instead of requiring it to be the default mkoctfile in PATH. Then maybe I'd suggest pkg should be patched to pass MKOCTFILE as a make command argument instead of in the environment as it does now, i.e.

 make OCTAVE=... MKOCTFILE=...

instead of (as it is today)

 OCTAVE=... MKOCTFILE=... make

because I'm not sure what good that does since make variables always override environment variables.