From f895cabf52336db0f2a259bbe6fae6e6fc81c98a Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sun, 10 Oct 2021 19:46:42 +0200 Subject: cc: work on int, char types --- miniany/autobuild.sh | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'miniany/autobuild.sh') diff --git a/miniany/autobuild.sh b/miniany/autobuild.sh index e174ff4..8de5629 100755 --- a/miniany/autobuild.sh +++ b/miniany/autobuild.sh @@ -1,13 +1,29 @@ #!/bin/bash cat >/tmp/autobuild_tmp_$$.sh < test1.asm -fasm test1.asm test1.bin -../ecomp-c/emul -v test1.bin +if test \$? -eq 0; then + ./cc < test1.c > test1.asm + if test \$? -eq 0; then + fasm test1.asm test1.bin + if test \$? -eq 0; then + ../ecomp-c/emul -v test1.bin + if test \$? -ne 0; then + echo "ERROR: running emulator with test1.bin" + fi + else + echo "ERROR: assembling test1.asm" + fi + else + echo "ERROR: compiling test1.c" + grep '; ERROR' test1.asm + fi +else + echo "ERROR: building cc" +fi EOF chmod 775 /tmp/autobuild_tmp_$$.sh -- cgit v1.2.3-54-g00ecf