source: trunk/abcl/tools/build-from-lisp.bash

Last change on this file was 15072, checked in by Mark Evenson, 7 years ago

Deprecate tool to build ABCL from another lisp

The results of the Lisp based build system present in
<file:tools/build-from-lisp.bash> had long diverged from the results
of the canonical build description in <file:build.xml>. The
reimplementation of ABCL-BUILD as a contrib based upon UIOP is
currently incomplete for non-ABCL CL implementations, most notably
missing the ability to download the necessary non-Lisp tools from the
network.

The "old" lisp based build code remains in
<file:contrib/abcl-build/build/deprecated.lisp> for those who need to
hack it back to a working state.

Update the README to reflect the deprecation.

  • Property svn:eol-style set to LF
  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 2.7 KB
Line 
1#!/usr/bin/env bash
2# $Id: build-from-lisp.bash 15072 2017-06-11 08:00:14Z mevenson $
3#
4# Build ABCL from a supported Lisp
5
6usage()
7{
8    echo
9    echo "USAGE:"
10        echo "$0 <implementation>"
11#    echo "$0 <implementation> [[ --clean=T | --full=T | --batch=NIL ]]"
12}
13
14if [ -z "$1" ]; then
15    usage
16    exit 1
17fi
18
19check_boolean()
20{
21    case "$1" in
22        [Tt]|[Nn][Ii][Ll])
23            :;;
24        *)
25            usage
26            echo "Error: Argument \`$1' is neither \"nil\" nor \"t\"."
27            exit 1
28            ;;
29    esac
30}
31
32IMPL="$1"
33TEMP=$(getopt --long clean:,full:,batch: -n "$0" -- "$@") 
34
35if [ $? != 0 ] ; then 
36    usage
37    exit 1
38fi
39eval set -- "$TEMP"
40
41# TODO all ignored
42CLEAN="t"
43FULL="t"
44BATCH="t"
45
46# TODO all ignored
47while true ; do
48    case "$1" in
49        --clean) 
50            check_boolean "$2"
51            CLEAN="$2" 
52            shift 2 
53            ;;
54        --full) 
55            check_boolean "$2"
56            FULL="$2"
57            shift 2 
58            ;;
59        --batch) 
60            check_boolean "$2"
61            BATCH="$2" 
62            shift 2 
63            ;;
64        --) shift; break ;;
65        *)  echo "Internal error!" ; exit 1 ;;
66        esac
67done
68
69FORM="(abcl/build:abcl/build)"
70FILE="src/org/abcl/lisp/build/build-abcl.lisp"
71
72abcl()
73{
74    #    exec "$1" --load "$2" --eval "(progn $3 (ext:quit))"
75    exec "$1" --eval "(require :abcl-contrib)(require :abcl-build)" --eval "(abcl-build:build-abcl)"
76}
77
78ecl()
79{
80    exec "$1" -norc -load "$2" -eval "(progn $3 (ext:quit))"
81}
82
83clisp()
84{ 
85    exec "$1" -ansi -q -norc -i "$2" -x "(progn $3 (ext:quit))"
86}
87
88sbcl()
89{
90    exec "$1" --no-userinit --load "$2" --eval "(progn $3 (sb-ext:quit))"
91}
92
93cmucl()
94{
95    exec "$1" -noinit -load "$2" -eval '(setq *load-verbose* nil)' \
96                                 -eval "(progn $3 (ext:quit))"
97}
98
99ccl()
100{
101    exec "$1" -Q --no-init --load "$2" --eval "(progn $3 (ccl:quit))"
102}
103
104notimplemented()
105{
106    usage
107    echo "Error: The build script does not currently support $1."
108    echo "It's easy to change, though. Look at $0, and send a patch!"
109    exit 1
110}
111
112
113
114# We pass along and execute "$1" so users can pass "sbcl-cvs"
115# etc. instead of "sbcl".
116
117case "$IMPL" in
118    abcl*)
119        abcl  "$IMPL" "$FILE" "$FORM"          ;;
120    clisp*)
121        notimplemented "$IMPL" "$FILE" "$FORM"          ;;
122    sbcl*)
123        notimplemented  "$IMPL" "$FILE" "$FORM"          ;;
124    lisp)
125        notimplemented "$IMPL" "$FILE" "$FORM"          ;;   
126    ccl*)
127        notimplemented   "$IMPL" "$FILE" "$FORM"          ;;
128    gcl*)
129        notimplemented "$IMPL" "$FILE" "$FORM" ;;
130    ecl*)
131        notimplemented   "$IMPL" "$FILE" "$FORM"          ;;
132    alisp*)
133        notimplemented "$IMPL" "$FILE" "$FORM" ;;
134    *)
135        usage; 
136        echo "Error: Unrecognized implementation: $IMPL"
137        exit 1 
138        ;;
139esac
Note: See TracBrowser for help on using the repository browser.