diff --git a/tools/build-and-install b/tools/build-and-install deleted file mode 100755 index adcf817d5302a63219a300af80da8fdc72368c7c..0000000000000000000000000000000000000000 --- a/tools/build-and-install +++ /dev/null @@ -1,304 +0,0 @@ -#!/bin/sh -# Install/build cmucl cores. -# David Axmark (davida@isil.detron.se) -# Rewritten 940501. -# This script was suppled by David Axmark. It rebuilds CMU CL from sources. -# It uses his build-and-install script, and may contain sun dependencies. -# - -# Try to avoid depending on locally installed stuff. -PATH=/bin:$PATH -export PATH - -sed_fix () -{ - ( - file=$1; shift - if test ! -f $file.before-sed - then - sedscript=/tmp/sedscript-$$ - > $sedscript - while test -n "$1" - do - # Dont fail for args begginging with -n - /usr/5bin/echo "$1" >> $sedscript - shift - done - mv $file $file.before-sed - echo "Applying sed fixes to $file" - sed -f $sedscript $file.before-sed > $file - rm -f $sedscript - fi - ) -} - -mkdir_if_needed () { if test ! -d "$1"; then mkdir "$1"; fi; } - -usage () -{ - echo "Usage:$0 cmucl_version [build_options]" - echo "Example: $0 17e -all" - exit 1 -} - -if test -z "$1"; then usage; fi - -ver=$1; shift -if expr "$ver" : "[0-9]\{1,3\}[a-z]\{1,\}" > /dev/null -then - dummy=t -else - echo "The version $ver seems funny to me. Expected somthing like 17e." - exit 1 -fi - -# Set a lot of variables. -sys=sunos -base=${MY_BASEDIR:-/my}/cmucl -local_dir=$base/own-builds -CMUCL_ROOT=$base -CMUCL_EMPTYFILE=/var/tmp/empty -subdir=$ver -src=$base/src/$ver -tooldir=$src/tools -build_dir=$base/build -dest=$build_dir/$sys/$subdir -lisp=variant-lisp -safe_lisp="variant-lisp -version $ver" -logfile=$build_dir/build-$ver-log-`date +%H%M%S` -report_memory_layout=\ -'(format t "read-only ~X~%static ~X~%dynamic ~X~%" - sparc:target-read-only-space-start sparc:target-static-space-start - sparc:target-dynamic-space-start)' -export ver tooldir build_dir CMUCL_ROOT CMUCL_EMPTYFILE sys subdir dest src lisp - -if test -z "$1"; then usage; fi - -# We need this for the log file -mkdir_if_needed $build_dir -( -while test -n "$1" -do -echo "Doing: $1" -case "$1" -in - -all-build-steps) - # All steps - echo "Doing all steps nesessariy to build a cmucl core." - set - -all \ - -setup -genesis -compile-c-code -compile-lisp-code -worldbuild -mk-lisp - ;; - - -remove-old-installation) - rm -rf $base/release-$ver - ;; - - -remove-build-directory) - # We leave $base/build since we want to keep the log files. - rm -rf $dest - ;; - - -install-distribution) - cd $base - if test -d release-$ver - then - echo "Release $ver already installed" - exit 1 - fi - vername=sunos - mkdir release-$ver - cd release-$ver - any_cat $base/distributions/$ver-$vername.tar* | gtar xf - - any_cat $base/distributions/$ver-extra-$vername.tar* | gtar xf - - mkdir src; cd src - any_cat $base/distributions/$ver-source.tar.* | gtar xf - - cd $base/src - ln -s ../release-$ver/src $ver - ;; - - -config) - # Configure a default kernel with CLX - cd $base/release-$ver/lib - conf=`/usr/5bin/echo -e "4\n6\n"` - echo "$conf" | CMUCL_VERSION=$ver ./config - ;; - - -clean-up) - # Remove or compress some files that are not strictly needed - rm -rf *.BAK subsystems - cd ../doc - gzip --best *.ps *.doc *.txt - echo "Done" - ;; - - -apply-patch) - name=$2; shift - echo "Applying patch: $name" - if test ! -f $src/patch-$name-applied - then - patch --directory $src --strip=1 < $local_dir/$ver-$name-patch - touch $src/patch-$name-applied - fi - ;; - - -add-local-c-code) - # Make sure that we link again - rm -f $dest/lisp/lisp - ml=$MY_BASEDIR_VERSION/lib - clm_lib=$MY_BASEDIR_VERSION/wlisp/gina/clm/lib.sun4 - local_src=17e-extra-c-code.c - local_libs="-L$ml -lreg -lpisam -lhash -lmisam \ - -lmerge -lnisam -lheap -linput -lmycurses -lpcurses -lmysys \ - -ldbug -lstrings $ml/rx.o $ml/replace-many.o \ - $clm_lib/unixsocket.o $clm_lib/io.o" - ;; - - -clean-c-code) - cd $dest/lisp - gmake -f $src/lisp/GNUmakefile clean - ;; - - -setup) - # Fix makefile so we can use the VPATH feature. - if test ! -f $src/lisp/patch-GNUmakefile-applied - then - patch --directory $src/lisp \ - < $local_dir/$ver-GNUmakefile-patch - touch $src/lisp/patch-GNUmakefile-applied - fi - # Create build directory stucture - mkdir_if_needed $build_dir/$sys - mkdir_if_needed $build_dir/$sys/$subdir - # Create directory structure if needed. - if test ! -d $build_dir/$sys/$subdir/lisp - then - cd $src - # Suns find will not do a $var/{} substitution. - # So we do this instead. - find . -type d -print | while read dir; do mkdir $dest/$dir; done - fi - # Create Config & Depends - cd $dest/lisp - # Create Config file. - cat > Config << EOF - CPPFLAGS = -I. -I/usr/include/X11 -DSUNOS # -DDEBUG - CC = gcc # -Wall -Wstrict-prototypes -Wmissing-prototypes - CPP = /lib/cpp - CFLAGS = -O - ASFLAGS = -O - NM = nm -gp - ASSEM_SRC = sparc-assem.S - ARCH_SRC = sparc-arch.c - OS_SRC = sunos-os.c os-common.c $local_src - OS_LINK_FLAGS=-static - OS_LIBS=$local_libs - VPATH=$src/lisp:$local_dir -EOF - # Create a Depends file - if test ! -f Depends - then - > Depends - # Create fake internals.h so make depend works. - > internals.h - gmake -f $src/lisp/GNUmakefile depend - rm -f internals.h - fi - ;; - - -genesis) - echo "Map file for ldb version 0" > $dest/lisp/lisp.map - $safe_lisp -noinit << EOF - (setf (ext:search-list "target:") '("$dest/")) - (setf (ext:search-list "src:") '("$base/src/$ver/")) - (load "src:compiler/sparc/parms") - (load "src:compiler/generic/new-genesis") - $report_memory_layout - (in-package :lisp) - (setf *genesis-core-name* "target:lisp/kernel.core") - (setf *genesis-c-header-name* t) - (setf *genesis-symbol-table* "target:lisp/lisp.map") - (setf *genesis-map-name* t) - (setf *target-page-size* 8192) - (genesis nil) - (ext:quit) -EOF - ;; - - -compile-c-code) - cd $dest/lisp - gmake -f $src/lisp/GNUmakefile all - ;; - - -compile-lisp-code) - sed_fix $tooldir/compile-all \ - "s;/afs/cs/project/clisp/build/;$base/build/;" \ - "s;/afs/cs/project/clisp/;$base/;" - chmod a+x $tooldir/compile-all - cd $build_dir - echo "Starting compile of all lisp code. This takes a long time." - LISP=$safe_lisp \ - $tooldir/compile-all -target sunos -release $ver -lisp $base/release-$ver \ - -noupdate -nocompile hemlock - ;; - -worldbuild) - cd $build - $safe_lisp -noinit << EOF - (setf (search-list "target:") '("$dest/" "$src/")) - (load "target:compiler/sparc/parms") - $report_memory_layout - (load "target:bootstrap" :if-does-not-exist nil) - (load "target:tools/setup") - (load "target:compiler/generic/new-genesis" :if-source-newer :compile) - (load "target:tools/worldbuild" :if-source-newer :compile) - $report_memory_layout - (quit) -EOF - ;; - - -mk-lisp) - sed_fix $tooldir/mk-lisp "s;/@sys/;/\$sys/;" - chmod a+x $tooldir/mk-lisp - cd $dest - $tooldir/mk-lisp -now $ver :no-hemlock - ;; - - -install-as) - new_ver=$2; shift - if test "$ver" = "$new_ver" - then - echo "buildver $ver can not be equal to installver $new_ver" - exit 1 - fi - echo "Inststalling new core as version $new_ver" - mkdir_if_needed $base/release-$new_ver - mkdir_if_needed $base/release-$new_ver/bin - mkdir_if_needed $base/release-$new_ver/lib - # Make symlinks to original version. - cd $base/release-$new_ver - rm -f doc man src - ln -s ../release-$ver/doc ../release-$ver/man ../release-$ver/src . - cd $base/release-$new_ver/lib - for file in `echo ../../release-$ver/lib/*` - do - rm -f ./`basename $file`; ln -s $file . - done - rm -f $base/release-$new_ver/bin/lisp $base/release-$new_ver/lib/lisp.core - cp $dest/lisp/lisp $base/release-$new_ver/bin/lisp - cp $dest/lisp.core $base/release-$new_ver/lib/lisp.core - ;; - - -make-default) - # Change symlink so this becomes the default version - new_ver=$2; shift - cd $base - rm -f release; ln -s release-$new_ver release - ;; - - *) - echo "No such function: $1" - exit 1 - ;; -esac -shift -done -) 2>&1 | tee $logfile diff --git a/tools/chop.c b/tools/chop.c deleted file mode 100644 index 2962f2de30dc7c8b13fb7128d950773845598119..0000000000000000000000000000000000000000 --- a/tools/chop.c +++ /dev/null @@ -1,48 +0,0 @@ -#include <stdio.h> - -#define BUFFERSIZE (1<<21) - -char buffer[BUFFERSIZE]; - -void chop(infile) -char *infile; -{ - FILE *in, *out; - char outfile[1024]; - int count, bytes; - - count = 0; - - in = fopen(infile, "r"); - if (in == NULL) { - perror(infile); - return; - } - - while ((bytes = fread(buffer, 1, BUFFERSIZE, in)) != 0) { - sprintf(outfile, "%s.%d", infile, count++); - out = fopen(outfile, "w+"); - if (out == NULL) { - perror(outfile); - fclose(in); - return; - } - fwrite(buffer, 1, bytes, out); - fclose(out); - } - - fclose(in); -} - -main(argc, argv) -int argc; -char *argv[]; -{ - if (argc < 2) { - fprintf(stderr, "usage: chop file...\n"); - exit(1); - } - - while (*++argv != NULL) - chop(*argv); -} diff --git a/tools/clean-build b/tools/clean-build deleted file mode 100755 index 5f4865ec9888e055e821ef13de2161f7a76b580a..0000000000000000000000000000000000000000 --- a/tools/clean-build +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/csh - -set target = "@sys" -set subdir = alpha - -while ($#argv > 0) - switch ($argv[1]) - -# Select what system to compile, and how: - case "-target": - set target = $argv[2] - shift - breaksw - case "-release": - set subdir = $argv[2] - shift - breaksw - default: - echo "Bogus switch: $argv[1]" - cat <<END_HELP -Deletes *.*f, *.fasl, *.assem, *.log and *.log.OLD in the destination. -Options: - -target [@sys] - The machine to compile for: pmax_mach, sun4c_41 ... - - -release [alpha] - Which source tree to compile: alpha, exp/foo... - -END_HELP - exit - endsw - shift -end - -set dest = /afs/cs/project/clisp/build/$target/$subdir - -echo "Cleaning up binaries and logs in $dest ..." -(cd $dest;\ - find . \( -name '*.*f' -o -name '*.assem' -o -name '*.fasl' \) \ - -print -exec rm {} \; ;\ - rm *.log *.log.OLD) diff --git a/tools/compile-all b/tools/compile-all deleted file mode 100755 index 1e6de096c1fb6ec3359118b6096307d9ef5a2786..0000000000000000000000000000000000000000 --- a/tools/compile-all +++ /dev/null @@ -1,224 +0,0 @@ -#!/bin/csh -f -# -# compile-all -- script to compile everything -# -# $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/tools/Attic/compile-all,v 1.16 1994/10/30 21:04:29 ram Exp $ - -set features = () -set misfeatures = () -set target = "@sys" -set subdir = alpha -set core = "" -set interactive = "nil" -set bootstrap = "target:bootstrap" - -set systems = "" -set nosystems = "" - -while ($#argv > 0) - if ("$argv[1]" !~ -*) then - set features = ($features $argv[1]) - else - switch ($argv[1]) - -# Select what system to compile, and how: - case "-target": - set target = $argv[2] - shift - breaksw - case "-release": - set subdir = $argv[2] - shift - breaksw - case "-lisp": - set lispdir = $argv[2] - shift - breaksw - case "-core": - set core = " -core $argv[2]" - shift - breaksw - case "-bootstrap": - set bootstrap = $argv[2] - shift - breaksw - case "-misfeature": - set misfeatures = ($misfeatures $argv[2]) - shift - breaksw - case "-interactive": - set interactive = "t" - breaksw - -# Select what to compile: - case "-compile": - set systems = $argv[2] - shift - breaksw - case "-nocompile": - set nosystems = $argv[2] - shift - breaksw - default: - echo "Bogus switch: $argv[1]" - cat <<END_HELP -Try these: - -target [@sys] - The machine to compile for: pmax_mach, sun4c_41 ... - - -release [alpha] - Which source tree to compile: alpha, exp/foo... - - -lisp [/afs/cs/misc/cmucl/@sys/<release> or /usr/misc/.cmucl/] - The directory to run Lisp out of. - - -core [<lisp>/lib/lisp.core] - The core file to run. - - -bootstrap [target:bootstrap] - File to load into lisp before compiling. - - -interactive <no arg> - Print compiler output to terminal instead of log files. - - -misfeature <feature> - Remove <feature> from the features when compiling. May be used more - than once. - - -compile [All systems] - A comma-separated list of system names, e.g. "code,compiler". Order is - not significant. All systems are compiled by default. - - -nocompile [No systems] - A comma-separated list of systems *not* to compile. Only meaningful - when -compile is not specified. - -END_HELP - - exit - endsw - endif - shift -end - -if (! $?lispdir) then - set lispdir = /afs/cs/misc/cmucl/@sys/$subdir - if (! -e $lispdir) then - echo "Release $subdir not installed; using /usr/misc/.cmucl" - set lispdir = /usr/misc/.cmucl - endif -endif -setenv CMUCLLIB "$lispdir/lib" -set lisp = "$lispdir/bin/lisp$core" - -if ($systems == "") then - if ($nosystems == "") then - echo "Will compile all systems ..." - else - echo "Will compile all systems except for: $nosystems ..." - endif -else - echo "Will compile these systems: $systems ..." -endif - -set src = () -set thissrc = /afs/cs/project/clisp/src/$subdir - -nother_source: - -set src = ($src \"$thissrc/\") - -if (-e $thissrc/FEATURES) then - set tmp = (`cat $thissrc/FEATURES`) - echo "Features from $thissrc/FEATURES file:" $tmp - set features = ($features $tmp) -endif - -if (-e $thissrc/MISFEATURES) then - set tmp = (`cat $thissrc/MISFEATURES`) - echo "Misfeatures from $thissrc/MISFEATURES file:" $tmp - set misfeatures = ($misfeatures $tmp) -endif - -if (-e $thissrc/SHADOW) then - set thissrc = `cat $thissrc/SHADOW` - goto nother_source -endif - -echo "Source directory(ies): $src" - -set dest = /afs/cs/project/clisp/build/$target/$subdir -echo "Target directory: $dest" - -if ({(echo $dest/*.log>/dev/null)}) then - echo "Preserving log files in $dest as .OLD ..." - foreach foo ( $dest/*.log ) - set old = "${foo}.OLD" - if (-e $old) then - echo "" >>$old - date >>$old - echo "_________________________________________">>$old - cat $foo >>$old - rm $foo - else - mv $foo $old - endif - end -endif - - -if ($?LISP) then - echo "LISP environment variable override: $LISP" - set lisp = "$LISP" -endif - -echo "Compiling setup and bootstrap ..." -sed -e 's/\\//g' << EOF | $lisp -noinit -eval '(eval (read))' -(progn - (when (find-package "INTERFACE") - (set (intern "*INTERFACE-STYLE*" "INTERFACE") :tty)) - (setf *features* - (set-difference (list* $features *features*) '($misfeatures))) - (setf (search-list "target:") '("$dest/" $src)) - (setq *compile-verbose* nil *compile-print* nil) - (load "target:tools/setup" :if-source-newer :load-source) - (setf *interactive* $interactive *gc-verbose* nil) - (comf "target:tools/setup" :load t) - (when (probe-file "${bootstrap}.lisp") (comf "$bootstrap")) - (quit)) -EOF - -set sysinfo = ("code worldcom"\ - "compiler comcom"\ - "pcl pclcom"\ - "clx clxcom"\ - "hemlock hemcom"\ - "clm clmcom"\ - "genesis worldbuild") - -while ($#sysinfo > 0) - set system_vec = ($sysinfo[1]:x) - set this_system = $system_vec[1] - set this_comfile = $system_vec[2] - shift sysinfo - if ($systems =~ *${this_system}* || \ - ($systems == "" && $nosystems !~ *${this_system}*)) then - echo "Compiling $this_system ..." - sed -e 's/\\//g' << EOF | $lisp -noinit -eval '(eval (read))' -(progn - (when (find-package "INTERFACE") - (set (intern "*INTERFACE-STYLE*" "INTERFACE") :tty)) - (setf *features* - (set-difference (list* $features *features*) '($misfeatures))) - (setf (search-list "target:") '("$dest/" $src)) - (setq *compile-verbose* nil *compile-print* nil) - (load "target:tools/setup") - (load "$bootstrap" :if-does-not-exist nil) - (setf *interactive* $interactive *gc-verbose* nil) - (load "target:tools/$this_comfile") - (quit)) -EOF - endif -end - -echo "Done..." diff --git a/tools/do-worldbuild b/tools/do-worldbuild deleted file mode 100755 index 8c1aa731a3f7e39d131dd6293726a8bf570e39a9..0000000000000000000000000000000000000000 --- a/tools/do-worldbuild +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/csh -fx -# -# do-worldbuild -- script to run worldbuild -# -# $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/tools/Attic/do-worldbuild,v 1.3 1992/02/26 01:11:18 wlott Exp $ - -if ($#argv) then - set subdir = $argv[1] -else - set subdir = alpha -endif - -set dest = /afs/cs/project/clisp/build/@sys/$subdir -set src = /afs/cs/project/clisp/src/$subdir - -if ($?LISP) then - set lisp = "$LISP" -else - set lisp = lisp -endif - -$lisp -noinit << EOF -(setf (search-list "target:") '("$dest/" "$src/")) -(load "target:bootstrap" :if-does-not-exist nil) -(load "target:tools/setup") -(load "target:compiler/generic/genesis") -(load "target:tools/worldbuild") -(quit) -EOF diff --git a/tools/dupsrcs.c b/tools/dupsrcs.c deleted file mode 100644 index 078186be2cb5d9720313cbf62ff6392103728578..0000000000000000000000000000000000000000 --- a/tools/dupsrcs.c +++ /dev/null @@ -1,83 +0,0 @@ -#include <stdio.h> -#include <sys/types.h> -#include <sys/dir.h> -#include <sys/stat.h> -#include <sys/errno.h> -#include <sys/param.h> - -/* Duplicates a source tree. */ - -/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/tools/Attic/dupsrcs.c,v 1.2 1991/11/07 22:55:36 wlott Exp $ */ - -void duptree(srcdir, dstdir) -char *srcdir, *dstdir; -{ - DIR *dir; - struct direct *entry; - char srcpath[MAXPATHLEN], dstpath[MAXPATHLEN]; - struct stat buf; - - printf("Duplicating %s\n into %s\n", srcdir, dstdir); - - /* Make sure the dstdir is there. */ - if (mkdir(dstdir) == 0) - printf("Creating %s\n", dstdir); - - dir = opendir(srcdir); - if (dir == NULL) { - perror(srcdir); - return; - } - - while ((entry = readdir(dir)) != NULL) { - if (strncmp(entry->d_name, "RCS", 3) == 0) - continue; - if (entry->d_name[0] == '.') - continue; - sprintf(srcpath, "%s/%s", srcdir, entry->d_name); - sprintf(dstpath, "%s/%s", dstdir, entry->d_name); - if (stat(srcpath, &buf) < 0) { - perror(srcpath); - continue; - } - if ((buf.st_mode & S_IFMT) == S_IFDIR) - duptree(srcpath, dstpath); - else - if (symlink(srcpath, dstpath) == 0) - printf("Linked %s\n", dstpath); - else - if (errno != EEXIST) - perror(dstpath); - } - - closedir(dir); -} - -main(argc, argv) -int argc; -char *argv[]; -{ - char *subdir; - char srcdir[MAXPATHLEN], dstdir[MAXPATHLEN]; - - if (argc > 2) { - fprintf(stderr, "usage: dupsrcs [ subdir ]\n"); - exit(1); - } - - if (argc == 2) - subdir = argv[1]; - else - subdir = "alpha"; - - getwd(dstdir); - - sprintf(srcdir, "/afs/cs/project/clisp/src/%s", subdir); - if (chdir(srcdir) < 0) { - perror(srcdir); - exit(1); - } - getwd(srcdir); - - duptree(srcdir, dstdir); -} diff --git a/tools/fixheader b/tools/fixheader deleted file mode 100755 index c8828b45920a4f802c28dbbc13b40ea8e14dd8af..0000000000000000000000000000000000000000 --- a/tools/fixheader +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/csh -f -# -# $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/tools/Attic/fixheader,v 1.3 1994/10/27 17:41:10 ram Exp $ - -set quotehack = \$"Header: "\$ - -foreach file ($argv) - set range = (`fgrep -n ';;; ***********' $file | sed -e '3,$d' -e 's/:.*//'`) - if ($#range < 2) then - echo '**********' $file'': Could not find the header comment. - goto nextfile - endif - if ($range[2] > 12) then - echo '**********' $file'': Large header comment, you deal with it. - goto nextfile - endif - - echo fixing $file - - ed $file <<END_OF_ED_STUFF -$range[1],$range[2]d -$range[1]i -;;; ********************************************************************** -;;; This code was written as part of the CMU Common Lisp project at -;;; Carnegie Mellon University, and has been placed in the public domain. -;;; -(ext:file-comment - "$quotehack") -;;; -;;; ********************************************************************** -. -w -q -END_OF_ED_STUFF - - nextfile: -end diff --git a/tools/inst-lisp b/tools/inst-lisp deleted file mode 100755 index d0afd588b875710321ffae5d747dd8a85029d99f..0000000000000000000000000000000000000000 --- a/tools/inst-lisp +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/csh -fx -# -# $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/tools/Attic/inst-lisp,v 1.11 1995/02/17 12:08:09 wlott Exp $ -# -# Utility for installing CMU CL systems in the AFS release area. -# - -if ($#argv > 0) then - set subdir = $argv[1] -else - set subdir = alpha -endif - -if ($#argv > 1) then - set destver = $argv[2] -else - set destver = alpha -endif - -set src = /afs/cs/project/clisp/build/@sys/$subdir -set dst = /afs/cs/project/clisp/releases/${destver}/@sys - -rm -f $dst/cmucl -rm -f $dst/lisp.core -rm -f $dst/site-init.* -rm -f $dst/motifd -rm -f $dst/spell-dictionary.bin -rm -f $dst/internals.h - -cp -p $src/lisp/lisp $dst/cmucl -cp -p $src/lisp/internals.h $dst -cp -p lisp.core $dst/lisp.core -cp -p $src/code/cmu-site.*f $dst/site-init.fasl -cp -p $src/motif/server/motifd $dst -cp -p $src/hemlock/spell-dictionary.bin $dst diff --git a/tools/mk-lisp b/tools/mk-lisp deleted file mode 100755 index 13949993a3b0e366f4fef088ec137d5502e0f29e..0000000000000000000000000000000000000000 --- a/tools/mk-lisp +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/csh -f -# -# mk-lisp -- script for building full lisp cores. -# -# $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/tools/Attic/mk-lisp,v 1.18 2003/06/18 09:23:08 gerd Exp $ - -# ignore historical option -if ($#argv) then - if ($argv[1] == "-now") then - shift - endif -endif - -if ($#argv) then - set subdir = $argv[1] - set features = ($argv[2-]) -else - set subdir = alpha - set features = () -endif - -if $?CMUCL_ROOT then - set root = $CMUCL_ROOT -else - set root = /afs/cs/project/clisp -endif - -set dest = $root/build/@sys/$subdir -set src = $root/src/$subdir - -if (-e $dest/lisp/kernel.core) then - set core = $dest/lisp/kernel.core -else - if (-e /usr/tmp/kernel.core) then - set core = /usr/tmp/kernel.core - else - echo Can\'t find the kernel.core - endif -endif - -if (-e $src/VERSION) then - set version = `cat $src/VERSION` -else - set version = `/bin/date | awk '{print $3 "-" $2 "-" $6}'` -endif - -if (-e $src/FEATURES) then - set features = ($features `cat $src/FEATURES`) -endif - -echo Building lisp.core version $version from the \`\`$subdir\'\' subdir. -echo "Features: $features" - -$dest/lisp/lisp -core $core << EOF -(setf *features* (list* $features *features*)) -(setf (search-list "target:") '("$dest/" "$src/")) -(in-package "CL-USER") -(load (open "target:tools/worldload.lisp")) -$version -(quit) -EOF - -echo diff --git a/tools/mk-release b/tools/mk-release deleted file mode 100755 index 7fdd0eb86362f4f1af729eac5e0dcd84be19fe10..0000000000000000000000000000000000000000 --- a/tools/mk-release +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/csh -f - -if ($#argv != 4) then - echo usage: mk-release dst-sys dst-release src-sys src-release - exit 1 -endif - -set dstsys = $argv[1] -set dstrelease = $argv[2] -set srcsys = $argv[3] -set srcrelease = $argv[4] - -cd /afs/cs/misc/cmucl/$dstsys/$dstrelease -if ($status) then - echo "Can't build /afs/cs/misc/cmucl/$dstsys/$dstrelease" - exit 1 -endif - -set clisp = /afs/cs.cmu.edu/project/clisp -set src = $clisp/releases/$srcrelease/$srcsys - -echo "Building $cwd from $src" - -rm -rf README bin lib man doc - -ln -s $clisp/general-info/cmu-README.txt README -mkdir bin -mkdir lib -if ($srcsys == "hp700_ux90") then - ln -s $src/cmucl lib/cmucl.orig - ln -s $src/hpux-startup bin/cmucl -else - ln -s $src/cmucl bin/cmucl -endif -ln -s cmucl bin/lisp -ln -s $clisp/etc/XKeysymDB lib -ln -s $clisp/etc/hemlock11.cursor lib -ln -s $clisp/etc/hemlock11.mask lib -ln -s $clisp/etc/mh-scan lib -ln -s $clisp/releases/$srcrelease/common/* lib -ln -s $src/{*.core,mot*,site-init.*,spell*} lib -mkdir doc -ln -s $clisp/general-info/bugs.txt doc -ln -s $clisp/docs/cmu-user/cmu-user.info doc -ln -s $clisp/docs/cmu-user/cmu-user.info-1 doc -ln -s $clisp/docs/cmu-user/cmu-user.info-2 doc -ln -s $clisp/docs/cmu-user/cmu-user.info-3 doc -ln -s $clisp/docs/cmu-user/cmu-user.info-4 doc -ln -s $clisp/docs/cmu-user/cmu-user.info-5 doc -ln -s $clisp/docs/cmu-user/cmu-user.info-6 doc -ln -s $clisp/docs/cmu-user/cmu-user.info-7 doc -ln -s $clisp/docs/cmu-user/cmu-user.info-8 doc -ln -s $clisp/docs/cmu-user/cmu-user.info-9 doc -ln -s $clisp/docs/cmu-user/cmu-user.ps doc -ln -s $clisp/docs/hem/cim/cim.ps doc/hemlock-cim.ps -ln -s $clisp/docs/hem/user/user.ps doc/hemlock-user.ps -ln -s $clisp/docs/interface/internals.doc doc/motif-internals.doc -ln -s $clisp/docs/interface/toolkit.doc doc/motif-toolkit.doc -ln -s $clisp/general-info/$srcrelease-release-notes.txt doc/release-notes.txt -ln -s $src/internals.h doc -mkdir man -mkdir man/man1 -ln -s $clisp/general-info/cmucl.1 man/man1 -ln -s $clisp/general-info/lisp.1 man/man1 diff --git a/tools/rcsupdate.c b/tools/rcsupdate.c deleted file mode 100644 index 897c21308ab0bc62b88084ca57689e9d16134528..0000000000000000000000000000000000000000 --- a/tools/rcsupdate.c +++ /dev/null @@ -1,339 +0,0 @@ -/* rcsupdate: utility to update a tree of RCS files. - -$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/tools/Attic/rcsupdate.c,v 1.3 1992/03/03 10:18:39 wlott Exp $ - -*/ -#include <sys/types.h> -#include <sys/param.h> -#include <sys/time.h> -#include <sys/stat.h> -#include <sys/dir.h> -#include <stdio.h> -#include <strings.h> -#include <errno.h> - -static int quiet = 1; - -extern int errno; - -#define MAXRCSFILES 1000 - -static char lastcache[MAXPATHLEN] = ""; -static struct cache_entry { - char *file; - long modtime, rcstime; -} cache[MAXRCSFILES], *last_entry; -static int dirty = 0; - -void write_cache() -{ - FILE *file; - char bak[MAXPATHLEN]; - struct cache_entry *entry; - - if (dirty) { - strcpy(bak, lastcache); - strcat(bak, ".BAK"); - rename(lastcache, bak); - file = fopen(lastcache, "w"); - for (entry = cache; entry != last_entry; entry++) { - fprintf(file, "%s %ld %ld\n", entry->file, entry->modtime, - entry->rcstime); - free(entry->file); - } - fclose(file); - } - lastcache[0] = '\0'; - last_entry = cache; - dirty = 0; -} - -void read_cache(cachefile) -char *cachefile; -{ - FILE *file; - char line[MAXPATHLEN+80], name[MAXPATHLEN]; - long modtime, rcstime; - - write_cache(); - - if ((file = fopen(cachefile, "r")) != NULL) { - while (fgets(line, sizeof(line), file) != NULL) { - sscanf(line, "%s %ld %ld", name, &modtime, &rcstime); - last_entry->file = (char *)malloc(strlen(name)+1); - strcpy(last_entry->file, name); - last_entry->modtime = modtime; - last_entry->rcstime = rcstime; - last_entry++; - } - fclose(file); - } - strcpy(lastcache, cachefile); -} - -long last_ci_time(localfile, rcsfile) -char *localfile, *rcsfile; -{ - char cachefile[MAXPATHLEN], *ptr, *name, buf[MAXPATHLEN]; - FILE *stream; - struct cache_entry *entry; - int reload_entry; - struct stat statbuf; - long modtime; - - if (stat(rcsfile, &statbuf) < 0) - return -1; - - strcpy(cachefile, localfile); - ptr = rindex(cachefile, '/'); - if (ptr == NULL) - ptr = cachefile; - else - ptr++; - strcpy(ptr, ".rcsci_time_cache"); - - if (strcmp(cachefile, lastcache) != 0) - read_cache(cachefile); - - name = rindex(rcsfile, '/'); - if (name == NULL) - name = rcsfile; - else - name++; - - reload_entry = 0; - for (entry = cache; entry != last_entry; entry++) - if (strcmp(name, entry->file) == 0) - break; - if (entry == last_entry) { - reload_entry = 1; - entry->file = (char *)malloc(strlen(name)+1); - strcpy(entry->file, name); - last_entry++; - } - else { - if (entry->rcstime != statbuf.st_mtime) - reload_entry = 1; - } - if (reload_entry) { - fflush(stdout); - - sprintf(buf, "rcstime %s", rcsfile); - stream = popen(buf, "r"); - if (stream == NULL) - return -1; - - fgets(buf, sizeof(buf), stream); - if (pclose(stream)) { - /* There is no associated time. */ - entry->rcstime = statbuf.st_mtime; - entry->modtime = 0; - } else { - modtime = atoi(buf); - if (modtime == 0) { - printf("bogus: ``%s''\n", buf); - return 0; - } - - entry->rcstime = statbuf.st_mtime; - entry->modtime = modtime; - } - dirty = 1; - } - - return entry->modtime; -} - -void update(localfile, rcsfile) -char *localfile, *rcsfile; -{ - struct stat statbuf; - long localtime, rcstime; - char buf[MAXPATHLEN+40]; - - if (stat(localfile, &statbuf) < 0) { - switch (errno) { - case ENOENT: - if (!quiet) { - printf("local: <doesn't exist>\trcs: "); - fflush(stdout); - } - localtime = 0; - break; - - default: - if (quiet) - perror(localfile); - else - perror("oops"); - return; - } - } - else { - localtime = statbuf.st_mtime; - if (!quiet) { - printf("local: %ld\trcs: ", localtime); - fflush(stdout); - } - } - - rcstime = last_ci_time(localfile, rcsfile); - if (rcstime < 0) { - if (quiet) - perror(rcsfile); - else - perror("oops"); - } - else { - if (!quiet) - printf("%ld\t", rcstime); - - if (localtime < rcstime) { - if (!quiet) - printf("out of date.\n"); - sprintf(buf, "rcsco %s %s", localfile, rcsfile); - system(buf); - } - else - if (!quiet) - printf("up to date.\n"); - fflush(stdout); - } -} - -void update_rcs_files(dirname) - char *dirname; -{ - char localfile[MAXPATHLEN], rcsfile[MAXPATHLEN]; - char *localptr, *rcsptr; - DIR *rcsdir; - struct direct *entry; - - strcpy(rcsfile, dirname); - strcat(rcsfile, "/RCS"); - - rcsdir = opendir(rcsfile); - if (rcsdir == NULL) - return; - - rcsptr = rcsfile + strlen(rcsfile); - *rcsptr++ = '/'; - - strcpy(localfile, dirname); - localptr = localfile + strlen(localfile); - *localptr++ = '/'; - - while ((entry = readdir(rcsdir)) != NULL) { - if (strcmp(entry->d_name + entry->d_namlen - 2, ",v") == 0) { - strcpy(rcsptr, entry->d_name); - strcpy(localptr, entry->d_name); - localptr[entry->d_namlen - 2] = '\0'; - if (!quiet) - printf("%s:\t", localfile); - update(localfile, rcsfile); - } - } - - closedir(rcsdir); -} - -void update_directory(dirname) - char *dirname; -{ - DIR *dir; - struct stat buf; - struct direct *entry; - char subdir[MAXPATHLEN], *subptr; - - printf("Updating %s:\n", dirname); - - update_rcs_files(dirname); - - dir = opendir(dirname); - if (dir == NULL) { - fprintf(stderr, "couldn't open ``%s''?\n", dirname); - return; - } - - strcpy(subdir, dirname); - subptr = subdir + strlen(dirname); - *subptr++ = '/'; - - while ((entry = readdir(dir)) != NULL) { - if (strcmp(entry->d_name, "RCS") != 0 - && strcmp(entry->d_name, "..") != 0 - && strcmp(entry->d_name, ".") != 0) { - strcpy(subptr, entry->d_name); - if (stat(subdir, &buf) != -1 && (buf.st_mode & S_IFMT) == S_IFDIR) - update_directory(subdir); - } - } - - closedir(dir); -} - -main(argc, argv) -int argc; -char *argv[]; -{ - char localfile[MAXPATHLEN], rcsfile[MAXPATHLEN], *ptr; - int len; - struct stat buf; - int did_anything = 0; - - while (*++argv != NULL) { - if (strcmp(*argv, "-q") == 0) - quiet = 1; - else if (strcmp(*argv, "-v") == 0) - quiet = 0; - else if (stat(*argv, &buf)!=-1 && (buf.st_mode&S_IFMT)==S_IFDIR) { - update_directory(*argv); - did_anything = 1; - } - else { - len = strlen(*argv); - - /* Determine the two names. */ - strcpy(rcsfile, *argv); - strcpy(localfile, *argv); - if (strcmp(",v", localfile + len-2) == 0) { - localfile[len-2] = '\0'; - ptr = rindex(localfile, '/'); - if (ptr == NULL) - ptr = localfile; - else - ptr -= 3; - if (strncmp(ptr, "RCS/", 4) == 0) - strcpy(ptr, ptr+4); - } else { - ptr = rindex(rcsfile, '/'); - if (ptr == NULL) - ptr = rcsfile; - else - ptr++; - strcpy(ptr, "RCS/"); - strcat(ptr, localfile + (ptr - rcsfile)); - strcat(ptr, ",v"); - } - - /* Display the file we are working on: */ - if (!quiet) { - ptr = rindex(localfile, '/'); - if (ptr == NULL) - ptr = localfile; - printf("%s:\t", ptr); - fflush(stdout); - } - - /* Update it. */ - update(localfile, rcsfile); - did_anything = 1; - } - } - if (!did_anything) - update_directory("."); - - write_cache(); - - exit(0); -} diff --git a/tools/snapshot-update.lisp b/tools/snapshot-update.lisp deleted file mode 100644 index 292600302380d3b41c1fb8600a8f0355963198d3..0000000000000000000000000000000000000000 --- a/tools/snapshot-update.lisp +++ /dev/null @@ -1,50 +0,0 @@ -;;; -*- Package: User -*- -;;; -;;; ********************************************************************** -;;; This code was written as part of the CMU Common Lisp project at -;;; Carnegie Mellon University, and has been placed in the public domain. -;;; If you want to use this code or any part of CMU Common Lisp, please contact -;;; Scott Fahlman or slisp-group@cs.cmu.edu. -;;; -(ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/tools/Attic/snapshot-update.lisp,v 1.3 2003/06/18 09:23:08 gerd Exp $") -;;; -;;; ********************************************************************** -;;; -;;; A hack to generate a log of the changes since a particular snapshot. We -;;; generate a shell script and run it to avoid many calls to run-program. -;;; -(in-package "CL-USER") - -(defun snapshot-updates (&key (snapshot-file "RCSSNAP") - (output - (make-pathname - :defaults (pathname snapshot-file) - :type "updates")) - from) - "Write to :OUTPUT a summary of the RCS change long entries since the - since the specified :SNAPSHOT was made. :OUTPUT is passed through to - run-program, and should be a stream or pathname. If true, :FROM is a string - in RCS date format. Only revisions after that date will be reported." - (with-open-file (script "/tmp/update-script" :direction :output) - (with-open-file (in snapshot-file :direction :input) - (loop - (let ((line (read-line in nil nil))) - (unless line (return)) - (let* ((tab (position #\tab line)) - (dot (position #\. line :from-end t))) - (format script "rlog -r~A~D- ~@['-d>~A' ~]~A~%" - (subseq line (1+ tab) (1+ dot)) - (1+ (parse-integer (subseq line (1+ dot)))) - from - (subseq line 0 tab))))))) - - (let ((cmd (format nil - "cd ~A; csh /tmp/update-script | ~ - sed -n -e '/^RCS file:/p' -e '/^------/,/^======/p' | ~ - sed -e '/^RCS file:/{;:again\\~@ - N;s/^RCS file.*\nRCS file/RCS file/;t again\\~@ - }'" - (directory-namestring (truename snapshot-file))))) - (run-program "csh" (list "-c" cmd) :output output - :if-output-exists :supersede))) diff --git a/tools/updates b/tools/updates deleted file mode 100755 index 46b66682535489af91d094b664ba7c48fe99a8d6..0000000000000000000000000000000000000000 --- a/tools/updates +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/csh -f - -set from = "" -set to = "" -set mtime = () -set dirs = () - -while ($#argv > 0) - if ("$argv[1]" !~ -*) then - set dirs = ($dirs $argv[1]) - else - switch ($argv[1]) - case "-from": - set from = $argv[2] - shift - breaksw - case "-to": - set to = $argv[2] - shift - breaksw - case "-mtime": - set mtime = ($argv[1-2]) - shift - breaksw - default: - echo "Bogus switch: $argv[1]" - exit - endsw - endif - shift -end - -if ($#dirs == 0) set dirs = . - -find $dirs -follow -name '*,v' $mtime -exec rlog "-d$from<$to" '{}' \; | \ - sed -n -e '/^RCS file:/p' -e '/^------/,/^======/p' | \ - sed -e '/^RCS file:/{;:again\ - N;s/^RCS file.*\nRCS file/RCS file/;t again\ - }' diff --git a/tools/variant-lisp b/tools/variant-lisp deleted file mode 100755 index 03928acfd191c2f00dc65cc953a397f055560478..0000000000000000000000000000000000000000 --- a/tools/variant-lisp +++ /dev/null @@ -1,82 +0,0 @@ -#!/bin/sh -# Start a CMU CL lisp. -# This script was suppled by David Axmark. It supports starting various -# different versions of CMU CL, and is used by his build-and-install script. -# It may contain Sun dependencies. - -MY_BASEDIR=${MY_BASEDIR:-/my} -BASE_DIR=$MY_BASEDIR/cmucl - -# We require all arguments to this script to come before other -# arguments. This is so we dont have to try to pass on arguments -# with spaces, quotes and so on in them. - -VERSION= -VARIANT= - -# Default version/variant may be changed in the environment. -if test -n "$CMUCL_VERSION"; then VERSION=-$CMUCL_VERSION; fi -if test -n "$CMUCL_VARIANT"; then VARIANT=-$CMUCL_VARIANT; fi - -while test -n "$1" -a -z "$END_LOOP" -do - case $1 - in - -version) VERSION=-$2; shift; shift;; - -variant) VARIANT=-$2; shift; shift;; - -prod) PROD=t; shift;; - *) END_LOOP=t;; - esac -done - -if test -n "$VERSION" -a ! -d "$BASE_DIR/release$VERSION" -then - echo "Could not find lisp version $VERSION." - if test -n "LISP_MUST_HAVE_RIGHT_CORE" - then - exit 1 - fi - echo "Trying to use default version" - VERSION= -fi - -if test -n "$PROD" -then - BASE=$MY_BASEDIR/production/interview -else - BASE=$BASE_DIR/release$VERSION -fi - -LISP=$BASE/bin/lisp -CORE=$BASE/lib/lisp.core -CMUCLLIB=$BASE/lib - -PATH=$BASE/bin:$PATH - -# Avoid tmpfs filesystems for CMUCL_EMPTYFILE -CMUCL_EMPTYFILE=/var/tmp/empty - -export PATH CMUCLLIB CMUCL_EMPTYFILE - -# Use this systems version as default if it exists. Ex if we are running -# under /my/ok we will use the -ok core. -MY_VERSION=`basename ${MY_BASEDIR_VERSION:-/}` -if test -n "$MY_VERSION" -a -f $CORE$VARIANT-$MY_VERSION -then - VARIANT="$VARIANT-$MY_VERSION" -fi - -if test -n "$VARIANT" -a ! -f $CORE$VARIANT -then - echo "Could not find lisp variant $CORE$VARIANT." - if test -n "LISP_MUST_HAVE_RIGHT_CORE" - then - exit 1 - fi - echo "Trying to use default variant" - VARIANT= -else - CORE="$CORE$VARIANT" -fi - -exec $LISP -core $CORE "$@"