John H Palmieri wrote:
On Jan 11, 1:22 pm, "Dr. David Kirkby" <david.kir...@onetel.net>
wrote:
William Stein wrote:
On Mon, Jan 11, 2010 at 5:49 AM, Dr. David Kirkby
<david.kir...@onetel.net> wrote:
Various bits of SAGE unset 'MAKE', mainly to stop parallel builds. That's a
nuisance to someone that might want to use a version of 'make' different
from the first one in their path.
A simple way around this, is the following bit of code, which preserves the
name or path of the make command, but ignores any options it might have.
#!/bin/sh
echo "MAKE is currently $MAKE"
MAKE=`echo $MAKE | awk '{print $1}'`
echo "MAKE is now $MAKE"
Let's see it in use:
drkir...@hawk:~$ export MAKE="/usr/sfw/bin/gmake -j 100"
drkir...@hawk:~$ ./unsetmake.sh
MAKE is currently /usr/sfw/bin/gmake -j 100
MAKE is now /usr/sfw/bin/gmake
Cool. Instead of suggesting people use bits of code like this in
their spkg-install's, why don't we make a single *sage sh library*
that gets used. It could start as a script
local/bin/sage-spkg-lib
that gets sourced before spkg-install gets sourced. It could contain
at least the following functions:
* unsetmake -- based on what you wrote above
* check_err -- based on what Gonzalo posted in another thread.
I think this would be much better than scattering coding snippets in
spkg-installs, since there is one place where we can fix/change
everything related to something like this.
William
To be honest, there are not that many packages where 'make' is unset, so adding
one line is no big deal in those packages.
Clearly as many things as possible should be set in one place.
If you can come up with a better name, you can perhaps put
MAKEUNSET=`echo $MAKE | awk '{print $1}'`
export MAKEUNSET
in sage-env, and then use MAKEUNSET (not the best name) in any spkg
where you want an unset version. Why run the same shell script
repeatedly, even if it's just one line?
--
John
Having thought about it more, there could be a problem with my original
approach. IF someone typed
$ export MAKE=/my/favorite/make -j 200
$ make
then my approach, and your suggestion for sage-env would work.
If however a user typed:
$ /my/favorite/make -j 200
this would probably not work. (At least in the ways floated around to date).
--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org