head	1.16;
access;
symbols;
locks; strict;
comment	@# @;


1.16
date	94.10.30.21.04.29;	author ram;	state Exp;
branches;
next	1.15;

1.15
date	94.10.27.16.58.21;	author ram;	state Exp;
branches;
next	1.14;

1.14
date	94.07.26.17.37.17;	author hallgren;	state Exp;
branches;
next	1.13;

1.13
date	93.08.19.13.22.42;	author ram;	state Exp;
branches;
next	1.12;

1.12
date	93.04.04.10.02.25;	author wlott;	state Exp;
branches;
next	1.11;

1.11
date	92.11.11.15.37.47;	author garland;	state Exp;
branches;
next	1.10;

1.10
date	92.06.04.18.20.32;	author ram;	state Exp;
branches;
next	1.9;

1.9
date	92.03.04.09.55.21;	author wlott;	state Exp;
branches;
next	1.8;

1.8
date	92.03.03.10.42.17;	author wlott;	state Exp;
branches;
next	1.7;

1.7
date	92.02.27.06.02.56;	author wlott;	state Exp;
branches;
next	1.6;

1.6
date	92.02.25.00.14.32;	author wlott;	state Exp;
branches;
next	1.5;

1.5
date	92.02.06.01.28.33;	author ram;	state Exp;
branches;
next	1.4;

1.4
date	92.02.05.19.01.20;	author wlott;	state Exp;
branches;
next	1.3;

1.3
date	91.12.12.02.35.37;	author wlott;	state Exp;
branches;
next	1.2;

1.2
date	91.11.26.22.10.18;	author wlott;	state Exp;
branches;
next	1.1;

1.1
date	91.10.15.15.30.52;	author ram;	state Exp;
branches;
next	;


desc
@Script to native compile everything except PCL.
@


1.16
log
@Compile PCL before CLX, since it now depends on it.
@
text
@#!/bin/csh -f
#
#  compile-all -- script to compile everything
#
# $Header: /users/ram/RCS/compile-all,v 1.15 1994/10/27 16:58:21 ram Exp ram $

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..."
@


1.15
log
@Flush rcsupdate and -clean features.
@
text
@d5 1
a5 1
# $Header: /users/ram/RCS/compile-all,v 1.14 1994/07/26 17:37:17 hallgren Exp ram $
d193 1
a195 1
	       "pcl pclcom"\
@


1.14
log
@Fixed for the alpha.
@
text
@d5 1
a5 1
# $Header: compile-all,v 1.13 93/08/19 13:22:42 hallgren Locked $
a11 2
set clean = 0
set update = 1
a52 8
# Source tree management:
			case "-clean":
				set clean = 1
				breaksw
			case "-noupdate":
			        set update = 0
				breaksw

a87 6
  -clean <no arg>
	Delete *.*f, *.fasl, *.assem, *.log and *.log.OLD in the destination.

  -noupdate <no arg>
	If specified, inhibits rcsupdate of the source tree.

a142 5
if $update then
    echo "Updating source directory $thissrc ..."
    (cd $thissrc; rcsupdate -q)
endif

d153 14
a166 22
if $clean then
    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)
else
    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
d168 1
@


1.13
log
@When -clean, delete .fasl too.
@
text
@d5 1
a5 1
# $Header: compile-all,v 1.12 93/04/04 10:02:25 ram Locked $
d204 1
a204 1
$lisp -noinit -eval '(eval (read))' << EOF
d235 1
a235 1
	$lisp -noinit -eval '(eval (read))' << EOF
@


1.12
log
@Change the interface style to :tty before starting the compilation.
@
text
@d5 1
a5 1
# $Header: compile-all,v 1.11 92/11/11 15:37:47 wlott Locked $
d99 1
a99 1
	Delete all *.*f, *.assem, *.log and *.log.OLD in the destination.
d177 2
a178 1
     find . \( -name '*.*f' -o -name '*.assem' \) -print -exec rm {} \; ;\
@


