adjust Chez Scheme configure script to work in any directory

Adjust `configure` and makefiles so that `configure` can be run in an
directory, not just the source directory. Initial boot files are found
at either the current directory or the source directory.

Also, add support for `-B` and `--Boot` flags to accept a path that is
resolved relative to the current directory, instead of relative to the
installation.
This commit is contained in:
Matthew Flatt 2020-07-31 16:30:56 -06:00
parent fc5f846693
commit c1cd9c499c
11 changed files with 208 additions and 112 deletions

View File

@ -111,17 +111,19 @@ source using only standard Unix tools, such as a C compiler, unless
the "pb" boot files are packaged with the source.
The "configure" script attempts to determine what type of machine it's
on and, if successful, creates several files and directories:
* The directory "nanopass" containing the Nanopass Infrastructure,
retrieved from GitHub.
on and looks for boot files for the machine in a "boot" subdirectory
(either in the same directory as the "configure" script or the current
directory is "configure" is run from elsewhere). If it find suitable
boot files, "configure" creates several files and directories in the
current directory (which does not have to be the same as the source
directory):
* "Makefile" in the root (top level) directory.
* A workarea as a subdirectory named for the machine type (e.g.,
"ta6le" for threaded 64-bit linux). The workarea is a mirror of the
root directory, with subdirectories named "c", "s", and so on.
Compilation takes place in the workarea.
* A workarea as a subdirectory named for the machine type (e.g.,
"ta6le" for threaded 64-bit linux). The workarea is a mirror of the
root directory, with subdirectories named "c", "s", and so on.
Compilation takes place in the workarea.
* Within the workarea, the files "Makefile", "Mf-install", "Mf-boot",
etc.

View File

@ -54,12 +54,12 @@ source: ${kernelsrc} ${kernelhdr} ${mdsrc} ${mainsrc}
${Main}: ${mainobj}
cp -p ${mainobj} ${Main}
rootsrc=$(shell cd ../../c; echo *)
rootsrc=$(shell cd "${upupsrcdir}"/c; echo *)
${rootsrc}:
ifeq ($(OS),Windows_NT)
cp -p ../../c/$@ $@
cp -p "${upupsrcdir}"/c/$@ $@
else
ln -s ../../c/$@ $@
ln -s "${upupsrcdir}"/c/$@ $@
endif
scheme.o: itest.c

View File

