source: spkg-install @ 7059:9a21eb071a71

Revision 7059:9a21eb071a71, 1.8 KB checked in by Craig Citro <craigcitro@…>, 6 years ago (diff)

Another tiny c_lib/scons fix.

  • Property exe set to *
Line 
1#!/bin/sh
2
3#######################################
4# Install SAGE libraries
5#######################################
6
7CUR=`pwd`
8
9if [ $? -ne 0 ]; then
10   exit 1
11fi
12
13DEVEL=$SAGE_ROOT/devel
14
15if [ ! -d "$DEVEL" ]; then
16    mkdir "$DEVEL"
17fi
18
19if [ $? -ne 0 ]; then
20   exit 1
21fi
22
23D=`pwd`
24E=`basename "$D"`
25
26if [ ! -d "$DEVEL/old" ]; then
27    mkdir "$DEVEL/old"
28fi
29
30if [ ! -f "$DEVEL/sage-main"/.hg/00changelog.i ]; then
31   mv "$DEVEL/sage-main" "$DEVEL/old/sage-bad_delete_me"
32fi
33
34if [ -d "$DEVEL/sage-main" ]; then
35    cd "$DEVEL/sage-main"
36    #hg pull "$SAGE_SERVER"/hg/sage-main
37    # Pull in changes from the archive just downloaded.
38    hg pull "$CUR"
39    hg merge tip
40    hg ci -m "merge"
41    # Make the pulled in changes take effect.
42    hg update
43
44    # Since we are doing an upgrade, it is very important that the
45    # build always completely works with no dependency issues. It is
46    # OK if the build takes a little longer, since this is a full
47    # upgrade.  So we touch all pyrex code.
48
49    touch */*.pyx */*/*.pyx */*/*/*.pyx */*/*/*/*.pyx */*/*/*/*/*.pyx */*/*/*/*/*.pyx  */*/*/*/*/*/*.pyx  2> /dev/null
50
51    # Delete the scons target too
52    cd c_lib
53    rm *.os *.so # just to be sure!
54    scons -c "$SAGE_LOCAL"/include/
55    scons -c "$SAGE_LOCAL"/lib/  # delete target
56    cd ..
57
58    # We also delete the build directory, since it could contain
59    # old .py files we don't want anymore.
60    rm -rf build
61
62    "$SAGE_ROOT/sage" -b main
63    if [ $? -ne 0 ]; then
64        echo "Error building new version of SAGE."
65    fi
66    exit $?
67fi
68
69mkdir "$DEVEL/sage-main"
70cp -pr * .hg* "$DEVEL/sage-main/"
71
72cd "$DEVEL/sage-main"
73
74# touch and build everything
75sage -b main
76
77# repeat -- this copies over all the pyx files, so they appear when
78# you use inspect.
79sage -b main
80
81if [ $? -ne 0 ]; then
82    echo "ERROR installing SAGE"
83    exit 1
84fi
Note: See TracBrowser for help on using the repository browser.