From 33fa379314f52334f28fb681a5f4a6e82f2cf3e6 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Sat, 4 Nov 2023 21:43:17 -0700 Subject: [PATCH] make a mole hill out of 1991/ant --- 1991/ant/.gitignore | 3 ++- 1991/ant/Makefile | 14 +++++++++++--- 1991/ant/README.md | 7 ++++++- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/1991/ant/.gitignore b/1991/ant/.gitignore index 2d27aa19f..400545b7e 100644 --- a/1991/ant/.gitignore +++ b/1991/ant/.gitignore @@ -1,4 +1,5 @@ ant -hill ant.orig +hill +mole prog.orig diff --git a/1991/ant/Makefile b/1991/ant/Makefile index 2c4f2ae7e..b3b94b198 100644 --- a/1991/ant/Makefile +++ b/1991/ant/Makefile @@ -113,8 +113,8 @@ ENTRY= ant PROG= ${ENTRY} # OBJ= ${PROG}.o -DATA= -TARGET= ${PROG} +DATA= README.md +TARGET= ${PROG} hill mole # ALT_OBJ= ALT_TARGET= @@ -132,9 +132,17 @@ all: data ${TARGET} clean clobber install love haste waste maker easter_egg \ sandwich supernova deep_magic magic charon pluto -${PROG}: ${PROG}.c +${PROG}: ${PROG}.c hill ${CC} ${CFLAGS} $< -o $@ ${LDFLAGS} +hill: README.md + ${RM} -f $@ + ${CP} -f -v $? $@ + +mole: ${PROG}.c hill + ${RM} -f $@ + ${CAT} ${PROG}.c hill > $@ + # alternative executable # alt: data ${ALT_TARGET} diff --git a/1991/ant/README.md b/1991/ant/README.md index d29ef2c03..6521fb93e 100644 --- a/1991/ant/README.md +++ b/1991/ant/README.md @@ -27,10 +27,15 @@ program exit without doing anything. ### Try: ```sh -cp README.md hill +make hill ./ant hill ``` +```sh +make mole +./ant mole +``` + ## Judges' remarks: