From 42a965c19b38183a3c5cfe4edcdb90f8f3fb2447 Mon Sep 17 00:00:00 2001 From: Lars Brinkhoff Date: Fri, 12 May 2017 10:17:32 +0200 Subject: [PATCH] Document the metacompiling build process. --- doc/build.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 doc/build.md diff --git a/doc/build.md b/doc/build.md new file mode 100644 index 0000000..eccd59d --- /dev/null +++ b/doc/build.md @@ -0,0 +1,22 @@ +This describes how lbForth is normally built. + +- To build a target, load its build.fth file. Every target should + have one. + +- build.fth sets up some information about the target, and loads the + generic compile.fth. + +- compile.fth loads the generic metacompiler framework. + + - The generic metacompiler loads a library for accessing a target image. + + - And creates vocabularies for metacompiling words. + +- compile.fth proceeds to add metacompiling words that target lbForth. + +- And a target assembler. + +- It then loads kernel.fth and cold.fth to build a target image. + +- Finally, forward references are resolved, and the image is saved to + disk.