A suggestion for "make"

47 views
Skip to first unread message

john_perry_usm

unread,
May 24, 2015, 2:41:03 PM5/24/15
to sage-...@googlegroups.com
I once knew that "sage -b" is the proper way to rebuild after a small change to Sage, but I've been working with other software since then. On most software, "make" is the ordinary way to go, so it tripped lightly off my fingers. Thereby I discovered that typing "make" rebuilds an awful lot of sage, including files otherwise undefiled by my hands (so to speak), and not dependent on my change. Maybe it rebuilds the whole deal?

This can be an easy mistake to make, though I reckon I'm the only one dumb enough to do it twice in five minutes in two separate installations. Does it seem reasonable to add a prompt at the beginning of the Makefile that points this out, suggests './sage -b' if they just want to fix some changes, and asks the user if s/he really wants to rebuild all of Sage?

Or am I completely wrong about what is going on?

john perry

Simon King

unread,
May 24, 2015, 3:52:17 PM5/24/15
to sage-...@googlegroups.com
Hi John,
"make" sometimes involves a lot of compilation if you switch back and
forth in git branches that are based on different versions of Sage. But
after all, if you work with different Sage versions then rebuilding the
spkgs that have changed between versions is the right thing to do.

If you just change something in the library, "make" is clever enough
to only rebuild what has changed. Nonetheless (at least that's my
experience) it can still take a long time till "make" finds out that the
docs haven't changed much.

Anyway, "make" does *not* want to rebuild all of Sage unless there is a
reason. So, I don't see a reason for changing it.

NB: Since for me the docs are the most annoying aspect of "make", I usually
do "make start".

Best regards,
Simon

john_perry_usm

unread,
May 24, 2015, 5:53:56 PM5/24/15
to sage-...@googlegroups.com

"make" sometimes involves a lot of compilation if you switch back and
forth in git branches that are based on different versions of Sage. But
after all, if you work with different Sage versions then rebuilding the
spkgs that have changed between versions is the right thing to do.

I would think that's the problem, but in at least one case the build failed immediately in one branch, with nothing recompiled. When I switched to the original branch, it went about recompiling most everything.
 
Anyway, "make" does *not* want to rebuild all of Sage unless there is a
reason. So, I don't see a reason for changing it.

OK
 
NB: Since for me the docs are the most annoying aspect of "make", I usually
do "make start".

Even that's not my problem.

Thanks, though
john

Jeroen Demeyer

unread,
May 26, 2015, 2:32:27 AM5/26/15
to sage-...@googlegroups.com
On 2015-05-24 20:41, john_perry_usm wrote:
>Does it seem reasonable to add a prompt at the beginning
> of the Makefile that points this out, suggests './sage -b' if they just
> want to fix some changes
I am very much against this. The normal way to rebuild is to use "make",
while "./sage -b" should only be used if you know what you're doing.

I have seen several bug reports which were just people forgetting to run
"make". So my impression is that we need to advertise "./sage -b" less,
not more.

I agree with Simon that the docs are annoying. However, I usually run
"make" in a different shell window. I can already run and test Sage
while the documentation is still building.

Jeroen.
Reply all
Reply to author
Forward
0 new messages