diff --git a/1989/jar.2/Makefile b/1989/jar.2/Makefile index fcc3c1df2..9605610b6 100644 --- a/1989/jar.2/Makefile +++ b/1989/jar.2/Makefile @@ -132,7 +132,6 @@ all: data ${TARGET} ${PROG}: ${PROG}.c ${CC} ${CFLAGS} $< -o $@ ${LDFLAGS} - @echo @echo NOTE: invalid input will cause this entry to dump core. See README.md for details. # alternative executable diff --git a/1989/jar.2/try.sh b/1989/jar.2/try.sh index 8116615d6..5fd376fc3 100755 --- a/1989/jar.2/try.sh +++ b/1989/jar.2/try.sh @@ -1,8 +1,15 @@ #!/usr/bin/env bash # # demo for 1989/jar.2 - run entry with one or more files +# -make all || exit 1 +# if CC is not specified set to default 'cc'. CC can be a path or no path which +# makes the shell figure it out. +if [[ -z "$CC" ]]; then + CC="cc" +fi + +make CC="$CC" all || exit 1 if [[ "$#" -lt 1 ]]; then FILES="try.txt fib.lisp chocolate_cake.lisp" @@ -12,6 +19,7 @@ fi for f in $FILES; do if [[ -e "$f" && -r "$f" ]]; then + echo "$ ./jar.2 < $f" 1>&2 ./jar.2 < "$f" fi done