From 60f570c46f616aa18a68d04c52384c2df22907c0 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Thu, 11 Jan 2024 08:17:39 -0800 Subject: [PATCH] Improve message in all rule in 1993/lmfjyh It now clarifies that in the likely case it fails to compile the alt version will be built as lmfjyh itself rather than suggesting one run make alt (which basically did already). It does show how one can compile the alt code manually still but it is not strictly necessary as this entry is one of the rare cases where if the primary target fails the alt target is built automatically. --- 1993/lmfjyh/Makefile | 12 +++++++++--- 1993/lmfjyh/README.md | 6 +++--- thanks-for-help.md | 8 ++++++-- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/1993/lmfjyh/Makefile b/1993/lmfjyh/Makefile index a8a712deb..dc2ece1db 100644 --- a/1993/lmfjyh/Makefile +++ b/1993/lmfjyh/Makefile @@ -38,7 +38,7 @@ include ../../var.mk # Common C compiler warnings to silence # -CSILENCE= +CSILENCE= -Wno-implicit-int # Common C compiler warning flags # @@ -130,8 +130,14 @@ all: data ${TARGET} ${PROG}: ${PROG}.c @echo "NOTE: This will not compile when using modern compilers because" @echo "it relies on a compiler bug which was fixed in gcc 2.3.3 (a very" - @echo "long time ago now). Try make alt for a version that works with gcc" - @echo ">=2.3.3." + @echo "long time ago now). We will build the alt version as $@ in the very" + @echo "likely case this fails to compile. If however you wish to manually" + @echo "compile the alt version you should do:" + @echo + @echo " make alt" + @echo + @echo "and then run ${ALT_TARGET}." + @echo ${RM} -f \"\;main\(\)\{puts\(\"Hello\ World!\"\)\;\}char\*C=\".c ${CP} lmfjyh.c \"\;main\(\)\{puts\(\"Hello\ World!\"\)\;\}char\*C=\".c ${CC} ${CFLAGS} \ diff --git a/1993/lmfjyh/README.md b/1993/lmfjyh/README.md index 1d56c008f..9b8e5ec1d 100644 --- a/1993/lmfjyh/README.md +++ b/1993/lmfjyh/README.md @@ -22,9 +22,9 @@ alternate version for [those of us](https://www.collinsdictionary.com/dictionary/english/everyone) with gcc >= 2.3.3. See [Alternate code](#alternate-code) section below for more details. -However, there is an another version that will be compiled in case this fails. -This should happen automatically. See [Alternate code](#alternate-code) below -for more details on it. +However, there is an another version that will be compiled in the extremely +likely case this fails. This should happen automatically. See [Alternate +code](#alternate-code) below for more details on it. ### Bugs and (Mis)features: diff --git a/thanks-for-help.md b/thanks-for-help.md index fee42d17e..e62960e14 100644 --- a/thanks-for-help.md +++ b/thanks-for-help.md @@ -1672,8 +1672,12 @@ files for functions. version](/1993/lmfjyh/README.md#alternate-code) which does what the program did with gcc < 2.3.3. See the README.md file for details and for why this was made the alternate version, not the actual entry. This alternate version will compile -automatically in the very likely case (if you don't have gcc < 2.3.3) that the -entry fails to 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. + +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). ## [1993/plummer](/1993/plummer/plummer.c) ([README.md](/1993/plummer/README.md]))