1 Microsoft Windows
[Version
5.2.3790]
2 (C
) Copyright
1985-2003 Microsoft Corp
.
4 d
:\Experiments\clbuild
>python check
6 python
: can
't open file 'check
': [Errno 2] No such file or directory
8 d:\Experiments\clbuild>python clbuild check
10 File "clbuild", line 23
11 if [ "$CLNET_USER" == "" ]; then
13 SyntaxError: invalid syntax
15 d:\Experiments\clbuild>cat clbuild
18 # (we use env for non-Linux OSes)
20 # Script to update/install the latest versions of all the most
21 # important Common Lisp projects. Uses SBCL but otherwise tries to be
22 # somewhat independent of your local environment.
24 # Intended to quickly bootstrap a working development environment for
25 # Lisp free software hackers.
27 # Idea from jhbuild by James Henstridge (a Gnome hacker).
30 # Luke Gorrie <luke@member.fsf.org>
31 # Anthony Chaumas-Pellet <achaumas@wispery.info>
32 # Christophe Rhodes <csr21@cantab.net>
33 # David Lichteblau <david@lichteblau.com>
34 # Eric Marsden <eric.marsden@free.fr>
35 # Andreas Fuchs <asf@boinkor.net>
39 if [ "$CLNET_USER" == "" ]; then
40 CLNET_USER=:pserver:anonymous:anonymous
44 # MacOS doesn't have
"readlink -e", needed to follow symlinks
.
45 # We hack it using readlink, dirname, and cd.
48 while test
-h
"$self"; do
50 self
=`readlink
"$self"`
56 system_dir
="$BASE/systems"
57 source_dir
="$BASE/source"
58 target_dir
="$BASE/target"
60 if test x`uname
-o
2>/dev
/null`
= xCygwin
; then
66 source
"$BASE/clbuild.conf.default"
67 if test
-f
"$BASE/clbuild.conf"; then
68 source
"$BASE/clbuild.conf"
74 echo
"$(cd "$
(dirname
"$1")" ; pwd)/$(basename "$
1")")
77 case $UPDATE_SCRIPT
in
83 UPDATE_SCRIPT
=update_project
86 # do will still want this?
87 UPDATE_SCRIPT
="$(make_absolute_pn "$UPDATE_SCRIPT
")"
90 USER_INIT
="$(make_absolute_pn "$USER_INIT
")"
92 if test
-n
"$windowsp" -a x$USER_INIT
= x
/dev
/null
; then
97 case x$CLIM_BACKEND
in
98 xgraphic
-forms|xgtkairo|xbeagle
)
99 EXTRA_CLIM_FEATURES
="(pushnew :clim-$CLIM_BACKEND *features*)"
103 EXTRA_CLIM_FEATURES
="nil"
104 maybe_load_clx
="(unless (find-package :xlib) (asdf:operate 'asdf:load-op :clx))"
107 echo
"invalid $CLIM_BACKEND, see clbuild.conf.default for examples." 1>&2
112 if test
-n
"$windowsp"; then
113 system_namestring
="`cygpath -m $system_dir`/"
114 source_namestring
="`cygpath -m $source_dir`/"
115 target_namestring
="`cygpath -m $target_dir`/"
116 self
="c:/cygwin/bin/bash $self"
118 system_namestring
="$system_dir/"
119 source_namestring
="$source_dir/"
120 target_namestring
="$target_dir/"
122 if test
-n
"$SETF_CENTRAL_REGISTRY"; then
123 set_central_registry
="(setq asdf:*central-registry* '(#p\"${system_namestring}\"))"
125 set_central_registry
="(push #p\"${system_namestring}\" asdf:*central-registry*)"
131 end_toplevel_options
="" #fixme
134 require_asdf
="(require :asdf)"
137 if test x
"$USER_INIT" = x
/dev
/null
; then
138 # -l /dev/null does not work
140 elif test
-n
"$USER_INIT"; then
141 common_options
="-n -l $USER_INIT"
146 # fixme: this doesn't quite match the SBCL version yet:
147 build_options
="$noinform --batch $common_options"
148 run_options
="--batch $common_options"
153 echo
'*** Using CLISP. Please note that CLISP support is not complete.'
157 end_toplevel_options
="" #fixme
160 require_asdf
="(load \"$BASE/source/asdf-for-clisp/asdf.lisp\")"
163 if test
-n
"$USER_INIT"; then
164 common_options
="-norc -i $USER_INIT"
169 build_options
="-on-error exit $common_options"
170 run_options
="-on-error exit $common_options"
172 if test
-d
"$BASE/source/asdf-for-clisp"; then
173 echo
"*** asdf checkout found"
176 echo
"NEW checking out asdf for use with clisp"
177 (cd
"$BASE/source" && cvs
-d ${SF_USER}
@sbcl.cvs
.sourceforge
.net
:/cvsroot
/sbcl co
-d asdf
-for-clisp sbcl
/contrib
/asdf
)
184 noinform
="--noinform"
185 end_toplevel_options
="--end-toplevel-options"
188 require_asdf
="(require :asdf)"
191 if test
-n
"$USER_INIT"; then
192 common_options
="--userinit $USER_INIT"
197 build_options
="$noinform --noprint --disable-debugger $common_options"
198 run_options
="--disable-debugger $common_options"
201 if [ ! -z $CCL
]; then
203 elif [ ! -z $CLISP
]; then
204 configure_clisp
"$CLISP"
205 elif [ ! -z
"$SBCL" ]; then
206 configure_sbcl
"$SBCL"
207 elif [ -x ${target_dir}
/bin
/sbcl
]; then
208 export SBCL_HOME
=${target_namestring}lib
/sbcl
/
209 lisp
="${target_dir}/bin/sbcl"
210 if ! test
-f
"$BASE"/monster
.core
; then
211 lisp
="$lisp --core ${target_namestring}lib/sbcl/sbcl.core"
213 configure_sbcl
"$lisp"
214 elif [ -x ${source_dir}
/ccl
/lx86cl64
]; then
215 configure_ccl ${source_dir}
/ccl
/lx86cl64
220 [ -d
"$system_dir" ] || mkdir
"$system_dir"
221 [ -d
"$source_dir" ] || mkdir
"$source_dir"
222 [ -d
"$target_dir" ] || mkdir
"$target_dir"
225 ${lisp} $common_options \
226 $
eval "$require_asdf" \
227 $
eval "$set_central_registry" \
228 $
eval "$EXTRA_CLIM_FEATURES" \
233 # Start the Lisp with user arguments. For SBCL, we can do that using
234 # --end-toplevel-options. For other Lisps, go through a temporary
240 if test
-n
"$end_toplevel_options"; then
243 $
eval "$require_asdf" \
244 $
eval "$set_central_registry" \
245 $
eval "$EXTRA_CLIM_FEATURES" \
246 $
eval "(load \"$BASE/clbuild.lisp\")" \
247 $end_toplevel_options \
250 TMPDIR
=`mktemp
-d
/tmp
/clbuild
.XXXXXXXXXX`
258 while test
-n
"$1"; do
260 echo $
1 >>$TMPDIR
/args
266 $
eval "$require_asdf" \
267 $
eval "$set_central_registry" \
268 $
eval "$EXTRA_CLIM_FEATURES" \
269 $
eval "(defparameter cl-user::*clbuild-args* \"$TMPDIR/args\")" \
270 $
eval "(load \"$BASE/clbuild.lisp\")"
274 start_application() {
275 lisp_trampoline
"$noinform $run_options" "$@"
279 if test x
"$1" = x
--dump
; then
286 concatenated_args
="$@"
287 if test
-z
"$concatenated_args"; then
288 concatenated_args
="$main_projects"
292 lisp_trampoline
"$build_options" \
299 n_asd
=`ls
-1 "$system_dir"/*.asd | wc
-l`
300 echo
"$n_asd system definition files registered"
305 if tty
0>&1 >/dev
/null
; then
308 echo
-n
"$blank_line"
310 echo
-n $line | cut
-b
1-65 | tr
-d
'\n'
313 echo
-n
"$blank_line"
326 if test
-d `echo ${name}
*/ | awk
'{print $1;}'`
; then
335 if test
-n
"$dry_run"; then
341 if test
-n
"$dry_run"; then
350 if [ -d $name
]; then
351 actual
="`cat $name/_darcs/prefs/defaultrepo`"
352 if test
"x$actual" = "x$url"; then
355 echo
"MISMATCH: $1 was installed from $actual, current is $url"
360 if test
-n
"$dry_run"; then
364 # don't use tail_last, since darcs already has this kind of progress bar
365 if [ -d $name
]; then
366 dribble_get
"darcs pull" $name
369 if ! test
-d _darcs
; then
370 echo ERROR
: not a darcs repository
376 dribble_get
"darcs get" $name
385 if [ -d $name
]; then
386 actual
="`cd $name && git config --get remote.origin.url`"
387 if test
"x$actual" = "x$url"; then
390 echo
"MISMATCH: $1 was installed from $actual, current is $url"
395 if test
-n
"$dry_run"; then
399 if [ -d $name
]; then
400 dribble_get
"git pull" $name
403 if ! test
-d
.git
; then
404 echo ERROR
: not a git repository
410 dribble_get
"git clone" $name
419 if [ -d $name
]; then
420 actual
="`cd $name && svn info | grep ^URL: | awk '{print $2;}'`"
421 if test
"x$actual" = "x$url"; then
424 echo
"MISMATCH: $1 was installed from $actual, current is $url"
429 if test
-n
"$dry_run"; then
433 dribble_get
"svn co" $name
435 svn co $url $name | tail_last
441 target_directory
="$3"
443 if [ -d $module
]; then
444 actual
="`cat $module/CVS/Root`"
445 if test
"x$actual" = "x$repository"; then
448 echo
"MISMATCH: $1 was installed from $actual, current is $repository"
453 if test
-n
"$dry_run"; then
457 dribble_get
"cvs co" $module
459 cvs
-d $repository co $
{3+-d
"$3"} $module | tail_last
471 echo
"Warning: Using deprecated method get_tarball."
473 if test
-n
"$dry_run"; then
474 if ls
-d ${name}
* >/dev
/null
; then
475 directories
="`ls -d ${name}*`"
476 echo
"TARBALL: $directories installed from a tarball, cannot check"
483 tmp
=$TMPDIR
/${name}
.tar
.gz
485 dribble_get wget $name
487 # We used to delete old directories completely here. Unfortunately,
488 # that can easily lead to loss of changes, a problem all the VC checkout
489 # method do not have to the extent. Save all old data instead. Users
490 # can delete the resulting backup directories easily enough themselves.
491 if ls ${name}
* >/dev
/null
; then
493 backup
=`mktemp
-d backup_${name}_XXXXXXXXXX`
494 mv ${name}
* "$backup/"
497 --no
-check
-certificate \
502 tar v${flags}xf
"$tmp" | tail_last
510 get_svn $name svn
://common
-lisp
.net
/project
/$name
/svn
/$
2
517 get_cvs_aux $module ${CLNET_USER}
@common-lisp
.net
:/project
/$project
/cvsroot
520 get_cvs_clnet_full() {
522 clnetproject
="${2:-$1}"
525 get_cvs_aux $path ${CLNET_USER}
@common-lisp
.net
:/project
/$clnetproject
/cvsroot $clbuildproject
532 get_cvs_aux $module ${SF_USER}
@$project
.cvs
.sourceforge
.net
:/cvsroot
/$project
536 get_darcs $
1 http
://common
-lisp
.net
/~loliveira
/ediware
/$
1
539 get_clbuild_mirror() {
540 get_darcs $
1 http
://common
-lisp
.net
/project
/clbuild
/mirror
/$
1
543 get_lichteblau_com() {
544 get_git $
1 http
://www
.lichteblau
.com
/git
/$
1.git
548 get_git $
1 http
://git
.b9
.com
/$
1.git
552 get_git $
1 http
://git
.xach
.com
/$
1.git
556 get_tarball
"$1" "$2" j
560 if test x$
1 = x
--dry
-run
; then
568 if test $
# -ne 1; then
570 echo error
: invalid number of arguments
571 echo usage
: ... update
[--dry
-run
] PROJECT_NAME
575 if ! grep
-h
"^$1 " "$BASE/projects" "$BASE/wnpp-projects" "$BASE/implementations" >/dev
/null
; then
576 echo Error
: cannot download unknown project $
1
577 rm
"$BASE/.clbuild-resume"
580 found
=`grep
-h
"^$1 " "$BASE/projects" "$BASE/wnpp-projects" "$BASE/implementations" | cut
-d\
# -f1`
581 update_project_2 $found
589 ( $action $name
"$@" )
593 if test
-n
"$clbuild_resume"; then
594 if test $
# -gt 0; then
595 echo
"error: --resume conflicts with arguments" 1>&2
598 previous
=`cat
"$BASE/.clbuild-resume"`
599 CLBUILD_DEPENDENCIES
=no update_1 $previous
600 elif test $
# -gt 0; then
601 rm
-f $source_dir
/*/.clbuild
-skip
-update
605 echo
"Error: arguments expected"
607 echo
" clbuild update PROJECT1 PROJECT2 PROJECT3... # only these"
608 echo
" clbuild update --resume # resume interrupted update"
609 echo
" clbuild update --main-projects # all in projects file"
610 echo
" clbuild update --wnpp-projects # all in wnpp-projects file"
611 echo
" clbuild update --all-projects # both files"
612 echo
" clbuild update --installed # everything in source/"
618 touch
"$BASE"/.core
-is-stale
620 TMPDIR
=`mktemp
-d
/tmp
/clbuild
.XXXXXXXXXX`
624 if test
-f
"$BASE/.clbuild-resume"; then
627 echo error
: update was interrupted
.
628 echo
'Use "clbuild update --resume" to retry. (See also "clbuild skip PROJECT").'
636 touch $TMPDIR
/dependencies0
637 while test $
# -ge 1; do
638 echo $
1 >>$TMPDIR
/arguments0
639 if grep
"^$1 " ../dependencies
>/dev
/null
; then
640 found
=`grep
"^$1 " ../dependencies`
642 echo $x
>>$TMPDIR
/dependencies0
645 echo $
1 >>$TMPDIR
/dependencies0
646 echo
"warning: no dependencies for $1 found" 1>&2
650 sort
<$TMPDIR
/arguments0 | uniq
>$TMPDIR
/arguments
651 sort
<$TMPDIR
/dependencies0 | uniq
>$TMPDIR
/dependencies
653 if ! cmp $TMPDIR
/arguments $TMPDIR
/dependencies
>/dev
/null
; then
654 case
"$CLBUILD_DEPENDENCIES" in
656 extra
=`diff $TMPDIR
/arguments $TMPDIR
/dependencies | grep
'^>' | cut
-d
' ' -f2 | xargs echo`
657 echo
"The following extra dependencies were found: $extra"
658 echo
-n
"include dependencies in update? (Y/n)"
664 mv $TMPDIR
/arguments $TMPDIR
/dependencies
675 mv $TMPDIR
/arguments $TMPDIR
/dependencies
678 echo
"error: invalid \$CLBUILD_DEPENDENCIES" 1>&2
683 cp $TMPDIR
/dependencies
"$BASE/.clbuild-resume"
685 for project
in $
(cat $TMPDIR
/dependencies
); do
686 skipfile
="$project"/.clbuild
-skip
-update
687 if test
-f
"$skipfile" -a
-n
"$clbuild_resume"; then
688 echo
"resume: skipping update of $project"
690 ${UPDATE_SCRIPT} ${UPDATE_ARGS} $project
691 ln
-f
-s $
(pwd
)/${project}
*/*.asd
"${system_dir}"/
698 rm
"$BASE/.clbuild-resume"
700 echo
"update complete"
706 # some (buggy) projects try to hide their .asd files from us:
707 ln
-sf $source_dir
/mcclim
/Experimental
/freetype
/*.asd ${system_dir}
/
708 ln
-sf $source_dir
/eclipse
/system
.lisp ${system_dir}
/eclipse
.asd
709 ln
-f
-s $source_dir
/graphic
-forms
/src
/external
-libraries
/*/*/*.asd \
711 ln
-sf $source_dir
/clg
/*/*.asd ${system_dir}
712 ln
-sf $source_dir
/cells
-gtk
/*/*.asd ${system_dir}
714 # also, override uffi:
715 ln
-sf $source_dir
/cffi
/uffi
-compat
/uffi
.asd ${system_dir}
/
721 check check availability of all necessary helper applications
723 list [PATTERN
] list all projects
, or projects matching PATTERN
725 update
[--dependencies|
--no
-dependencies
] PROJECT_SPEC
726 download
/update this project
728 download
/update main projects
. With
--resume
, consider
729 only projects that a previous update run failed to fetch
.
731 mark this project
as done
for the purposes of update
--resume
733 recompile PROJECT_SPEC
compile fasls
734 dumpcore PROJECT_SPEC recompile
and dump a core
file for faster startup
735 build PROJECT_SPEC update
&& dumpcore
737 diff show local
changes (for all version
-controlled projects
)
738 check
-urls compared installed repository urls agains current locations
739 clean
-links remove broken symlinks
in systems
/
740 update
-missing download only projects
not present yet
741 register
-asd PROJECT add
.asd
file symlinks
for PROJECT
743 compile-implementation sbcl
[XC_HOST
] compile SBCL
744 compile-implementation ccl
compile Clozure CL
745 compile-implementation clisp
compile CLISP
747 world build sbcl
and specified projects
749 clean
[PROJECT
] delete all compiled
object files
[in source
/PROJECT
]
750 trash PROJECT move source
/PROJECT to trash
/
751 mrproper trash all projects
753 slime run the Superior Lisp Interaction Mode
in a fresh Emacs
754 lisp run Lisp
in the
terminal (using sbcl
.core
)
755 preloaded run Lisp
in the
terminal (using monster
.core
)
756 slime
-configuration
print .emacs excerpt
for slime
758 record
-dependencies rebuild dependency information
file
760 For update
/recompile
/build
/dumpcore a PROJECT_SPEC can be used
:
761 PROJECT1 PROJECT2 PROJECT3
... # only these
762 --main
-projects
# all in projects file
763 --wnpp
-projects
# all in wnpp-projects file
764 --all
-projects
# both files
765 --installed
# everything in source/
767 Starting applications
:
769 run APPLICATION run this application
770 run
--help show
help for applications
772 If you do
'world' or 'buildsbcl' then SBCL will be installed
in
773 target
/ and used
for future commands
. If you don
't run these commands
774 (or you remove target/) then clbuild uses the 'sbcl
' in your PATH.
776 For configuration options (including for non-SBCL lisps), see clbuild.conf.
783 clbuild run APPLICATION [ARGS...]
785 run listener run the McCLIM listener
786 run gsharp run the Gsharp score editor
787 run climacs run the Climacs text editor
788 run closure [HOME_PAGE_URL] run the CLOSURE web browser
789 (required Debian packages: gif2png,libjpeg-progs)
790 run beirc run the Beirc IRC client
791 run climplayer run the CLIMPlayer music player
792 (required Debian packages: mplayer, fileschanged, fam)
793 run demodemo run some random CLIM examples
794 run clim-alerts run CLIM alerts
795 run eclipse [DPY] run the eclipse window manager
797 run hunchentoot run the Hunchentoot web server test
798 run webdav DIR run the CL-WEBDAV server, serving directory DIR
799 (required Debian packages: libssl-dev)
801 run parse-xml FILENAME
802 check XML for well-formedness
803 run validate-xml FILENAME
804 check XML for validity
805 run validate-relax-ng [--compact yes] XML-FILENAME SCHEMA-FILENAME
806 check XML for validity against a Relax NG Schema
807 run html-to-xhtml HTML-FILENAME OUTPUT-FILENAME
808 run xhtml-to-html XML-FILENAME OUTPUT-FILENAME
809 convert between HTML 4 and XHTMl
811 run vecto-demo generate a test image using vecto
812 run adw-charting-demo generate a test image using adw-charting
814 run ltk-demo show a dialog using ltk
819 if ! "$1" --help >/dev/null; then
820 echo Error: Cannot find a working installation of "$1"
823 echo "found `which $1`"
826 # for programs that don't understand
--help, or (like cvs
) are stupid enough
827 # to return a failure code when invoked using a correct --help option...
828 check_misdesigned_program() {
829 if ! which
"$1" >/dev
/null
; then
830 echo Error
: Cannot find an installation of
"$1" at all
833 echo
"found `which $1`"
837 echo
"Checking for helper applications..."
838 check_misdesigned_program cvs
842 # get_tarball is evil and unused anyway, so no need to bother the FreeBSD
843 # users with warnings about their non-GNU version of tar
845 check_misdesigned_program curl
846 check_misdesigned_program git
847 check_misdesigned_program mktemp
848 echo
"Success: All helper applications found."
851 echo
"Checking Lisp startup..."
852 if ${lisp} $run_options $
eval $quit
>/dev
/null
; then
853 echo
"Success: Lisp starts up using \"$lisp\""
855 echo
"Error: Cannot run Lisp using \"$lisp\""
860 echo
"Looking for installable systems..."
865 rm
-f
"$BASE"/.core
-is-stale
866 rm
-f
"$BASE"/monster
.core
867 recompile
--dump
"$@"
870 if test
-f
"$BASE"/monster
.core
; then
871 # Initially I thought this warning might be helpful, but it's usually
873 # if test -f "$BASE/.core-is-stale"; then
874 # echo "using $BASE/monster.core"
875 # echo 'note: "clbuild update" was used since core file creation'
876 # echo 'note: consider re-running dumpcore'
878 run_options
="$core_option "$BASE
"/monster.core $run_options"
882 cat $
1 | awk
'{print $1;}' |
while read name
; do
883 if test
-n
"$name" -a x
"$name" != 'x#'; then
890 for f
in ${source_dir}
/*; do
892 if test
-d
"$f"; then
893 if test
-d
"$f"/_darcs \
897 && grep
"^$name " "$BASE/dependencies" >/dev
/null
901 echo
"skipping $f" 1>&2
907 main_projects
=`scan_projects
"$BASE/projects"`
908 wnpp_projects
=`scan_projects
"$BASE/wnpp-projects"`
909 all_projects
="$main_projects $wnpp_projects"
911 implementations
=`scan_projects
"$BASE/implementations"`
913 set_installed_projects() {
914 installed_projects
=`scan_installed`
920 TMPDIR
=`mktemp
-d
/tmp
/clbuild
.XXXXXXXXXX`
928 cat
"$BASE/projects" "$BASE/wnpp-projects" "$BASE/implementations" | sort | grep
-i
-E
"$pattern" |
while read project rest
; do
929 if test
-n
"$project" -a x
"$project" != 'x#'; then
930 description
=`echo $rest | cut
-d\
# -f2`
931 case `cd $source_dir
&& ${UPDATE_SCRIPT}
--dry
-run $project | cut
-d
: -f1`
in
942 echo
"failed to check URL" 1>&2
946 echo
"$status $project" >>$TMPDIR
/left
947 echo $description
>>$TMPDIR
/right
950 paste $TMPDIR
/left $TMPDIR
/right | expand
-t
25
955 if ! test
-d
"$source_dir/cl-ppcre"; then
958 update_project cl
-ppcre
959 ln
-f
-s $source_dir
/cl
-ppcre
/*.asd
"${system_dir}"/
964 write_slime_configuration() {
965 if test
-n
"$START_SLIME_USING_CORE"; then
972 ;; possibly controversial
as a
global default
, but shipping a lisp
973 ;; that dies trying to talk to slime
is stupid
, so
:
974 (set-language
-environment
"UTF-8")
975 (setq slime
-net
-coding
-system
'utf-8-unix)
978 (setq load-path (cons "${source_namestring}slime" load-path))
979 (setq load-path (cons "${source_namestring}slime/contrib" load-path))
980 (setq slime-backend "$BASE/.swank-loader.lisp")
981 (setq inhibit-splash-screen t)
982 (load "${source_namestring}slime/slime")
983 (setq inferior-lisp-program "$BASE/clbuild $cmd")
984 (setq slime-use-autodoc-mode nil)
985 (slime-setup '(slime
-fancy slime
-tramp slime
-asdf
))
988 # while we're at it, also write the swank loader
989 cat
>$BASE
/.swank
-loader
.lisp
<<EOF
990 (unless (find
-package
'swank-loader)
991 (load "$source_dir/slime/swank-loader.lisp"))
996 mkdir -p "$BASE/trash"
997 basename=`basename $1`
998 today=`date +'%Y
-%m
-%d'`
999 trash="$BASE/trash/$today"
1000 if test -e "$trash"; then
1001 if test -e "$trash/$basename"; then
1002 trash=`mktemp -d $BASE/trash/${today}_${basename}_XXXXXXXXXX`
1007 echo moving "$1" to "$trash/$basename"
1020 echo cleaning fasls in `pwd`
1021 find . -name "*.fasl" -exec rm {} \;
1022 find . -name "*.lx64fsl" -exec rm {} \;
1024 if test $# -gt 1; then
1025 while test $# -gt 1; do
1026 ( cd "$source_dir/$2" && clean_fasls )
1030 core="$BASE"/monster.core
1031 if test -f "$core"; then
1040 if test $# -le 1; then
1041 echo 'usage
: trash
[PROJECT
...]'
1044 while test $# -gt 1; do
1046 if test -d "$d"; then
1049 echo "cannot trash non-existing directory $d"
1055 for d in $source_dir/* $target_dir; do
1056 if test -d "$d"; then
1062 echo "deleting monster.core systems/*"
1063 rm -f "$BASE"/monster.core ${system_dir}/*
1066 touch "$source_dir/$2/.clbuild-skip-update"
1069 unset clbuild_resume
1071 while test -n "$2"; do
1074 CLBUILD_DEPENDENCIES="no"
1078 CLBUILD_DEPENDENCIES="yes"
1082 clbuild_resume="yes"
1086 extra="$extra $main_projects"
1090 extra="$extra $wnpp_projects"
1094 extra="$extra $all_projects"
1098 set_installed_projects
1099 extra="$extra $installed_projects"
1107 export clbuild_resume
1108 export CLBUILD_DEPENDENCIES
1113 for project in ${2:-$main_projects}; do
1114 if ! test -d "${source_dir}/$project"; then
1119 recompile|build|dumpcore|world)
1123 while test -n "$1"; do
1126 projects="$projects $main_projects"
1130 projects="$projects $wnpp_projects"
1134 projects="$projects $all_projects"
1138 CLBUILD_DEPENDENCIES="yes"
1139 set_installed_projects
1140 projects="$projects $installed_projects"
1148 if test -z "$projects" -a $# -eq 0; then
1150 echo "Error: arguments expected"
1152 echo " clbuild $operation PROJECT1 PROJECT2 PROJECT3... # only these"
1153 echo " clbuild $operation --main-projects # all in projects file"
1154 echo " clbuild $operation --wnpp-projects # all in wnpp-projects file"
1155 echo " clbuild $operation --all-projects # both files"
1156 echo " clbuild $operation --installed # everything in source/"
1162 recompile "$@" $projects
1165 update "$@" $projects
1166 dumpcore "$@" $projects
1169 dumpcore "$@" $projects
1172 "$0" clean && "$0" update sbcl && "$0" compile-implementation sbcl && "$0" build "$@" $projects
1178 echo "error: invalid command updatesbcl"
1179 echo "Use 'clbuild update sbcl
' instead."
1184 echo "error: invalid command buildsbcl"
1185 echo "Use 'clbuild
compile-implementation sbcl
' instead."
1188 compile-implementation)
1191 if [ -n "$CCL" ]; then
1192 echo "Cowardly refusing to build SBCL when \$CCL is set." 1>&2
1195 if ! test -d ${source_dir}/sbcl; then
1196 echo "sbcl not found, try running 'clbuild update sbcl
'" 1>&2
1200 if test -z "$windowsp"; then
1201 ctf=$source_dir/sbcl/customize-target-features.lisp
1202 if test -f $ctf; then
1203 echo $ctf already exists
1208 (pushnew :sb-thread list)
1213 (cd $source_dir/sbcl; sh make.sh "$3"; SBCL_HOME= INSTALL_ROOT=${target_dir} sh install.sh)
1216 if [ -z "$CCL" ]; then
1217 echo "can't build CCL unless \$CCL
is set." 1>&2
1220 if ! test -d ${source_dir}/ccl; then
1221 echo "ccl
not found
, try running
'clbuild update ccl'" 1>&2
1224 ccl_old=`dirname "$CCL
"`
1225 ccl_new=${source_dir}/ccl
1230 headerdir=x86-headers64
1235 echo "don
't know how to build CCL for your ISA, please adjust clbuild as needed" 2>&1
1241 echo "don't know how to build CCL
for your OS
, please adjust clbuild
as needed
" 2>&1
1245 if ! test -f "$ccl_old
/$image
"; then
1246 echo "can
't find existing CCL installation in $ccl_old" 2>&1
1249 # cp $ccl_old/$headerdir/libc/*.cdb $ccl_new/$headerdir/libc/
1250 cp -r $ccl_old/$headerdir $ccl_new/ || true
1251 cp $ccl_old/$binary $ccl_old/$image $ccl_new/
1254 ./$binary -e '(rebuild
-ccl
:force t
)'
1259 Set this in clbuild.conf to enable the new CCL:
1260 CCL=$ccl_old/$binary
1264 if ! test -d ${source_dir}/clisp; then
1265 echo "clisp not found, try running 'clbuild update clisp
'" 1>&2
1268 cd $source_dir/clisp
1271 rm -f src/config.cache
1272 ./configure --with-libsigsegv-prefix=/usr
1277 echo "unrecognized argument. valid are: sbcl ccl clisp" 2>&1
1288 if test -f "$BASE"/monster.core; then
1289 common_options="$core_option "$BASE"/monster.core $common_options"
1296 emacs=${EMACS-emacs}
1297 write_slime_configuration >"$BASE/.start-slime.el"
1298 $emacs -l "$BASE/.start-slime.el" ${emacs_args}
1300 slime-configuration)
1302 echo ';; add this to your ~
/.emacs to use clbuild
and its slime
:'
1304 write_slime_configuration
1314 check_program fileschanged
1315 check_misdesigned_program mplayer
1318 if ! test -f /usr/lib/libssl.so; then
1319 echo "WARNING: /usr/lib/libssl.so not found, did you install OpenSSL?"
1320 echo "(type RET to continue anyway)"
1325 if ! test -f /usr/include/GL/glut.h; then
1326 echo "WARNING: /usr/include/GL/glut.h not found, did you install OpenGL libraries?"
1327 echo "(type RET to continue anyway)"
1332 start_application "$@"
1334 record-dependencies)
1336 for project in $all_projects; do
1337 if ! test -d "${source_dir}/$project"; then
1341 # hack: don't want the core here
1342 run_options
="$build_options"
1343 start_application record
-dependencies
"$all_projects"
1347 for project
in $
{2:-$all_projects
}; do
1348 ${UPDATE_SCRIPT}
--dry
-run $project
1354 if test
-h
"$f"; then
1355 link_target
=`readlink
"$f"`
1356 if ! test
-e
"$link_target"; then
1357 echo
"removing broken link from $f to $link_target"
1365 dir="$source_dir/$project"
1367 if test
-z
"$project"; then
1368 echo
"usage: clbuild register-asd PROJECT" 1>&2
1371 if ! test
-d
"$dir"; then
1372 echo
"cannot find $dir" 1>&2
1375 for f
in $
dir/*.asd
; do
1376 if test
-f
"$f"; then
1378 ln
-f
-s $f
"${system_dir}"/
1385 diff
="${source_dir}/.diff"
1386 cp
/dev
/null
"$diff"
1388 darcs diff
-u
>>"$diff"
1391 g
="${source_dir}/$f"
1392 if test
-d
"$g"; then
1394 echo
-n diffing $f
... 1>&2
1395 if test
-d CVS
; then
1396 cvs diff
-u
2>/dev
/null | grep
-v
'^?' >>"$diff"
1397 elif test
-d
.svn
; then
1399 elif test
-d
'{arch}'; then
1401 elif test
-d _darcs
; then
1402 darcs diff
-u
>>"$diff"
1403 elif test
-d
.git
; then
1406 echo
-n
" FAILED" 1>&2
1413 help|
--long-help|
-H|
""|
--help|
-h
)
1423 echo
"invalid command $1, try --help for help"
1427 d
:\Experiments\clbuild
>python clbuild
.py check
1428 python clbuild
.py check
1429 File
"clbuild.py", line
23
1432 SyntaxError: invalid syntax
1434 d
:\Experiments\clbuild
>python clbuild
.py check
1435 python clbuild
.py check
1436 File
"clbuild.py", line
147
1437 print >>asdffile
, r
"#+clisp (dolist (dir-candidate (directory (concatenate 'string *lisp-dirs* \"*/\"))) (let ((asd
-candidate (merge
-pathnames
\"*.asd
\" dir-candidate
))) (when (directory asd
-candidate
) (push
dir-candidate asdf
:*central
-registry
*))))")
1439 SyntaxError: invalid syntax
1441 d:\Experiments\clbuild>python clbuild.py check
1442 python clbuild.py check
1443 File "clbuild
.py
", line 193
1444 getopt.getopt(sys.argv[1:], "", [ "setup
=", "check
" ]])]
1446 SyntaxError: invalid syntax
1448 d:\Experiments\clbuild>python clbuild.py check
1449 python clbuild.py check
1450 File "clbuild
.py
", line 193
1451 getopt.getopt(sys.argv[1:], "", [ "setup
=", "check
" ]])
1453 SyntaxError: invalid syntax
1455 d:\Experiments\clbuild>python clbuild.py check
1456 python clbuild.py check
1457 Traceback (most recent call last):
1458 File "clbuild
.py
", line 5, in <module>
1460 ImportError: No module named pat
1462 d:\Experiments\clbuild>python clbuild.py check
1463 python clbuild.py check
1464 Traceback (most recent call last):
1465 File "clbuild
.py
", line 181, in <module>
1466 if (lisp == "clisp
"):
1467 NameError: name 'lisp' is not defined
1469 d:\Experiments\clbuild>python clbuild.py check
1470 python clbuild.py check
1472 d:\Experiments\clbuild>python clbuild.py check
1473 python clbuild.py check
1475 d:\Experiments\clbuild>python clbuild.py check
1476 python clbuild.py check
1477 File "clbuild
.py
", line 184
1480 SyntaxError: invalid syntax
1482 d:\Experiments\clbuild>python clbuild.py check
1483 python clbuild.py check
1485 d:\Experiments\clbuild>python clbuild.py --check
1486 python clbuild.py --check
1487 CVS Found and present.
1488 SVN Found and present.
1489 Darcs found and present
1490 GIT Found and present.
1492 d:\Experiments\clbuild> cd ..