#12647: Add support for a "sagerc" script
----------------------------------+-----------------------------------------
Reporter: jdemeyer | Owner: leif
Type: enhancement | Status: closed
Priority: major | Milestone: sage-5.0
Component: scripts | Resolution: fixed
Keywords: | Work issues:
Report Upstream: N/A | Reviewers: John Palmieri
Authors: Jeroen Demeyer | Merged in: sage-5.0.beta9
Dependencies: | Stopgaps:
----------------------------------+-----------------------------------------
Comment (by leif):
Replying to [comment:23 jdemeyer]:
> Exporting a variable which you don't set has no effect. Since `CFLAGS`
wasn't (and still isn't) set in `sage-env`, the `export` did nothing.
>
> Example (GNU bash version 4.0.35(1)-release if it matters):
> {{{
> jdemeyer@arcanis:~$ ( export FOO; env ) | grep FOO
> jdemeyer@arcanis:~$ ( export FOO; FOO=; env ) | grep FOO
> FOO=
> }}}
Of course. But we [still] have things like
{{{
#!sh
if [ "$LDFLAGS" = "" ]; then
LDFLAGS="" && export LDFLAGS
fi
if [ "$CXXFLAGS" = "" ]; then
export CXXFLAGS="$CFLAGS"
fi
}}}
in `sage-env`, which will '''always''' cause `LDFLAGS` and `CXXFLAGS` to
be exported, no matter whether they've previously been unset, or exported
empty. So currently (re)exporting these in e.g. `spkg-install` scripts is
indeed redundant.
I think we should either do that there for all such variables, or none of
them. Especially setting `CXXFLAGS` to `$CFLAGS` even if a user did
`export CXXFLAGS=""` may have somewhat surprising effects, or is (I think)
at least unexpected behaviour.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12647#comment:24>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.