From 649239f3fa4278f9255a5da9ffa6d495ad09fb92 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Tue, 14 Nov 2023 02:46:56 -0800 Subject: [PATCH] Improve 1992/buzzard.1/try.sh Now allows one to pass in CC=foo, defaulting to cc. Added -Wno-implicit-int to CSILENCE. --- 1992/buzzard.1/Makefile | 2 +- 1992/buzzard.1/try.sh | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/1992/buzzard.1/Makefile b/1992/buzzard.1/Makefile index e26c3be0e..0baa73b0b 100644 --- a/1992/buzzard.1/Makefile +++ b/1992/buzzard.1/Makefile @@ -39,7 +39,7 @@ include ../../var.mk # Common C compiler warnings to silence # CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-pedantic \ - -Wno-unused-parameter -Wno-deprecated-non-prototype + -Wno-unused-parameter -Wno-deprecated-non-prototype -Wno-implicit-int # Common C compiler warning flags # diff --git a/1992/buzzard.1/try.sh b/1992/buzzard.1/try.sh index ca5686762..794c47fd5 100755 --- a/1992/buzzard.1/try.sh +++ b/1992/buzzard.1/try.sh @@ -1,6 +1,18 @@ #!/usr/bin/env bash +# +# try.sh - show IOCCC winner 1992/buzzard.1 -make all >/dev/null || exit 1 +# make sure CC is set so that when we do make CC="$CC" it isn't empty. Doing it +# this way allows us to have the user specify a different compiler in an easy +# way. +if [[ -z "$CC" ]]; then + CC="cc" +fi +make CC="$CC" all >/dev/null || exit 1 + +# clear screen so only entry is shown +# +clear echo "$ ./buzzard.1 0 10" 1>&2 ./buzzard.1 0 10