Robert Bradshaw wrote:
Since the goal is to remove the -j flags, why not

MAKE=`echo $MAKE | sed -E "s/-j +[^ ]+|--jobs=[^ ]+//g"`

This way if any other flags were part of $MAKE they wouldn't get dropped as well. (Not sure if Solaris can handle extended regex...but that' easy to fix if it can't.)

- Robert

The reasons why people want make unset is not always explained. I assume it is to stop parallel builds, but perhaps they worry about other options.

I certainly would avoid making use of an 'extended' stuff, as it simply more likely to break on other platforms. Stick to POSIX and it wont make the efforts of anyone else considering a port more difficult. Solaris 'sed' does not understand -E option.

I'd like to get a port going to HP-UX. Not that I'd intend using Sage on HP-UX, but having other systems builds code often shows up bugs. Some like the bug using 'date +%s' were happening on Solaris, but were less obvious than on HP-UX, so I'd never noticed the error message.

Unfortunately, mpir might be an issue with HP-UX - there is no support for HP-UX. Hoever, GMP, python and mpfr all build fine, but mpir might make it impossible.

Dave



On Jan 11, 2010, at 6:29 PM, Gonzalo Tornaria wrote:

On Mon, Jan 11, 2010 at 5:42 PM, William Stein <wst...@gmail.com> wrote:
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.

Sounds good... Let me suggest

arg1 ()
{
   echo $1
}

resetmake ()
{
   MAKE=`arg1 $MAKE`
}

This avoids spawning awk altogether... (won't spawn anything if echo
is builtin as in bash)

Alternative (no echo):

setmake1 ()
{
   MAKE=$1
}

resetmake ()
{
   setmake1 $MAKE
}


Also, it might be a good idea to define:

sage-spkg-lib ()
{
   return
}

The idea is to override the loading of the shell library so it's not
loaded more than once.
(not sure if dashes are allowed in function names, so that may not work).

Alternative:

alias sage-spkg-lib=true

(still no spawning if true is builtin)

Gonzalo
--
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


-- 
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

Reply via email to