mu/translate_subx_emulated

51 lines
1.4 KiB
Plaintext
Raw Normal View History

2019-07-19 18:38:57 +00:00
#!/bin/sh
2019-09-07 17:20:44 +00:00
# Translate SubX by running the self-hosted translator in emulated mode on
# Linux or BSD or Mac.
2019-07-19 18:38:57 +00:00
#
# Possible knobs:
2019-09-07 17:14:35 +00:00
# Whether to run a phase natively or in emulated mode.
2019-07-19 18:38:57 +00:00
# Just always emulate for now since we debug on non-Linux.
# Whether to stop after a phase.
2019-09-07 17:14:35 +00:00
# Just always run all phases, but print out phases so it's clear where an
# error happens.
# Whether to trace a phase. Whether to always trace or rerun with tracing
# enabled after an error.
# Leave tracing to other scripts. We save intermediate files so it's easy
# to rerun a single phase afterwards.
# Whether to run a phase with debug information. (Need to juggle multiple
# sets of debug files.)
2019-07-19 18:38:57 +00:00
# Again, that's for subsequent scripts.
set -e
./build
2019-07-19 18:38:57 +00:00
echo " braces"
cat $* |./subx_bin run apps/braces > a.braces
echo " calls"
cat a.braces |./subx_bin run apps/calls > a.calls
echo " sigils"
cat a.calls |./subx_bin run apps/sigils > a.sigils
2019-08-26 05:15:26 +00:00
2019-08-26 01:23:52 +00:00
echo " tests"
cat a.sigils |./subx_bin run apps/tests > a.tests
2019-08-26 01:23:52 +00:00
echo " dquotes"
cat a.tests |./subx_bin run apps/dquotes > a.dquotes
2019-07-19 18:38:57 +00:00
2019-08-26 01:23:52 +00:00
echo " assort"
2019-07-19 18:38:57 +00:00
cat a.dquotes |./subx_bin run apps/assort > a.assort
2019-08-26 01:23:52 +00:00
echo " pack"
2019-07-19 18:38:57 +00:00
cat a.assort |./subx_bin run apps/pack > a.pack
2019-08-26 01:23:52 +00:00
echo " survey"
2019-07-19 18:38:57 +00:00
cat a.pack |./subx_bin run apps/survey > a.survey
2019-08-26 01:23:52 +00:00
echo " hex"
2019-07-19 18:38:57 +00:00
cat a.survey |./subx_bin run apps/hex > a.elf
2019-09-05 00:36:12 +00:00
chmod +x a.elf