From 8e12c52456edbe01a6683239c6e36d5313c192eb Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Fri, 27 Oct 2023 08:30:53 -0700 Subject: [PATCH] Restore diff rules in 2001/coupard/Makefile I ended up not doing a git pull in the system with the problem (of implicit ints being an error) and so the Makefile used was the old one prior to the change in diff rules. This commit restores them and the silencing of implicit int warnings. --- 2001/coupard/Makefile | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/2001/coupard/Makefile b/2001/coupard/Makefile index 1ae233869..b643be7e2 100644 --- a/2001/coupard/Makefile +++ b/2001/coupard/Makefile @@ -124,7 +124,8 @@ ALT_TARGET= all: data ${TARGET} @${TRUE} -.PHONY: all alt data everything orig_prog_diff alt_prog_diff \ +.PHONY: all alt data everything diff_orig_prog diff_prog_orig \ + diff_alt_prog diff_prog_alt diff_orig_alt diff_alt_orig \ clean clobber install love haste waste maker easter_egg \ sandwich supernova deep_magic magic charon pluto @@ -146,18 +147,47 @@ data: ${DATA} everything: all alt @${TRUE} + +##################### +# make a difference # +##################### +# # diff orig source and source # -orig_prog_diff: ${PROG}.orig.c ${PROG}.c +diff_orig_prog: ${PROG}.orig.c ${PROG}.c @-${DIFF} -u ${PROG}.orig.c ${PROG}.c +# diff source and orig source +# +diff_prog_orig: ${PROG}.c ${PROG}.orig.c + @-${DIFF} -u ${PROG}.c ${PROG}.orig.c + # diff alt source and source # -alt_prog_diff: ${PROG}.c +diff_alt_prog: ${PROG}.c @-if [[ -e ${PROG}.alt.c ]]; then \ ${DIFF} -u ${PROG}.alt.c ${PROG}.c; \ fi +# diff source and alt source +# +diff_prog_alt: ${PROG}.c + @-if [[ -e ${PROG}.alt.c ]]; then \ + ${DIFF} -u ${PROG}.c ${PROG}.alt.c; \ + fi + +# diff orig and alt +# +diff_orig_alt: ${PROG}.orig.c + @-if [[ -e ${PROG}.alt.c ]]; then \ + ${DIFF} -u ${PROG}.orig.c ${PROG}.alt.c; \ + fi + +diff_alt_orig: + @-if [[ -e ${PROG}.alt.c ]]; then \ + ${DIFF} -u ${PROG}.alt.c ${PROG}.orig.c; \ + fi + ############### # utility rules