Changeset 16091 in project for chicken


Ignore:
Timestamp:
09/26/09 13:42:37 (10 years ago)
Author:
felix
Message:

added sv2git script; improvements in chicken-scheme script, fixed rename in manifest

Location:
chicken/trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • chicken/trunk/distribution/manifest

    r15794 r16091  
    267267private-namespace.scm
    268268compiler-namespace.scm
    269 scripts/scheme
     269scripts/chicken-scheme
    270270scripts/tools.scm
    271271scripts/test-dist.sh
  • chicken/trunk/scripts/README

    r13962 r16091  
    55This directory contains a couple of things that might be useful:
    66
    7   scheme
     7  chicken-scheme
    88
    9     A wrapper sh(1) script that allows automatic compilation of Scheme
     9    A wrapper bash(1) script that allows automatic compilation of Scheme
    1010    scripts. If you precede a Scheme file with a header line like this
    1111
    12       #!/usr/bin/env scheme
     12      #!/usr/bin/env chicken-scheme
    1313
    14     then a compiled version of the code will be stored in $HOME/.cache
    15     and executed, instead of the original source file.
     14    then a compiled version of the code will be stored in
     15    $HOME/.chicken-scheme.cache and executed, instead of the original
     16    source file. The wrapper script will automatically detect changes to
     17    the file and recompile as necessary. If called with no arguments,
     18    "chicken-scheme" will simply start "csi".
    1619
    1720  tools.scm
  • chicken/trunk/scripts/chicken-scheme

    r16083 r16091  
    44# variables:
    55#
    6 # CHICKEN_AUTOCOMPILE_DEBUG
     6# CHICKEN_SCHEME_DEBUG
    77
    88
    9 dbgoption=
     9#XXX change this on installation:
     10chickenprefix=$HOME
     11
     12dbgoption=-S
    1013cache=$HOME/.chicken-scheme.cache
    1114uname=`uname`
    1215wd=`pwd`
    1316
    14 if test -n "$CHICKEN_AUTOCOMPILE_DEBUG"; then
     17if test -n "$CHICKEN_SCHEME_DEBUG"; then
    1518    set -x
    16     dbgoption="-v2"
     19    dbgoption="${dbgoption} -v2"
    1720fi
    1821
     
    2326fi
    2427
    25 if test $uname = "Darwin"; then
    26     prgh=`md5 -q $prg`
     28if test ${uname} = "Darwin"; then
     29    prgh=`md5 -q ${prg}`
    2730else
    28     prgh=`md5sum $prg | sed -n -e 's/\([^[:space:]]*\).*/\1/p'`
     31    prgh=`md5sum ${prg} | sed -n -e 's/\([^[:space:]]*\).*/\1/p'`
    2932fi
    3033
    31 if test \! -d $cache; then
    32     mkdir -p $cache
     34compile_log="${cache}/${prgh}.compile"
     35
     36if test \! -d ${cache}; then
     37    mkdir -p ${cache}
    3338fi
    3439
    35 if test "$prg" -nt "$cache/$prgh"; then
    36     csc $dbgoption "$prg" -o "$cache/$prgh"
     40if test "${prg}" -nt "${cache}/${prgh}"; then
     41    if ${chickenprefix}/bin/csc ${dbgoption} "${prg}" -o "${cache}/${prgh}" > "${compile_log}" 2>&1; then :
     42    else
     43        cat "${compile_log}"
     44        exit 1
     45    fi
    3746fi
    3847
    39 if test -x "$cache/$prgh"; then
     48if test -x "${cache}/${prgh}"; then
    4049    shift
    41     exec "$cache/$prgh" "$@"
     50    exec "${cache}/${prgh}" "$@"
    4251else
    4352    echo "can not run $1"
Note: See TracChangeset for help on using the changeset viewer.