From ab6d7cdc3bc78df5d8de0139060f2c393493ac5d Mon Sep 17 00:00:00 2001 From: nhkeni Date: Wed, 13 Mar 2024 22:04:19 -0400 Subject: [PATCH] depend.awk: bugfix for commented out replacement text --- sys/unix/Makefile.src | 4 ++-- sys/unix/depend.awk | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/unix/Makefile.src b/sys/unix/Makefile.src index 46766aa9c..c0a95177b 100644 --- a/sys/unix/Makefile.src +++ b/sys/unix/Makefile.src @@ -1171,8 +1171,8 @@ $(TARGETPFX)engrave.o: engrave.c $(HACK_H) $(TARGETPFX)exper.o: exper.c $(HACK_H) $(TARGETPFX)explode.o: explode.c $(HACK_H) $(TARGETPFX)extralev.o: extralev.c $(HACK_H) -$(TARGETPFX)files.o: files.c #zlib.h $(HACK_H) ../include/dlb.h \ - ../include/wintty.h +$(TARGETPFX)files.o: files.c $(HACK_H) ../include/dlb.h ../include/wintty.h \ + #zlib.h $(TARGETPFX)fountain.o: fountain.c $(HACK_H) $(TARGETPFX)getpos.o: getpos.c $(HACK_H) $(TARGETPFX)hack.o: hack.c $(HACK_H) diff --git a/sys/unix/depend.awk b/sys/unix/depend.awk index 6b9bc5ebd..8f3d1f9aa 100644 --- a/sys/unix/depend.awk +++ b/sys/unix/depend.awk @@ -250,6 +250,9 @@ function nhsort(list, first, last, cmpid, i,j,temp) function nhcmp(a,b,cmpid) { if(cmpid == 0){ # sort dependencies + # commented out entry (there can be only one) MUST be last + if (a ~ /^#/){ return 1} + if (b ~ /^#/){ return 0} # 2 .c or .cpp files if (a ~ /\.c(pp)?$/ && b ~ /\.c(pp)?$/ ){ return a > b } # a .c or .cpp file and anything else