Skip to content

Commit

Permalink
- Cygwin is now used on Windows, updated mats, eliminated unused killme
Browse files Browse the repository at this point in the history
- added a cast to eliminate warnings in c/number.c
- fixed bug in Windows version of directory-separator-predicate in s/6.ss when path-* procedures are passed a path that is not a string.
- fixed bug in s/cp0.ss on Windows with $foreign-wchar?.
- fixed spelling of non-existent
  • Loading branch information
Bob Burger authored and Bob Burger committed Jun 10, 2016
1 parent 21ca187 commit dd1b741
Show file tree
Hide file tree
Showing 98 changed files with 438 additions and 452 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@
.*.sw?
.sw?
/Makefile
/TAGS
/a6le/
/a6nt/
/a6osx/
/bin/
/i3le/
/i3nt/
/i3osx/
/TAGS
/ta6le/
/ta6nt/
/ta6osx/
/ti3le/
/ti3nt/
/ti3osx/
/xc-*/
86 changes: 20 additions & 66 deletions BUILDING
Original file line number Diff line number Diff line change
Expand Up @@ -167,91 +167,45 @@ The make file supports several targets:

WINDOWS

Building Chez Scheme under Windows is currently more complicated than it
should be. It requires the configure script (and through it, the workarea
script) to be run on a host system that supports a compatible shell,
e.g., bash, and the various command-line tools employed by configure
and workarea, e.g., sed and ln. For example, the host system could be a
Linux or MacOS X machine. The release directory must be made available
on a shared filesystem, e.g., samba, to a build machine running Windows.
It is not presently possible to copy the release directory to a Windows
filesystem due to the use of symbolic links.
Building Chez Scheme under Windows with Cygwin follows the
instructions above except that make install is not supported:

Prerequisite:

The Microsoft Visual C compiler (express or full) and associated
tools must be available on the Windows build machine, and the PATH,
INCLUDE, and LIB variables must be set up properly for those tools.

Between the configure and build steps (below), the 32-bit or 64-bit
(as appropriate) C runtime library vcruntime$V.dll must be placed into
$W/bin/$M with a symbolic link to or copy of the file in $W/bin, where
$V is the expected C runtime version for the installed Visual C compiler
(e.g., 140 for Visual Studio 2015), $W is the workarea name, and $M is
the machine type.

Configure step (host machine):

To configure the build, run:

./configure -m=$M

where $M is replaced with one of the Windows machine types, i.e.,
i3nt for 32-bit, a6nt for 64-bit, ti3nt for threaded 32-bit, and
ta6nt for 64-bit threaded.

Build step (Windows build machine):

To build the executable $W\bin\$M\scheme.exe, run:

nmake -f Makefile.i3nt

in the directory $W\c, then recompile the Scheme sources via:
./configure
make

bldnt $M
Prerequisites:

in the directory $W/c, where $W is replaced by the name of the
workarea created by ./configure, and $M is the machine type.
* Cygwin with bash, grep, make, sed, etc.
* Microsoft Visual Studio 2015

To run Chez Scheme or Petite Chez Scheme from a terminal window,
set PATH and SCHEMEHEAPDIRS:
To run Chez Scheme or Petite Chez Scheme from a Windows command prompt,
set PATH:

set PATH=$W\bin\$M;%PATH%
set SCHEMEHEAPDIRS=$W/boot/$M

again with $W and $M replaced with the workarea name and machine
type, and start Chez Scheme with the command "scheme" or Petite
Chez with the command "petite".

Chez Scheme and Petite Chez Scheme are terminal-based programs,
not GUIs. They both incorporate sophisticated command-line editing
reminiscent of tcsh but with support for expressions that span
multiple lines.
The executables are linked against the Microsoft Visual C++ run-time
library vcruntime140.dll. If you distribute the executables to a
different system, be sure to include the redistributable run-time
library.

Testing under Windows

