From 5b0f40ad62156df1aa4e418b4681dbcbb123ca77 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Fri, 22 Mar 2024 05:14:06 -0700 Subject: [PATCH] Fix 1993/lmfjyh/Makefile The problem it had is that it was reverted back to trying to compile the very unsafe file name without deleting it after the ${CC} line. Thus the ${RM} part was moved back to the end of the rule. I added the file (or a glob that will match the file) to .gitignore a long time ago possibly when I added the alt code. The thanks file was fixed to account for the fact that the Makefile no longer automatically builds the alt version if the code fails to compile. --- 1993/lmfjyh/Makefile | 3 ++- thanks-for-help.html | 4 +--- thanks-for-help.md | 4 +--- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/1993/lmfjyh/Makefile b/1993/lmfjyh/Makefile index e90379a69..359722966 100644 --- a/1993/lmfjyh/Makefile +++ b/1993/lmfjyh/Makefile @@ -132,7 +132,6 @@ ${PROG}: ${PROG}.c @echo "it relies on a compiler bug which was fixed in gcc 2.3.3 a very" @echo "long time ago." @echo - ${RM} -f \"\;main\(\)\{puts\(\"Hello\ World!\"\)\;\}char\*C=\".c ${CP} lmfjyh.c \"\;main\(\)\{puts\(\"Hello\ World!\"\)\;\}char\*C=\".c @echo ${CC} ${CFLAGS} \"\;main\(\)\{puts\(\"Hello\ World!\"\)\;\}char\*C=\".c -o $@ ${LDFLAGS} @${CC} ${CFLAGS} \ @@ -145,6 +144,8 @@ ${PROG}: ${PROG}.c echo "and then run the alternate program:" && \ echo && \ echo " ./${ALT_TARGET}" + @${RM} -f \"\;main\(\)\{puts\(\"Hello\ World!\"\)\;\}char\*C=\".c + # alternative executable # diff --git a/thanks-for-help.html b/thanks-for-help.html index c1769c50e..d6a4d8c8a 100644 --- a/thanks-for-help.html +++ b/thanks-for-help.html @@ -1299,9 +1299,7 @@ files for functions.

Cody added an alternate version which does what the program did with gcc < 2.3.3. See the index.html file for details and for why this was made -the alternate version, not the actual entry. This alternate version will compile -automatically (as lmfjyh itself) in the very likely case (if you don’t have -gcc < 2.3.3) that the entry fails to compile.

+the alternate version, not the actual entry.

Cody also made the Makefile delete the very unsafe filename that is compiled (or would be compiled if gcc < 2.3.3) whether or not compilation succeeds (which is highly unlikely).

diff --git a/thanks-for-help.md b/thanks-for-help.md index 5d09c62f1..44c8bbdb6 100644 --- a/thanks-for-help.md +++ b/thanks-for-help.md @@ -1809,9 +1809,7 @@ files for functions. [Cody](#cody) added an [alternate version](1993/lmfjyh/index.html#alternate-code) which does what the program did with gcc < 2.3.3. See the index.html file for details and for why this was made -the alternate version, not the actual entry. This alternate version will compile -automatically (as `lmfjyh` itself) in the very likely case (if you don't have -gcc < 2.3.3) that the entry fails to compile. +the alternate version, not the actual entry. Cody also made the Makefile delete the very unsafe filename that is compiled (or would be compiled if gcc < 2.3.3) whether or not compilation succeeds (which is