add orig_prog_diff and alt_prog_diff rules to Makefiles

This commit is contained in:
Landon Curt Noll committed 2023-10-18 17:00:02 -07:00
1 parent e1cd30eff0
commit 8471e805ed
349 files changed
+5680 -1074

No files matched your search

+15 -3
View File
@@ -124,9 +124,9 @@ ALT_TARGET= ${PROG}.alt
all: data ${TARGET}
@${TRUE}
.PHONY: all alt data everything clean clobber install \
love haste waste maker easter_egg sandwich \
supernova deep_magic magic charon pluto
.PHONY: all alt data everything orig_prog_diff alt_prog_diff \
clean clobber install love haste waste maker easter_egg \
sandwich supernova deep_magic magic charon pluto
${PROG}: ${PROG}.c
@echo "NOTE: this program will likely crash or do something else without enough args."
@@ -150,6 +150,18 @@ data: ${DATA}
everything: all alt
@${TRUE}
# diff orig source and source
#
orig_prog_diff: ${PROG}.orig.c ${PROG}.c
@-${DIFF} -u ${PROG}.orig.c ${PROG}.c
# diff alt source and source
#
alt_prog_diff: ${PROG}.c
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.alt.c ${PROG}.c; \
fi
###############
# utility rules