The iconv tests in mats/io.ms require that a 32-bit or 64-bit (as
appropriate) libiconv-2.dll implementing GNU libiconv be located in
$W/bin/$M with a symbolic link to or copy of the file in $W/bin, where
$W and $M are the workarea name and machine type. Windows sources for
appropriate) iconv.dll, libiconv.dll, or libiconv-2.dll implementing
GNU libiconv be located in $W\bin\$M or the path. Windows sources for
libiconv can be found at:

http://gnuwin32.sourceforge.net/packages/libiconv.htm

If the dlls are not present, the iconv tests will fail. No other
tests should be affected.
An alternative that uses the Windows API can be found at:

The tests can be run with a default set of options at a single
optimize level by running the command:
https://github.com/win-iconv/win-iconv

bldnt $M $O
If the DLL is not present, the iconv tests will fail. No other tests
should be affected.

in $W/mats, with $W and $M replaced with the workarea name and
machine type and $O replaced by an optimize level, e.g., 0 or 3.
This produces a set of output (.mo) files in the directory
$W/mats/output-compile-$O-f-f-f. "make fastreport o=$O" can be
then used to generate a report; this step must be run on a host
system supporting GNU make and the various tools required by the
fastreport target, e.g., grep. The resulting report file
$W/mats/report-compile-$O-f-f-f should be empty if all tests
succeeded.
Use 'make test' described above to run the tests.
14 changes: 14 additions & 0 deletions LOG
Original file line number Diff line number Diff line change
Expand Up @@ -186,3 +186,17 @@
negative differences to zero. added a corresponding release note.
system.stex,
release_notes.stex
- added a cast to eliminate a warning
c/number.c
- fixed bug in Windows version of directory-separator-predicate when
path-* procedures are passed a path that is not a string.
s/6.ss
- fixed bug in cp0 on Windows with $foreign-wchar?.
s/cp0.ss
- Cygwin is now used on Windows, updated mats, eliminated unused killme
BUILDING c/*nt c/Mf-base c/scheme.exe.manifest configure
examples/Makefile mats/6.ms mats/Mf-* mats/foreign.ms mats/ftype.ms
mats/patch-* mats/windows.ms s/Mf-*nt s/Mf-base workarea
release_notes.stex
- fixed spelling of non-existent
s/syntax.ss
Binary file modified boot/a6le/petite.boot
Binary file not shown.
Binary file modified boot/a6le/scheme.boot
Binary file not shown.
Binary file modified boot/a6nt/petite.boot
Binary file not shown.
Binary file modified boot/a6nt/scheme.boot
Binary file not shown.
Binary file modified boot/a6osx/petite.boot
Binary file not shown.
Binary file modified boot/a6osx/scheme.boot
Binary file not shown.
Binary file modified boot/i3le/petite.boot
Binary file not shown.
Binary file modified boot/i3le/scheme.boot
Binary file not shown.
Binary file modified boot/i3nt/petite.boot
Binary file not shown.
Binary file modified boot/i3nt/scheme.boot
Binary file not shown.
Binary file modified boot/i3osx/petite.boot
Binary file not shown.
Binary file modified boot/i3osx/scheme.boot
Binary file not shown.
Binary file modified boot/ta6le/petite.boot
Binary file not shown.
Binary file modified boot/ta6le/scheme.boot
Binary file not shown.
Binary file modified boot/ta6nt/petite.boot
Binary file not shown.
Binary file modified boot/ta6nt/scheme.boot
Binary file not shown.
Binary file modified boot/ta6osx/petite.boot
Binary file not shown.
Binary file modified boot/ta6osx/scheme.boot
Binary file not shown.
Binary file modified boot/ti3le/petite.boot
Binary file not shown.
Binary file modified boot/ti3le/scheme.boot
Binary file not shown.
Binary file modified boot/ti3nt/petite.boot
Binary file not shown.
Binary file modified boot/ti3nt/scheme.boot
Binary file not shown.
Binary file modified boot/ti3osx/petite.boot
Binary file not shown.
Binary file modified boot/ti3osx/scheme.boot
Binary file not shown.
3 changes: 2 additions & 1 deletion c/Makefile.a6nt
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ $(MDMain): main.c
$(Exec): $(ResFile) $(MDMain) $(KernelLib)
-del /f $(Exec)
link /out:$(Exec) $(EXELDFLAGS) $(ResFile) $(MDMain) $(KernelLib)
mt -manifest ..\..\c\scheme.exe.manifest -outputresource:$(Exec);1

$(ResFile): scheme.rc
-del /f $(ResFile)
Expand All @@ -127,7 +128,7 @@ mdscheme.exe: $(ResFile) $(MDMain) $(MDKernelLib)
$(ZlibInclude)\zlib.h $(ZlibInclude)\zconf.h $(MDZlibLib) $(MTZlibLib):
cd ../zlib
nmake /nologo -f win32/Makefile.msc AR="link /lib" CFLAGS="-nologo -MT -O2 $(LOC)"
rename zlib.lib zlibmt.lib
ren zlib.lib zlibmt.lib
nmake /nologo -f win32/Makefile.msc clean
nmake /nologo -f win32/Makefile.msc AR="link /lib"
cd ../c
Expand Down
3 changes: 2 additions & 1 deletion c/Makefile.i3nt
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ $(MDMain): main.c
$(Exec): $(ResFile) $(MDMain) $(KernelLib)
-del /f $(Exec)
link /out:$(Exec) $(EXELDFLAGS) $(ResFile) $(MDMain) $(KernelLib)
mt -manifest ..\..\c\scheme.exe.manifest -outputresource:$(Exec);1

$(ResFile): scheme.rc
-del /f $(ResFile)
Expand All @@ -123,7 +124,7 @@ mdscheme.exe: $(ResFile) $(MDMain) $(MDKernelLib)
$(ZlibInclude)\zlib.h $(ZlibInclude)\zconf.h $(MDZlibLib) $(MTZlibLib):
cd ../zlib
nmake /nologo -f win32/Makefile.msc AR="link /lib" CFLAGS="-nologo -MT -O2 $(LOC)"
rename zlib.lib zlibmt.lib
ren zlib.lib zlibmt.lib
nmake /nologo -f win32/Makefile.msc clean
nmake /nologo -f win32/Makefile.msc AR="link /lib"
cd ../c
Expand Down
3 changes: 2 additions & 1 deletion c/Makefile.ta6nt
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ $(MDMain): main.c
$(Exec): $(ResFile) $(MDMain) $(KernelLib)
-del /f $(Exec)
link /out:$(Exec) $(EXELDFLAGS) $(ResFile) $(MDMain) $(KernelLib)
mt -manifest ..\..\c\scheme.exe.manifest -outputresource:$(Exec);1

$(ResFile): scheme.rc
-del /f $(ResFile)
Expand All @@ -127,7 +128,7 @@ mdscheme.exe: $(ResFile) $(MDMain) $(MDKernelLib)
$(ZlibInclude)\zlib.h $(ZlibInclude)\zconf.h $(MDZlibLib) $(MTZlibLib):
cd ../zlib
nmake /nologo -f win32/Makefile.msc AR="link /lib" CFLAGS="-nologo -MT -O2 $(LOC)"
rename zlib.lib zlibmt.lib
ren zlib.lib zlibmt.lib
nmake /nologo -f win32/Makefile.msc clean
nmake /nologo -f win32/Makefile.msc AR="link /lib"
cd ../c
Expand Down
7 changes: 6 additions & 1 deletion c/Makefile.ti3nt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ DLLLDFLAGS=/machine:ix86 /release /nologo
# see note in Makefile.a6nt regarding stack size. we use 8MB here to be consistent.
EXELDFLAGS=/machine:ix86 /incremental:no /release /nologo /STACK:0x800000

# use following flags for debugging
# CFLAGS=/nologo /Od /W3 /MDd /I$(SchemeInclude) /I$(ZlibInclude) /DUSE_ANSI_PROTOTYPES /DI386 /DNO_UNISTD_H
# LDFLAGS=/machine:ix86 /incremental:no /release /nologo /debug

SystemLib=rpcrt4.lib ole32.lib advapi32.lib User32.lib
MDZlibLib=..\zlib\zlib.lib
MTZlibLib=..\zlib\zlibmt.lib
Expand Down Expand Up @@ -101,6 +105,7 @@ $(MDMain): main.c
$(Exec): $(ResFile) $(MDMain) $(KernelLib)
-del /f $(Exec)
link /out:$(Exec) $(EXELDFLAGS) $(ResFile) $(MDMain) $(KernelLib)
mt -manifest ..\..\c\scheme.exe.manifest -outputresource:$(Exec);1

$(ResFile): scheme.rc
-del /f $(ResFile)
Expand All @@ -119,7 +124,7 @@ mdscheme.exe: $(ResFile) $(MDMain) $(MDKernelLib)
$(ZlibInclude)\zlib.h $(ZlibInclude)\zconf.h $(MDZlibLib) $(MTZlibLib):
cd ../zlib
nmake /nologo -f win32/Makefile.msc AR="link /lib" CFLAGS="-nologo -MT -O2 $(LOC)"
rename zlib.lib zlibmt.lib
ren zlib.lib zlibmt.lib
nmake /nologo -f win32/Makefile.msc clean
nmake /nologo -f win32/Makefile.msc AR="link /lib"
cd ../c
Expand Down
26 changes: 23 additions & 3 deletions c/Mf-a6nt
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,32 @@ clib=
o = obj
mdobj=windows.$o
mdsrc=windows.c Makefile.$m cs.ico scheme.rc make.bat
mdclean=make.bat scheme.res ../bin/$m/*.exp mtscheme.exe* mdscheme.exe*
mdclean=vs.bat make.bat scheme.res ../bin/$m/*.exp mtscheme.exe* mdscheme.exe*

include Mf-base

${Scheme}: make.bat
./make.bat
cp ../bin/$m/scheme.exe ../bin/$m/petite.exe

# currently creating datestamp at 'make source' time
datestamp.c:

make.bat:
echo "@nmake /nologo -f Makefile.$m %*" > make.bat
vs.bat:
echo '@echo off' > $@
echo 'if "%VS140COMNTOOLS%" neq "" goto :VS' >> $@
echo 'echo Visual Studio 2015 must be installed.' >> $@
echo 'exit 1' >> $@
echo ':VS' >> $@
echo 'set INCLUDE=' >> $@
echo 'set LIB=' >> $@
echo 'set LIBPATH=' >> $@
echo 'call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" amd64' >> $@
echo '%*' >> $@
chmod +x $@

make.bat: vs.bat
echo '@echo off' > $@
echo 'set MAKEFLAGS=' >> $@
echo 'call vs.bat nmake /f Makefile.$m /nologo %*' >> $@
chmod +x $@
7 changes: 6 additions & 1 deletion c/Mf-base
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,12 @@ ${Main}: ${mainobj}
cp -p ${mainobj} ${Main}

rootsrc=$(shell cd ../../c; echo *)
${rootsrc}: ; ln -s ../../c/$@ $@
${rootsrc}:
ifeq ($(OS),Windows_NT)
cp -p ../../c/$@ $@
else
ln -s ../../c/$@ $@
endif

scheme.o: itest.c
scheme.o main.o: config.h
Expand Down
26 changes: 23 additions & 3 deletions c/Mf-i3nt
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,32 @@ clib=
o = obj
mdobj=windows.$o
mdsrc=windows.c Makefile.$m cs.ico scheme.rc make.bat
mdclean=make.bat scheme.res ../bin/$m/*.exp mtscheme.exe* mdscheme.exe*
mdclean=vs.bat make.bat scheme.res ../bin/$m/*.exp mtscheme.exe* mdscheme.exe*

include Mf-base

${Scheme}: make.bat
./make.bat
cp ../bin/$m/scheme.exe ../bin/$m/petite.exe

# currently creating datestamp at 'make source' time
datestamp.c:

make.bat:
echo "@nmake /nologo -f Makefile.$m %*" > make.bat
vs.bat:
echo '@echo off' > $@
echo 'if "%VS140COMNTOOLS%" neq "" goto :VS' >> $@
echo 'echo Visual Studio 2015 must be installed.' >> $@
echo 'exit 1' >> $@
echo ':VS' >> $@
echo 'set INCLUDE=' >> $@
echo 'set LIB=' >> $@
echo 'set LIBPATH=' >> $@
echo 'call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86' >> $@
echo '%*' >> $@
chmod +x $@

make.bat: vs.bat
echo '@echo off' > $@
echo 'set MAKEFLAGS=' >> $@
echo 'call vs.bat nmake /f Makefile.$m /nologo %*' >> $@
chmod +x $@
26 changes: 23 additions & 3 deletions c/Mf-ta6nt
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,32 @@ clib=
o = obj
mdobj=windows.$o
mdsrc=windows.c Makefile.$m cs.ico scheme.rc make.bat
mdclean=make.bat scheme.res ../bin/$m/*.exp mtscheme.exe* mdscheme.exe*
mdclean=vs.bat make.bat scheme.res ../bin/$m/*.exp mtscheme.exe* mdscheme.exe*

include Mf-base

${Scheme}: make.bat
./make.bat
cp ../bin/$m/scheme.exe ../bin/$m/petite.exe

# currently creating datestamp at 'make source' time
datestamp.c:

make.bat:
echo "@nmake /nologo -f Makefile.$m %*" > make.bat
vs.bat:
echo '@echo off' > $@
echo 'if "%VS140COMNTOOLS%" neq "" goto :VS' >> $@
echo 'echo Visual Studio 2015 must be installed.' >> $@
echo 'exit 1' >> $@
echo ':VS' >> $@
echo 'set INCLUDE=' >> $@
echo 'set LIB=' >> $@
echo 'set LIBPATH=' >> $@
echo 'call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" amd64' >> $@
echo '%*' >> $@
chmod +x $@

make.bat: vs.bat
echo '@echo off' > $@
echo 'set MAKEFLAGS=' >> $@
echo 'call vs.bat nmake /f Makefile.$m /nologo %*' >> $@
chmod +x $@
26 changes: 23 additions & 3 deletions c/Mf-ti3nt
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,32 @@ clib=
o = obj
mdobj=windows.$o
mdsrc=windows.c Makefile.$m cs.ico scheme.rc make.bat
mdclean=make.bat scheme.res ../bin/$m/*.exp mtscheme.exe* mdscheme.exe*
mdclean=vs.bat make.bat scheme.res ../bin/$m/*.exp mtscheme.exe* mdscheme.exe*

include Mf-base

${Scheme}: make.bat
./make.bat
cp ../bin/$m/scheme.exe ../bin/$m/petite.exe

# currently creating datestamp at 'make source' time
datestamp.c:

make.bat:
echo "@nmake /nologo -f Makefile.$m %*" > make.bat
vs.bat:
echo '@echo off' > $@
echo 'if "%VS140COMNTOOLS%" neq "" goto :VS' >> $@
echo 'echo Visual Studio 2015 must be installed.' >> $@
echo 'exit 1' >> $@
echo ':VS' >> $@
echo 'set INCLUDE=' >> $@
echo 'set LIB=' >> $@
echo 'set LIBPATH=' >> $@
echo 'call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86' >> $@
echo '%*' >> $@
chmod +x $@

make.bat: vs.bat
echo '@echo off' > $@
echo 'set MAKEFLAGS=' >> $@
echo 'call vs.bat nmake /f Makefile.$m /nologo %*' >> $@
chmod +x $@
2 changes: 1 addition & 1 deletion c/number.c
Original file line number Diff line number Diff line change
Expand Up @@ -1179,7 +1179,7 @@ static double floatify_normalize(p, e, sign, sticky) bigit *p; iptr e; IBOOL sig

/* fill in the fields */
dx.x.sign = sign;
dx.x.e = e;
dx.x.e = (UINT)e;
dx.x.m1 = (UINT)(mlow >> 48 & m1mask);
dx.x.m2 = (UINT)(mlow >> 32 & 0xffff);
dx.x.m3 = (UINT)(mlow >> 16 & 0xffff);
Expand Down
Loading

0 comments on commit dd1b741

Please sign in to comment.