Rewrite tools/mkboot.scm in Perl

Now we don't have to depend on a bin/picrin-bootstrap binary.

The old mkboot.scm filtered the Scheme source code through `read` and
`write`. This step removed extra whitespace and comments, but required
mkboot to depend on Scheme. In practice, the whitespace and comments
are not a problem, but the dependency is.

Discussed with Masanori Ogino.
This commit is contained in:
2024-03-01 21:08:12 +09:00
committed by Masanori Ogino
parent 16615615c9
commit 311abc4d5f
4 changed files with 405 additions and 325 deletions
+1 -1
View File
@@ -74,7 +74,7 @@ src/init_contrib.c:
# $(CC) -shared $(CFLAGS) -o $@ $(LIBPICRIN_OBJS) $(LDFLAGS)
lib/ext/boot.c: piclib/boot.scm piclib/library.scm
cat piclib/boot.scm piclib/library.scm | bin/picrin-bootstrap tools/mkboot.scm > lib/ext/boot.c
cat piclib/boot.scm piclib/library.scm | perl tools/mkboot.pl > lib/ext/boot.c
$(LIBPICRIN_OBJS) $(PICRIN_OBJS) $(CONTRIB_OBJS): lib/include/picrin.h lib/include/picrin/*.h lib/khash.h lib/object.h lib/state.h lib/vm.h