Ticket #13032: trac13032_root.1.patch

File trac13032_root.1.patch, 2.1 KB (added by ppurka, 9 years ago)

Apply to SAGE_ROOT

  • spkg/bin/sage-env

    # HG changeset patch
    # User R. Andrew Ohana <andrew.ohana@gmail.com>
    # Date 1338148660 25200
    # Node ID e42f06ec64487e3b06038f9d6021b0d20a7bb841
    # Parent  ed32c8e659a161ced81eb96285120b9e9d41bf29
    setup ccache in build scripts
    
    diff --git a/spkg/bin/sage-env b/spkg/bin/sage-env
    a b  
    481481    done
    482482fi
    483483
     484# Setup env varariables if ccache is installed
     485if [ -d "$SAGE_LOCAL/libexec/ccache" ]; then
     486    PATH="$SAGE_LOCAL/libexec/ccache:$PATH"; export PATH
     487fi
     488if [ -z "$CCACHE_DIR" ]; then
     489    CCACHE_DIR="$DOT_SAGE/ccache"
     490fi
     491if [ -z "$CYCACHE_DIR" ]; then
     492    CYCACHE_DIR="$DOT_SAGE/cycache"
     493fi
     494if [ -z "$CCACHE_BASEDIR" ]; then
     495    CCACHE_BASEDIR="$SAGE_ROOT"
     496fi
     497export CCACHE_DIR CYCACHE_DIR
     498export CCACHE_BASEDIR
    484499
    485500if [ "$LD" = "" ]; then
    486501    LD="ld"  && export LD
  • spkg/install

    diff --git a/spkg/install b/spkg/install
    a b  
    428428EOF
    429429
    430430# $(TOOLCHAIN) variable containing prerequisites for the build
    431 if [ "$need_to_install_gcc" = yes ]; then
    432     echo >&3 'TOOLCHAIN=$(INST)/$(GCC)'
     431echo >&3 -n 'TOOLCHAIN ='
     432if [ "$SAGE_INSTALL_CCACHE" == yes ]; then
     433    echo >&3 -n ' $(INST)/ccache'
     434fi
     435if [ "$need_to_install_gcc" == yes ]; then
     436    echo >&3 -n ' $(INST)/$(GCC)'
    433437    # Use this option for the prereq configure script, such that it
    434438    # will skip all compiler checks.
    435439    export PREREQ_OPTIONS="--disable-compiler-checks $PREREQ_OPTIONS"
    436 else
    437     echo >&3 'TOOLCHAIN='
    438440fi
     441echo >&3
    439442
    440443# Copy spkg/standard/deps
    441444cat >&3 <<EOF
  • spkg/standard/deps

    diff --git a/spkg/standard/deps b/spkg/standard/deps
    a b  
    497497$(INST)/$(SAGE_SCRIPTS): $(INST)/$(SAGE_ROOT_REPO)
    498498        +$(PIPE) "$(SAGE_SPKG) $(SAGE_SCRIPTS) 2>&1" "tee -a $(SAGE_LOGS)/$(SAGE_SCRIPTS).log"
    499499
     500$(INST)/ccache: $(BASE) $(INST)/$(ZLIB)
     501        +$(PIPE) "$(SAGE_SPKG) ccache 2>&1" "tee -a $(SAGE_LOGS)/ccache.log"
     502        touch $(INST)/ccache
     503
    500504$(INST)/$(GCC): $(INST)/$(MPIR) $(INST)/$(MPFR) $(INST)/$(MPC) \
    501505                $(INST)/$(ZLIB)
    502506        +$(PIPE) "$(SAGE_SPKG) $(GCC) 2>&1" "tee -a $(SAGE_LOGS)/$(GCC).log"