@ -128,6 +128,12 @@ int main(int argc, const char *argv[]) {
exit(1);
}
Sregister_boot_file(argv[n]);
} else if (strcmp(arg,"-B") == 0 || strcmp(arg,"--Boot") == 0) {
if (++n == argc) {
(void) fprintf(stderr,"%s requires argument\n", arg);
exit(1);
}
Sregister_boot_direct_file(argv[n]);
} else if (strcmp(arg,"--eedisable") == 0) {
#ifdef FEATURE_EXPEDITOR
expeditor_enable = 0;

View File

@ -580,18 +580,18 @@ static boot_desc bd[MAX_BOOT_FILES];
static octet get_u8 PROTO((INT fd));
static uptr get_uptr PROTO((INT fd, uptr *pn));
static INT get_string PROTO((INT fd, char *s, iptr max, INT *c));
static IBOOL find_boot PROTO((const char *name, const char *ext, int fd, IBOOL errorp));
static IBOOL find_boot PROTO((const char *name, const char *ext, IBOOL direct_pathp, int fd, IBOOL errorp));
static void load PROTO((ptr tc, iptr n, IBOOL base));
static void check_boot_file_state PROTO((const char *who));
static IBOOL find_boot(name, ext, fd, errorp) const char *name, *ext; int fd; IBOOL errorp; {
static IBOOL find_boot(name, ext, direct_pathp, fd, errorp) const char *name, *ext; int fd; IBOOL direct_pathp, errorp; {
char pathbuf[PATH_MAX], buf[PATH_MAX];
uptr n = 0;
INT c;
const char *path;
char *expandedpath;
if ((fd != -1) || S_fixedpathp(name)) {
if ((fd != -1) || direct_pathp || S_fixedpathp(name)) {
if (strlen(name) >= PATH_MAX) {
fprintf(stderr, "boot-file path is too long %s\n", name);
S_abnormal_exit();
@ -759,7 +759,7 @@ static IBOOL find_boot(name, ext, fd, errorp) const char *name, *ext; int fd; IB
CLOSE(fd);
S_abnormal_exit();
}
if (find_boot(buf, ".boot", -1, 0)) break;
if (find_boot(buf, ".boot", 0, -1, 0)) break;
if (c == ')') {
char *sep; char *wastebuf[8];
fprintf(stderr, "cannot find subordinate boot file");
@ -1040,12 +1040,17 @@ static void check_boot_file_state(const char *who) {
extern void Sregister_boot_file(name) const char *name; {
check_boot_file_state("Sregister_boot_file");
find_boot(name, "", -1, 1);
find_boot(name, "", 0, -1, 1);
}
extern void Sregister_boot_direct_file(name) const char *name; {
check_boot_file_state("Sregister_boot_direct_file");
find_boot(name, "", 1, -1, 1);
}
extern void Sregister_boot_file_fd(name, fd) const char *name; int fd; {
check_boot_file_state("Sregister_boot_file_fd");
find_boot(name, "", fd, 1);
find_boot(name, "", 1, fd, 1);
}
extern void Sregister_heap_file(UNUSED const char *path) {
@ -1100,7 +1105,7 @@ extern void Sbuild_heap(kernel, custom_init) const char *kernel; void (*custom_i
}
#endif
if (!find_boot(name, ".boot", -1, 0)) {
if (!find_boot(name, ".boot", 0, -1, 0)) {
fprintf(stderr, "cannot find compatible %s.boot in search path\n \"%s%s\"\n",
name,
Sschemeheapdirs, Sdefaultheapdirs);

View File

@ -15,11 +15,24 @@
# See the License for the specific language governing permissions and
# limitations under the License.
srcdir=`dirname "$0"`
machs=""; last=""; sep0=""; sep1=""; sep2=""; sep3=""; sep4=" and ";
for fn in "$srcdir"/boot/*/scheme.boot ; do
next=`echo $fn | sed -e 's/.*\/boot\/\(.*\)\/scheme.boot/\1/'`
if [ "$next" != '*' ] ; then
machs=$machs$sep0$last
last=$next
sep0=$sep1; sep1=", "; sep2=$sep3; sep3=$sep4; sep4=", and "
fi
done
for fn in boot/*/scheme.boot ; do
machs=$machs$sep0$last
last=`echo $fn | sed -e 's/boot\/\(.*\)\/scheme.boot/\1/'`
sep0=$sep1; sep1=", "; sep2=$sep3; sep3=$sep4; sep4=", and "
next=`echo $fn | sed -e 's/boot\/\(.*\)\/scheme.boot/\1/'`
if [ "$next" != '*' ] ; then
machs=$machs$sep0$last
last=$next
sep0=$sep1; sep1=", "; sep2=$sep3; sep3=$sep4; sep4=", and "
fi
done
machs=$machs$sep2$last
@ -432,7 +445,9 @@ if [ "$help" = "yes" ]; then
exit 0
fi
if [ "$m" = "" -o ! -f boot/$m/scheme.boot ] ; then
if [ "$m" != "" -o -f boot/$m/scheme.boot -o -f "$srcdir"/boot/$m/scheme.boot ] ; then
echo "Configuring for $m"
else
if [ "$m" = "" ] ; then
maybem="<machine type>"
else
@ -475,23 +490,25 @@ if [ "$m" = "" -o ! -f boot/$m/scheme.boot ] ; then
exit 1
fi
./workarea $m $w $mpbhost
"$srcdir"/workarea $m $w $mpbhost
sed -e 's/$(m)/'$m'/g'\
-e 's/$(workarea)/'$w'/g'\
makefiles/Makefile.in > Makefile
"$srcdir"/makefiles/Makefile.in > Makefile
mkdir -p csug
sed -e 's/$(m)/'$m'/g'\
makefiles//Makefile-csug.in > csug/Makefile
"$srcdir"/makefiles//Makefile-csug.in > csug/Makefile
mkdir -p release_notes
sed -e 's/$(m)/'$m'/g'\
makefiles//Makefile-release_notes.in > release_notes/Makefile
"$srcdir"/makefiles//Makefile-release_notes.in > release_notes/Makefile
cat makefiles/Makefile-workarea.in > $w/Makefile
cat "$srcdir"/makefiles/Makefile-workarea.in > $w/Makefile
sed -e 's/$(m)/'$m'/g'\
-e 's/$(workarea)/'$w'/g'\
makefiles/Mf-boot.in > $w/Mf-boot
"$srcdir"/makefiles/Mf-boot.in > $w/Mf-boot
sed -e "s;^m=none\$;m=$m;"\
-e "s;^InstallBin=.*\$;InstallBin=$installbin;"\
@ -507,7 +524,7 @@ sed -e "s;^m=none\$;m=$m;"\
-e "s;^InstallKernelTarget=.*$;InstallKernelTarget=$installkerneltarget;"\
-e "s;^InstallZlibTarget=.*$;InstallZlibTarget=$installzlibtarget;"\
-e "s;^InstallLZ4Target=.*$;InstallLZ4Target=$installlz4target;"\
makefiles/Mf-install.in > $w/Mf-install
"$srcdir"/makefiles/Mf-install.in > $w/Mf-install
cat > $w/c/next_config.h << END
#define SCHEME_SCRIPT "$installscriptname"
@ -540,7 +557,17 @@ fi
warningFlags="-Wpointer-arith -Wall -Wextra -Werror -Wno-implicit-fallthrough"
optFlags=-O2
case "$srcdir" in
/*)
upupsrcdir=$srcdir
;;
*)
upupsrcdir=../../$srcdir
;;
esac
cat > $w/c/Mf-config << END
upupsrcdir=$upupsrcdir
CC=$CC
CPPFLAGS=$CPPFLAGS
CFLAGS=$CFLAGS

View File

@ -1715,6 +1715,8 @@ shortcuts to run the executable.
\index{\scheme{--retain-static-relocation} command-line option}%
\index{\scheme{-b} command-line option}%
\index{\scheme{--boot} command-line option}%
\index{\scheme{-B} command-line option}%
\index{\scheme{--Boot} command-line option}%
\index{\scheme{--verbose} command-line option}%
\index{\scheme{--version} command-line option}%
\index{\scheme{--help} command-line option}%
@ -1750,6 +1752,8 @@ shortcuts to run the executable.
& ~~keep reloc info for compute-size, etc.\\
\scheme{-b \var{path}}, \scheme{--boot \var{path}}
& ~~load boot file\\
\scheme{-B \var{path}}, \scheme{--Boot \var{path}}
& ~~load boot file relative to the current directory\\
\scheme{--verbose}
& ~~trace boot-file search process\\
\scheme{--version}
@ -1799,7 +1803,7 @@ the Scheme system, including the interpreter, compiler, and most
libraries.
Boot
files may be specified explicitly on the command
line via \scheme{-b}
line via \scheme{-b} (relative to installation directory) or \scheme{-B} (relative to current directory)
options or implicitly.
In the simplest case, no \scheme{-b}
options

View File

@ -13,12 +13,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
include Mf-config
bootfiles=$(addsuffix .boot, $(shell cd ../boot ; echo *))
doit: $(bootfiles)
%.boot:
( cd .. ; ./workarea $* xc-$* )
( cd .. ; "${srcdir}"/workarea $* xc-$* )
( cd ../xc-$*/s ; $(MAKE) -f Mf-cross base=../../$(workarea) m=$(m) xm=$* )
mkdir -p ../boot/$*
for x in `echo scheme.boot petite.boot scheme.h equates.h gc-oce.inc gc-ocd.inc vfasl.inc` ; do\
@ -26,4 +28,4 @@ doit: $(bootfiles)
mv -f ../xc-$*/boot/$*/$$x ../boot/$*/$$x ;\
fi ;\
done
rm -rf ../xc-$*
: rm -rf ../xc-$*

View File

@ -26,11 +26,14 @@
(unless target-machine
(error "set `MACH` environment variable"))
(define dest-dir
(or (getenv "SCHEME_WORKAREA") scheme-dir))
;; Writes ".boot" and ".h" files to a "boot" subdirectory of
;; `SCHEME_SRC`.
(define-runtime-path here-dir ".")
(define out-subdir (build-path scheme-dir "boot" target-machine))
(define out-subdir (build-path dest-dir "boot" target-machine))
(define nano-dir (build-path scheme-dir "nanopass"))
(define (status msg)
@ -161,7 +164,7 @@
[compile-allow-set!-undefined #t]
[current-eval (current-eval)])
(status "Load cmacro parts")
(status "Load cmacros parts")
(call-with-expressions
(build-path scheme-dir "s/cmacros.ss")
(lambda (e)
@ -217,6 +220,7 @@
(let loop ([stx stx])
(syntax-case* stx (#%top-interaction
eval-when compile
constant-case architecture else
begin
include) (lambda (a b)
(eq? (syntax-e a) (syntax-e b)))
@ -237,6 +241,13 @@
(if (eof-object? r)
'()
(cons r (loop))))))))))]
[(constant-case architecture [else e ...])
(loop #`(begin e ...))]
[(constant-case architecture [(arch ...) e ...] . _)
(memq (string->symbol target-machine) (syntax->datum #'(arch ...)))
(loop #`(begin e ...))]
[(constant-case architecture _ . clauses)
(loop #`(constant-case architecture . clauses))]
[_ (go ((current-expand) (syntax->datum stx)))])))))
(status "Load cmacros using expander")
(load-ss (build-path scheme-dir "s/cmacros.ss"))

View File

@ -13,6 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
include Mf-config
MAKEFLAGS += --no-print-directory
# the following flags control various compiler options. flags prefixed by an x
@ -449,12 +451,12 @@ nanopass.so: $(shell echo ../nanopass/nanopass/*) ../nanopass/nanopass.ss
'(compile-library "../nanopass/nanopass.ss" "nanopass.so")'\
| ${Scheme} -q --libdirs "../nanopass${dirsep}${dirsep}." --compile-imported-libraries
rootsrc = $(shell cd ../../s; echo *)
rootsrc = $(shell cd "${upupsrcdir}"/s; echo *)
${rootsrc}:
ifeq ($(OS),Windows_NT)
cp -p ../../s/$@ $@
cp -p "${upupsrcdir}"/s/$@ $@
else
ln -s ../../s/$@ $@
ln -s "${upupsrcdir}"/s/$@ $@
endif
script.all: Mf-base
@ -654,4 +656,4 @@ reset:
.PHONY: reset-one
reset-one:
if [ -f ../boot/${m}/${FILE} ] ; then rm ../boot/${m}/${FILE} ; fi
if [ ! -h ../boot/${m}/${FILE} ] ; then ln -s ../../../boot/${m}/${FILE} ../boot/${m}/${FILE} ; fi
if [ ! -h ../boot/${m}/${FILE} ] ; then ln -s "${upupupbootdir}"/boot/${m}/${FILE} ../boot/${m}/${FILE} ; fi

View File

@ -413,6 +413,7 @@
(export "void" "Sset_verbose" "(int)")
(export "void" "Sscheme_init" "(void (*)(void))")
(export "void" "Sregister_boot_file" "(const char *)")
(export "void" "Sregister_boot_direct_file" "(const char *)")
(export "void" "Sregister_boot_file_fd" "(const char *, int fd)")
(export "void" "Sregister_heap_file" "(const char *)")
(export "void" "Scompact_heap" "(void)")

View File

@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
srcdir=`dirname "$0"`
if [ $# != 1 -a $# != 2 -a $# != 3 ]
then
echo "Usage: workarea <machine-type> { <workarea name> <pb host machine-type> }"
@ -137,12 +139,31 @@ fi
# make files themselves create links for the source files as needed.
# To make local modifications, convert the links into local copies.
case "$srcdir" in
/*)
upsrcdir=$srcdir
upupsrcdir=$srcdir
upupupsrcdir=$srcdir
;;
*)
upsrcdir=../$srcdir
upupsrcdir=../../$srcdir
upupupsrcdir=../../../$srcdir
;;
esac
if [ -f boot/$M/scheme.boot ] ; then
upupupbootdir=../../..
else
upupupbootdir=$upupupsrcdir
fi
# workln source dest
# creates link if dest does not exist and source does
workln()
{
if [ ! -e $2 -a -e $1 ] ; then
$ln $1 $2 2> /dev/null
if [ ! -e $2 -a -e "$1" ] ; then
$ln "$1" $2 2> /dev/null
fi
}
@ -151,14 +172,14 @@ workln()
forceworkln()
{
if [ ! -e $2 ] ; then
/bin/ln -s $1 $2 2> /dev/null
/bin/ln -s "$1" $2 2> /dev/null
fi
}
forceworkln2()
{
if [ ! -e $2 ] ; then
$ln $1 $2 2> /dev/null
$ln "$1" $2 2> /dev/null
fi
}
@ -173,16 +194,16 @@ workdir()
workdir $W
workdir $W/c
(cd $W/c; workln ../../c/Mf-$M Mf-$M)
(cd $W/c; workln "$upupsrcdir"/c/Mf-$M Mf-$M)
(cd $W/c; forceworkln Mf-$M Makefile)
if [ "$Muni" != "" ] ; then
(cd $W/c; workln ../../c/Mf-$Muni Mf-$Muni)
(cd $W/c; workln "$upupsrcdir"/c/Mf-$Muni Mf-$Muni)
fi
if [ "$Mpbhost" != "" ] ; then
(cd $W/c; workln ../../c/Mf-$Mpbhost Mf-$Mpbhost)
(cd $W/c; workln "$upupsrcdir"/c/Mf-$Mpbhost Mf-$Mpbhost)
(cd $W/c; forceworkln Mf-$Mpbhost Mf-pbhost)
fi
(cd $W/c; workln ../../c/Mf-base Mf-base)
(cd $W/c; workln "$upupsrcdir"/c/Mf-base Mf-base)
if [ ! -e $W/c/config.h ] ; then
touch $W/c/config.h
fi
@ -191,104 +212,109 @@ if [ ! -e $W/c/Mf-config ] ; then
fi
case $M in
*nt)
(cd $W/c; workln ../../c/vs.bat vs.bat)
(cd $W/c; workln "$upupsrcdir"/c/vs.bat vs.bat)
;;
esac
workdir $W/s
(cd $W/s; workln ../../s/Mf-$M Mf-$M)
(cd $W/s; workln ${upupsrcdir}/s/Mf-$M Mf-$M)
(cd $W/s; forceworkln Mf-$M Makefile)
if [ "$Muni" != "" ] ; then
(cd $W/s; workln ../../s/Mf-$Muni Mf-$Muni)
(cd $W/s; workln ${upupsrcdir}/s/Mf-$Muni Mf-$Muni)
fi
(cd $W/s; workln ../../s/Mf-base Mf-base)
(cd $W/s; workln ../../s/Mf-cross Mf-cross)
(cd $W/s; workln ../../s/$M.def $M.def)
(cd $W/s; workln "$upupsrcdir"/s/Mf-base Mf-base)
(cd $W/s; workln "$upupsrcdir"/s/Mf-cross Mf-cross)
(cd $W/s; workln "$upupsrcdir"/s/$M.def $M.def)
(cd $W/s; forceworkln2 $M.def machine.def)
if [ "$March" != "" ] ; then
(cd $W/s; workln ../../s/$March.def $March.def)
(cd $W/s; workln "$upupsrcdir"/s/$March.def $March.def)
fi
if [ "$Mos" != "" ] ; then
(cd $W/s; workln ../../s/$Mos.def $Mos.def)
(cd $W/s; workln "$upupsrcdir"/s/$Mos.def $Mos.def)
fi
(cd $W/s; workln ../../s/default.def default.def)
(cd $W/s; workln "$upupsrcdir"/s/default.def default.def)
workdir $W/mats
(cd $W/mats; workln ../../mats/Mf-$M Mf-$M)
(cd $W/mats; workln "$upupsrcdir"/mats/Mf-$M Mf-$M)
(cd $W/mats; forceworkln Mf-$M Makefile)
if [ "$Muni" != "" ] ; then
(cd $W/mats; workln ../../mats/Mf-$Muni Mf-$Muni)
(cd $W/mats; workln "$upupsrcdir"/mats/Mf-$Muni Mf-$Muni)
fi
if [ "$Mpbhost" != "" ] ; then
(cd $W/mats; workln ../../mats/Mf-$Mpbhost Mf-$Mpbhost)
(cd $W/mats; workln "$upupsrcdir"/mats/Mf-$Mpbhost Mf-$Mpbhost)
(cd $W/mats; forceworkln Mf-$Mpbhost Mf-pbhost)
fi
(cd $W/mats; workln ../../mats/Mf-base Mf-base)
(cd $W/mats; workln ../../mats/Mf-exobj Mf-exobj)
(cd $W/mats; workln "$upupsrcdir"/mats/Mf-base Mf-base)
(cd $W/mats; workln "$upupsrcdir"/mats/Mf-exobj Mf-exobj)
case $M in
*nt)
(cd $W/mats; workln ../../mats/vs.bat vs.bat)
(cd $W/mats; workln "$upupsrcdir"/mats/vs.bat vs.bat)
;;
esac
for dir in `echo examples unicode` ; do
workdir $W/$dir
for file in `(cd $dir ; echo *)` ; do
(cd $W/$dir ; workln ../../$dir/$file $file)
done
done
linkeach()
{
dir=$1
workdir $W/$dir
for file in `(cd "$srcdir"/$dir ; echo *)` ; do
(cd $W/$dir ; workln "$upupsrcdir"/$dir/$file $file)
done
}
linkeach examples
linkeach unicode
# deep copy submodules where builds occur so changes don't propagate through symlinks
for dir in `echo zlib` ; do
if [ ! -e $W/$dir ] ; then
/bin/cp -R $dir $W/$dir
/bin/cp -R "$srcdir"/$dir $W/$dir
fi
done
for dir in `echo lz4` ; do
if [ ! -e $W/$dir ] ; then
/bin/cp -R $dir $W/$dir
/bin/cp -R "$srcdir"/$dir $W/$dir
fi
done
workdir $W/boot
workdir $W/boot/$M
(cd $W/boot/$M; workln ../../../boot/$M/scheme.h scheme.h)
(cd $W/boot/$M; workln ../../../boot/$M/equates.h equates.h)
(cd $W/boot/$M; workln ../../../boot/$M/gc-ocd.inc gc-ocd.inc)
(cd $W/boot/$M; workln ../../../boot/$M/gc-oce.inc gc-oce.inc)
(cd $W/boot/$M; workln ../../../boot/$M/vfasl.inc vfasl.inc)
(cd $W/boot/$M; workln ../../../boot/$M/petite.boot petite.boot)
(cd $W/boot/$M; workln ../../../boot/$M/scheme.boot scheme.boot)
(cd $W/boot/$M; workln ../../../boot/$M/def.so def.so)
(cd $W/boot/$M; workln ../../../boot/$M/edit.so edit.so)
(cd $W/boot/$M; workln ../../../boot/$M/fact.so fact.so)
(cd $W/boot/$M; workln ../../../boot/$M/fatfib.so fatfib.so)
(cd $W/boot/$M; workln ../../../boot/$M/fib.so fib.so)
(cd $W/boot/$M; workln ../../../boot/$M/freq.so freq.so)
(cd $W/boot/$M; workln ../../../boot/$M/m4.so m4.so)
(cd $W/boot/$M; workln ../../../boot/$M/macro.so macro.so)
(cd $W/boot/$M; workln ../../../boot/$M/matrix.so matrix.so)
(cd $W/boot/$M; workln ../../../boot/$M/object.so object.so)
(cd $W/boot/$M; workln ../../../boot/$M/power.so power.so)
(cd $W/boot/$M; workln ../../../boot/$M/rabbit.so rabbit.so)
(cd $W/boot/$M; workln ../../../boot/$M/rsa.so rsa.so)
(cd $W/boot/$M; workln ../../../boot/$M/scons.so scons.so)
(cd $W/boot/$M; workln ../../../boot/$M/setof.so setof.so)
(cd $W/boot/$M; workln ../../../boot/$M/unify.so unify.so)
(cd $W/boot/$M; workln ../../../boot/$M/fft.so fft.so)
(cd $W/boot/$M; workln ../../../boot/$M/compat.so compat.so)
(cd $W/boot/$M; workln "$upupupbootdir"/boot/$M/scheme.h scheme.h)
(cd $W/boot/$M; workln "$upupupbootdir"/boot/$M/equates.h equates.h)
(cd $W/boot/$M; workln "$upupupbootdir"/boot/$M/gc-ocd.inc gc-ocd.inc)
(cd $W/boot/$M; workln "$upupupbootdir"/boot/$M/gc-oce.inc gc-oce.inc)
(cd $W/boot/$M; workln "$upupupbootdir"/boot/$M/vfasl.inc vfasl.inc)
(cd $W/boot/$M; workln "$upupupbootdir"/boot/$M/petite.boot petite.boot)
(cd $W/boot/$M; workln "$upupupbootdir"/boot/$M/scheme.boot scheme.boot)
(cd $W/boot/$M; workln "$upupupbootdir"/boot/$M/def.so def.so)
(cd $W/boot/$M; workln "$upupupbootdir"/boot/$M/edit.so edit.so)
(cd $W/boot/$M; workln "$upupupbootdir"/boot/$M/fact.so fact.so)
(cd $W/boot/$M; workln "$upupupbootdir"/boot/$M/fatfib.so fatfib.so)
(cd $W/boot/$M; workln "$upupupbootdir"/boot/$M/fib.so fib.so)
(cd $W/boot/$M; workln "$upupupbootdir"/boot/$M/freq.so freq.so)
(cd $W/boot/$M; workln "$upupupbootdir"/boot/$M/m4.so m4.so)
(cd $W/boot/$M; workln "$upupupbootdir"/boot/$M/macro.so macro.so)
(cd $W/boot/$M; workln "$upupupbootdir"/boot/$M/matrix.so matrix.so)
(cd $W/boot/$M; workln "$upupupbootdir"/boot/$M/object.so object.so)
(cd $W/boot/$M; workln "$upupupbootdir"/boot/$M/power.so power.so)
(cd $W/boot/$M; workln "$upupupbootdir"/boot/$M/rabbit.so rabbit.so)
(cd $W/boot/$M; workln "$upupupbootdir"/boot/$M/rsa.so rsa.so)
(cd $W/boot/$M; workln "$upupupbootdir"/boot/$M/scons.so scons.so)
(cd $W/boot/$M; workln "$upupupbootdir"/boot/$M/setof.so setof.so)
(cd $W/boot/$M; workln "$upupupbootdir"/boot/$M/unify.so unify.so)
(cd $W/boot/$M; workln "$upupupbootdir"/boot/$M/fft.so fft.so)
(cd $W/boot/$M; workln "$upupupbootdir"/boot/$M/compat.so compat.so)
case $M in
*nt)
(cd $W/boot/$M; workln ../../../boot/$M/mainmd.obj mainmd.obj)
(cd $W/boot/$M; workln ../../../boot/$M/mainmt.obj mainmt.obj)
(cd $W/boot/$M; workln ../../../boot/$M/csv953md.lib csv953md.lib)
(cd $W/boot/$M; workln ../../../boot/$M/csv953mt.lib csv953mt.lib)
(cd $W/boot/$M; workln ../../../boot/$M/scheme.res scheme.res)
(cd $W/boot/$M; workln "$upupupbootdir"/boot/$M/mainmd.obj mainmd.obj)
(cd $W/boot/$M; workln "$upupupbootdir"/boot/$M/mainmt.obj mainmt.obj)
(cd $W/boot/$M; workln "$upupupbootdir"/boot/$M/csv953md.lib csv953md.lib)
(cd $W/boot/$M; workln "$upupupbootdir"/boot/$M/csv953mt.lib csv953mt.lib)
(cd $W/boot/$M; workln "$upupupbootdir"/boot/$M/scheme.res scheme.res)
;;
*)
(cd $W/boot/$M; workln ../../../boot/$M/main.o main.o)
(cd $W/boot/$M; workln ../../../boot/$M/kernel.o kernel.o)
(cd $W/boot/$M; workln "$upupupbootdir"/boot/$M/main.o main.o)
(cd $W/boot/$M; workln "$upupupbootdir"/boot/$M/kernel.o kernel.o)
;;
esac
@ -296,13 +322,13 @@ workdir $W/bin
workdir $W/bin/$M
case $M in
*nt)
(cd $W/bin/$M; workln ../../../bin/$M/scheme.exe scheme.exe)
(cd $W/bin/$M; workln "$upupupsrcdir"/bin/$M/scheme.exe scheme.exe)
(cd $W/bin/$M; forceworkln2 scheme.exe petite.exe)
(cd $W/bin/$M; workln ../../../bin/$M/csv953.dll csv953.dll)
(cd $W/bin/$M; workln ../../../bin/$M/csv953.lib csv953.lib)
(cd $W/bin/$M; workln "$upupupsrcdir"/bin/$M/csv953.dll csv953.dll)
(cd $W/bin/$M; workln "$upupupsrcdir"/bin/$M/csv953.lib csv953.lib)
;;
*)
(cd $W/bin/$M; workln ../../../bin/$M/scheme scheme)
(cd $W/bin/$M; workln "$upupupsrcdir"/bin/$M/scheme scheme)
(cd $W/bin/$M; forceworkln scheme petite)
;;
esac
@ -320,19 +346,19 @@ case $M in
esac
workdir $W/bintar
(cd $W/bintar; workln ../../bintar/Makefile Makefile)
(cd $W/bintar; workln "$upupsrcdir"/bintar/Makefile Makefile)
workdir $W/rpm
(cd $W/rpm; workln ../../rpm/Makefile Makefile)
(cd $W/rpm; workln "$upupsrcdir"/rpm/Makefile Makefile)
workdir $W/pkg
(cd $W/pkg; workln ../../pkg/Makefile Makefile)
(cd $W/pkg; workln ../../pkg/rmpkg rmpkg)
(cd $W/pkg; workln "$upupsrcdir"/pkg/Makefile Makefile)
(cd $W/pkg; workln "$upupsrcdir"/pkg/rmpkg rmpkg)
(cd $W; workln ../LOG LOG)
(cd $W; forceworkln2 ../nanopass nanopass)
(cd $W; workln ../makefiles/installsh installsh)
(cd $W; workln ../scheme.1.in scheme.1.in)
(cd $W; forceworkln2 "$upsrcdir"/nanopass nanopass)
(cd $W; workln "$upsrcdir"/makefiles/installsh installsh)
(cd $W; workln "$upsrcdir"/scheme.1.in scheme.1.in)
case $M in
*nt)
@ -342,4 +368,14 @@ case $M in
;;
esac
cat > $W/s/Mf-config << END
upupsrcdir=$upupsrcdir
upupupbootdir=$upupupbootdir
END
cat > $W/Mf-config << END
srcdir=$srcdir
END
exit 0