Commit Graph

43 Commits

Author SHA1 Message Date
Lassi Kortela 6c02b18076 Finish initial Haiku port 2019-10-14 03:52:46 +03:00
Lassi Kortela 021e7ab734 Rename flmain.c -> main.c 2019-10-13 23:15:01 +03:00
Lassi Kortela 0d315e320e Add most SRFI 175 ASCII character procedures 2019-09-29 12:32:57 +03:00
Lassi Kortela aca621c32e Add -Werror compiler flag
Compiler warnings are runtime errors waiting to happen.
2019-08-28 20:51:15 +03:00
Lassi Kortela b33f6c9d76 Add a proper list accumulator utility in C 2019-08-28 12:45:21 +03:00
John Cowan 3b4d31db85 Add Cygwin build 2019-08-28 11:52:00 +03:00
Lassi Kortela e20f1a62d3 Put LFLAGS last for linker
For some reason, some versions of the GNU linker will fail to find libraries
if the -l flags are listed before the .o files to be linked.
2019-08-28 00:29:20 +03:00
Lassi Kortela 847eb585ae Reorganize boot image inclusion on C
Cuts the build time in half that flisp.c is no longer re-compiled
unnecessarily.
2019-08-27 10:31:31 +03:00
Lassi Kortela a02557230b Consolidate (almost) all #include's into new "scheme.h" 2019-08-26 22:12:15 +03:00
Lassi Kortela 6da8d0a939 Propagate scheme-core changes with a single build
Due to a slip-up in build.sh (compiling flmain.c instead of flisp.c multiple
times), making changes in the Scheme core would require two build.sh runs
instead of one to end up in the final executable. flisp.c is the C file that
includes boot_image.h so it's the one that should get compiled multiple times.
2019-08-26 16:53:21 +03:00
Lassi Kortela 1e306391a7 Add compiler name to build directory name 2019-08-21 22:18:01 +03:00
Lassi Kortela b60d330df1 Add hacky subprocess spawn procedure 2019-08-14 20:31:39 +03:00
Lassi Kortela 2d0add09d5 Add color-name->rgb24 procedure 2019-08-14 20:02:48 +03:00
Lassi Kortela 78a04430ce Add read-ini-file procedure
Reads a .ini file into an association list. No [section] parsing yet.
2019-08-14 13:49:56 +03:00
Lassi Kortela 50c9fb2448 Sort .c and .o files in build.sh 2019-08-14 13:48:53 +03:00
Lassi Kortela a6ecac95e1 Rename fs*.c -> os*.c
I planned to put just the file system routines into these files, but
there are starting to be so many of them that I don't want to
duplicate the same set for networking, subprocesses etc.
2019-08-14 01:15:29 +03:00
Lassi Kortela 1e0a6350b5 Echo unittest command in build.sh 2019-08-14 00:58:52 +03:00
Lassi Kortela 83cc9b21b1 Add blank lines to ease reading build.sh 2019-08-14 00:56:31 +03:00
Lassi Kortela 2048ac0d45 Remove duplicate -lm switches from build.sh 2019-08-14 00:55:05 +03:00
Lassi Kortela 6c8a10155d Remove spurious echo from build.sh 2019-08-14 00:54:22 +03:00
Lassi Kortela d781c65862 Fix oversight in the bootstrap procedure
Stage 0 is supposed to emit compiled versions of system.scm and
compiler.scm. The compiler.scm bytecode wasn't emitted properly
because the emitter put the two files' bytecode in two separate C
variables instead of concatenating them into the same variable as they
should be.
2019-08-14 00:44:24 +03:00
Lassi Kortela cccbe54bb5 Finally fix the default cflags for real 2019-08-14 00:05:10 +03:00
Lassi Kortela d69ad59126 Expand here-document
Debian /bin/sh cannot handle it.
2019-08-13 23:47:43 +03:00
Lassi Kortela c14c723859 Update temp boot image paths 2019-08-13 23:20:47 +03:00
Lassi Kortela 5ced8d91f6 Store boot image inside main executable
Previously the boot image was kept in the separate file "flisp.boot".
This caused all kinds of problems, as bootstrapping is wont to do. The
biggest problem was finding a portable and convenient pathname for it.

