aboutsummaryrefslogtreecommitdiff
path: root/run.sh2
diff options
context:
space:
mode:
authorMustafa Quraish <[email protected]>2022-02-05 20:50:05 -0500
committerMustafa Quraish <[email protected]>2022-02-05 20:50:05 -0500
commit261fcc9ecb671ffb81ceeac4a57de2dbf4618afc (patch)
tree9a1bd380950da2cf281421592d04c1a29bb9eb24 /run.sh2
parent[compiler.cup] Add support for function calls! (diff)
downloadcup-261fcc9ecb671ffb81ceeac4a57de2dbf4618afc.tar.xz
cup-261fcc9ecb671ffb81ceeac4a57de2dbf4618afc.zip
Update `run.sh2` to not re-make the C compiler
Diffstat (limited to 'run.sh2')
-rwxr-xr-xrun.sh213
1 files changed, 6 insertions, 7 deletions
diff --git a/run.sh2 b/run.sh2
index 9259dd4..20ba136 100755
--- a/run.sh2
+++ b/run.sh2
@@ -1,23 +1,22 @@
#!/bin/bash
# This script does the following:
-# 1. Builds compiler written in C first
-# 2. Builds the compiler written in CUP with the C compiler
-# 3. Compiles the file specified through CLI with CUP compiler
-# 4. Runs the executable
-# 5. Echoes the output of the executable
+# - Builds the compiler written in CUP with the C compile
+# - Compiles the file specified through CLI with CUP compiler
+# - Runs the executable
+# - Echoes the output of the executable
if [ -z "$1" ]
then
- echo "Usage: $0 <arguments to build/cup.out>"
+ echo "Usage: $0 [-r] <arguments to build/cup.out>"
exit 1
fi
set -xe
-make
build/cupcc compiler/main.cup -o build/cup.nasm
make build/cup.out
+
build/cup.out "$@"
make build/host.out