From 6c07cc538d0e38e756574c139012b83ca8752a4f Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Tue, 16 May 2023 03:36:20 -0700 Subject: [PATCH] Clean up 1993/lmfjyh on compilation error Now if the compilation fails (it relies on a bug in gcc version < 2.3.3) the bogus file is removed. It is not possible to check the gcc version in the source code because the file is copied from lmfjyh.c in the Makefile prior to the compilation. Well it's possible to check the gcc version but it's too late at that point - the file would have already been made :-) This prevents the user form having to do quoting of the file (risking making a mistake) or using -find . -inum ... -delete after obtaining the inode (ls -li). --- 1993/lmfjyh/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/1993/lmfjyh/Makefile b/1993/lmfjyh/Makefile index f3c79aca5..5502f2372 100644 --- a/1993/lmfjyh/Makefile +++ b/1993/lmfjyh/Makefile @@ -133,7 +133,8 @@ ${PROG}: ${PROG}.c ${RM} -f \"\;main\(\)\{puts\(\"Hello\ World!\"\)\;\}char\*C=\".c ${CP} lmfjyh.c \"\;main\(\)\{puts\(\"Hello\ World!\"\)\;\}char\*C=\".c ${CC} ${CFLAGS} \ - \"\;main\(\)\{puts\(\"Hello\ World!\"\)\;\}char\*C=\".c -o $@ ${LIBS} + \"\;main\(\)\{puts\(\"Hello\ World!\"\)\;\}char\*C=\".c -o $@ ${LIBS} || \ + ${RM} -f \"\;main\(\)\{puts\(\"Hello\ World!\"\)\;\}char\*C=\".c # alternative executable #