Instead of dealing with all that stuff about how to find the file,
just store the image in a huge C string constant that goes into the
main executable. This necessitates adding a C-string hex dumper into
the Lisp system, and making build.sh slightly more complicated, but
that's a small price to pay for not having to carry a separate file
everywhere we go. Also, flmain.c is a lot simpler now and we don't
have to play around with symlinks.
2019-08-13 23:07:44 +03:00
Lassi Kortela 1f3a4798e1 Expand some cflag definitions in build.sh and add Minix 2019-08-13 18:30:27 +03:00
Lassi Kortela 3b13e81eae Add concept of built-in libraries and (import) statement
R7RS syntax is: (import (library name here))

We translate this into the internal path "library/name/here". This will allow
us to easily load libraries from files later on by appending the ".sld" file
name extension.
2019-08-11 22:32:55 +03:00
Lassi Kortela 4c391d6d68 Brand as Up Scheme 2019-08-10 12:26:51 +03:00
Lassi Kortela c2a63dd28f Revert "Add -pedantic compiler flag"
Wow, that's a lot of GNU/C11 extensions! We're not ready to tackle all this
stuff just yet.

This reverts commit b027e7d2e5.
2019-08-10 01:55:55 +03:00
Lassi Kortela b027e7d2e5 Add -pedantic compiler flag 2019-08-10 01:53:31 +03:00
Lassi Kortela acc5c4c5e2 Switch to _GNU_SOURCE on Linux
No reason to care about Posix in particular, and it causes problems.
2019-08-10 01:50:04 +03:00
Lassi Kortela 2950e6ae5b Set _X_OPEN_SOURCE and default compiler in build script 2019-08-10 01:43:47 +03:00
Lassi Kortela 2ec07684d2 Get OS name from uname()
This implies that OS names have changed. Unix-like OS names are now
capitalized. "macos" is now "Darwin". Windows is now all-lowecase "windows".
"win32" is gone. "win64" was not used in the original code despite a reference
to it.
2019-08-10 00:35:16 +03:00
Lassi Kortela daaa5aaed0 Break down timefuncs.c to unix and windows 2019-08-09 23:56:18 +03:00
Lassi Kortela 1d96278313 Break down dirpath.c into fs_*.c by OS
I much prefer this to using ifdefs. Requires a little help from the build
system but I find it worth it.
2019-08-09 23:12:19 +03:00
Lassi Kortela 10ffed569e Fix build errors and warnings for OpenBSD 2019-08-09 20:20:17 +03:00
Lassi Kortela 7d93f262a7 Set C compiler options -Wextra -std=gnu99 2019-08-09 19:50:21 +03:00
Lassi Kortela 85efbbc7ce Sort C file names in build.sh 2019-08-09 17:30:49 +03:00
Lassi Kortela be9b2b364e Clean up whitespace
- Tabs to spaces
- Remove invisible whitespace at ends of lines
- Break or shorten long lines (not for all files)
2019-08-09 17:25:13 +03:00
Lassi Kortela 8e35d98142 Move bootstrap images into a scheme-boot directory 2019-08-09 15:53:31 +03:00
Lassi Kortela aaf73c8439 Consolidate all Lisp files into scheme-* with .scm extension 2019-08-09 15:21:56 +03:00
Lassi Kortela d6f54bc13c Consolidate all C files into a "c" subdirectory 2019-08-09 15:02:58 +03:00
Lassi Kortela 349a42510f Replace makefiles with a simple shell script
Build, bootstrap and test everything in one go. Put build artifacts in a
separate subdirectory which is emptied at the start of every build.
2019-08-09 14:56:16 +03:00