Consolidate build into one root Makefile; split run.sh into run-engine.sh/run-interpreter.sh

This commit is contained in:
ml
2026-07-05 16:35:18 +02:00
parent bd739ccfdf
commit 28558b4343
12 changed files with 300 additions and 199 deletions
+22 -17
View File
@@ -41,14 +41,15 @@ engine/
src/ Engine source (rng, tarot, astro, i18n, reading, CLI).
i18n/ Translation files (en.lang, de.lang, ...).
tests/smoke_test.c Determinism, ephemeris, and i18n regression checks.
scripts/ run.sh and the user.properties template.
Makefile
scripts/ run-engine.sh, run-interpreter.sh, and
the user.properties template.
dist/ Build output (gitignored) — see below.
interpreter/ Separate module + binary (dist/interpreter-cli):
scores how significant a day's transits are,
reading deck-engine's --format json output
(see CLAUDE.md).
docs/ Architecture/dataflow diagrams, input/output format reference.
Makefile Single root Makefile, builds both engine/ and interpreter/.
```
See [`CLAUDE.md`](CLAUDE.md) for the detailed architecture and the sharp
@@ -61,25 +62,25 @@ struct format reference
## Building
```bash
cd engine
make # -> dist/deck-engine, dist/img/, dist/i18n/, dist/run.sh, dist/user.properties
make test # builds and runs engine/tests/smoke_test.c
make # -> dist/deck-engine, dist/interpreter-cli, dist/img/, dist/i18n/,
# dist/run-engine.sh, dist/run-interpreter.sh, dist/user.properties
make test # builds and runs engine/tests/smoke_test.c and interpreter/tests/*_test.c
```
Requires only a C99 compiler and `make` — no other dependencies.
## Running
**Daily use**, via `dist/run.sh`: pulls today's date and the current UTC
time from the OS clock (used as the tarot seed and the transit moment)
and reads your birth data from `dist/user.properties`. Edit that file
first — it's seeded once from a placeholder template and is never
overwritten by later builds:
**Daily use**, via `dist/run-engine.sh`: pulls today's date and the
current UTC time from the OS clock (used as the tarot seed and the
transit moment) and reads your birth data from `dist/user.properties`.
Edit that file first — it's seeded once from a placeholder template and
is never overwritten by later builds:
```bash
dist/run.sh # text output, language from user.properties (default en)
dist/run.sh html # HTML report with card art, open in a browser
dist/run.sh html de # override the language for this run
dist/run-engine.sh # text output, language from user.properties (default en)
dist/run-engine.sh html # HTML report with card art, open in a browser
dist/run-engine.sh html de # override the language for this run
```
**Direct CLI**, with every input explicit:
@@ -91,19 +92,23 @@ dist/deck-engine --seed "2026-07-03" \
[--date YYYY-MM-DDTHH:MM] [--format text|html|json] [--lang en|de]
```
**Interpreter** (`interpreter/`, built separately with `cd interpreter && make`):
**Interpreter** (`interpreter/`, built by the same root `make`):
scores how significant a day's transits are, reading `deck-engine`'s
`--format json` output — the two binaries compose over that JSON, they're
never linked together:
never linked together. `dist/run-interpreter.sh` is the daily-use
equivalent of `run-engine.sh` (same OS clock + `user.properties` inputs),
piping straight into `interpreter-cli`:
```bash
dist/deck-engine ... --format json | dist/interpreter-cli
# or, for daily use:
dist/run-interpreter.sh
```
## License
The engine source code in this repository (`engine/src/`, `engine/scripts/`,
`engine/Makefile`) is released under the **MIT License** — see
The engine source code in this repository (`engine/src/`, `engine/scripts/`)
and the root `Makefile` are released under the **MIT License** — see
[`LICENSE`](LICENSE).
`engine/third_party/astronomy/` is vendored from