1.11
log
@Added stuff to compile Motif toolkit.
@
text
@d5 1
a5 1
# $Header: compile-all,v 1.10 92/06/04 18:20:32 garland Locked $
d205 2
d236 2
@


1.10
log
@Added a -interactive switch which sets *interactive* to true when compiling.
@
text
@d5 1
a5 1
# $Header: compile-all,v 1.9 92/03/04 09:55:21 ram Locked $
d221 1
@


1.9
log
@Fixed the $features stuff to add each feature to *features* instead of
adding a list of $features to *features*.  Fixed the SHADOW stuff to
build a $src list of strings instead of a string with spaces in it.
@
text
@d5 1
a5 1
# $Header: compile-all,v 1.8 92/03/03 10:42:17 wlott Locked $
d14 1
d51 3
d91 3
d210 1
d236 1
a236 1
  (setq *compile-verbose* nil *compile-print* nil) 
d239 1
a239 1
  (setf *interactive* nil *gc-verbose* nil)
@


1.8
log
@Added support for a MISFEATURES file.  And if the source directory contains
SHADOW, it's the pathname of another source directory (for use with the
exp/mumble releases and the like).
@
text
@d5 1
a5 1
# $Header: compile-all,v 1.7 92/02/27 06:02:56 wlott Locked $
d138 1
a138 1
set src = ($src $thissrc/)
d199 2
a200 2
	(set-difference (list* '($features) *features*) '($misfeatures)))
  (setf (search-list "target:") '("$dest/" "$src"))
d202 2
a203 2
  (load "target:tools/setup")
  (comf "target:tools/setup")
d226 2
a227 2
	(set-difference (list* '($features) *features*) '($misfeatures)))
  (setf (search-list "target:") '("$dest/" "$src"))
@


1.7
log
@Load bootstrap after setup, so it can refer to fns defined in setup.
@
text
@d5 1
a5 1
# $Header: compile-all,v 1.6 92/02/25 00:14:32 wlott Locked $
a122 5
set dest = /afs/cs/project/clisp/build/$target/$subdir
set src = /afs/cs/project/clisp/src/$subdir

echo "Source directory: $src"
echo "Target directory: $dest"
d133 10
a142 3
if (-e $src/FEATURES) then
        set tmp = (`cat $src/FEATURES`)
        echo "Features from FEATURES file:" $tmp
d146 6
d153 2
a154 2
    echo "Updating source directory $src ..."
    (cd $src; rcsupdate -q)
d157 10
d200 1
a200 1
  (setf (search-list "target:") '("$dest/" "$src/"))
d227 1
a227 1
  (setf (search-list "target:") '("$dest/" "$src/"))
@


1.6
log
@Fixed handling of -core.
@
text
@d5 1
a5 1
# $Header: compile-all,v 1.5 92/02/06 01:28:33 wlott Locked $
d211 1
a212 1
  (load "target:tools/setup")
@


1.5
log
@New super-whizzy compile-everything script.  Takes all kinds of command-line
options.
@
text
@d5 1
a5 1
# $Header: compile-all,v 1.4 92/02/05 19:01:20 ram Locked $
d78 1
a78 1
  -lisp		[/afs/cs/misc/cmucl/@@sys/<release>]
d113 7
a119 1
if (! $?lispdir) set lispdir = /afs/cs/misc/cmucl/@@sys/$subdir
a174 2
else
	set lisp = lisp
@


1.4
log
@Added ``(load "target:bootstrap" :if-does-not-exist nil)'' so that
special stuff can be done to bootstrap new systems.
@
text
@d1 1
a1 1
#!/bin/csh -fx
d5 1
a5 1
# $Header: compile-all,v 1.3 91/12/12 02:35:37 wlott Locked $
d7 8
a14 5
if ($#argv) then
	set subdir = $argv[1]
else
	set subdir = alpha
endif
d16 102
a117 1
set dest = /afs/cs/project/clisp/build/@@sys/$subdir
d120 8
a127 2
if ($?LISP) then
	set lisp = "$LISP"
d129 1
a129 1
	set lisp = lisp
d133 3
a135 3
	set features = (`cat $src/FEATURES`)
else
	set features = ()
d138 4
a141 9
$lisp -noinit << EOF
(setf *features* (list* $features *features*))
(setf (search-list "target:") '("$dest/" "$src/"))
(load "target:bootstrap" :if-does-not-exist nil)
(load "target:tools/setup")
(comf "target:tools/setup")
(comf "target:tools/rcs")
(quit)
EOF
d143 22
a164 9
$lisp -noinit << EOF
(setf *features* (list* $features *features*))
(setf (search-list "target:") '("$dest/" "$src/"))
(load "target:bootstrap" :if-does-not-exist nil)
(load "target:tools/setup")
(setf *interactive* nil *gc-verbose* nil)
(load "target:tools/worldcom")
(quit)
EOF
d166 6
a171 10
$lisp -noinit << EOF
(setf *features* (list* $features *features*))
(setf (search-list "target:") '("$dest/" "$src/"))
(setf (search-list "clx:") '("target:clx/"))
(load "target:bootstrap" :if-does-not-exist nil)
(load "target:tools/setup")
(setf *interactive* nil *gc-verbose* nil)
(load "target:tools/clxcom")
(quit)
EOF
d173 11
a183 8
$lisp -noinit << EOF
(setf *features* (list* $features *features*))
(setf (search-list "target:") '("$dest/" "$src/"))
(load "target:bootstrap" :if-does-not-exist nil)
(load "target:tools/setup")
(setf *interactive* nil *gc-verbose* nil)
(load "target:tools/hemcom")
(quit)
d186 6
a191 9
$lisp -noinit << EOF
(setf *features* (list* $features *features*))
(setf (search-list "target:") '("$dest/" "$src/"))
(load "target:bootstrap" :if-does-not-exist nil)
(load "target:tools/setup")
(setf *interactive* nil *gc-verbose* nil)
(load "target:tools/comcom")
(quit)
EOF
d193 19
a211 7
$lisp -noinit << EOF
(setf *features* (list* $features *features*))
(setf (search-list "target:") '("$dest/" "$src/"))
(load "target:bootstrap" :if-does-not-exist nil)
(setf *gc-verbose* nil)
(load "target:tools/pclcom")
(quit)
d213 2
@


1.3
log
@Added quotes around $LISP.
@
text
@d5 1
a5 1
# $Header: compile-all,v 1.2 91/11/26 22:10:18 wlott Locked $
d31 1
d41 1
d52 1
d62 1
d72 1
d82 1
@


1.2
log
@Put .../clisp/src/$subdir in target: also so we don't have to have
symbolic links from the build area to the source area.
Get additional features from .../$subdir/FEATURES instead of assuming
:small.
If the environment variable $LISP is set, use it instead of lisp when
compiling.
Also compile PCL.
@
text
@d5 1
a5 1
# $Header: compile-all,v 1.1 91/10/15 15:30:52 wlott Locked $
d17 1
a17 1
	set lisp = $LISP
@


1.1
log
@Initial revision
@
text
@d1 1
a1 1
#!/bin/csh -f
d3 1
a3 1
#  compile-all -- script to compile everything but PCL
d5 1
a5 1
# $Header: $
a11 1
set lisp = /afs/cs/project/clisp/@@sys/$subdir
d13 18
a30 2
lisp -noinit << EOF
(setf (search-list "target:") '("$lisp/"))
d37 3
a39 2
lisp -noinit << EOF
(setf (search-list "target:") '("$lisp/"))
a40 1
(push :small *features*)
d46 3
a48 2
lisp -noinit << EOF
(setf (search-list "target:") '("$lisp/"))
a50 1
(push :small *features*)
d56 3
a58 2
lisp -noinit << EOF
(setf (search-list "target:") '("$lisp/"))
a59 1
(push :small *features*)
d65 3
a67 2
lisp -noinit << EOF
(setf (search-list "target:") '("$lisp/"))
a68 1
(push :small *features*)
d71 8
@
