From: PatR Date: Fri, 8 Jan 2021 21:33:27 +0000 (-0800) Subject: 'make depend' fix X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=129ff1224528c0f6f3eb860ed985f1343efacab3;p=nethack 'make depend' fix The gone but still referenced state of amiconf.h broke 'make depend'. Fixing that turns it into a comment in the generated dependencies but that ran into a problem with it being followed by fnamesiz.h instead of being last in the list containing it. So in addition to the depend fix, move #include "fnamesiz.h" from config.h to global.h in order to have it come before amiconf.h. --- diff --git a/include/config.h b/include/config.h index d9e4fbb25..9aa89d5c7 100644 --- a/include/config.h +++ b/include/config.h @@ -1,4 +1,4 @@ -/* NetHack 3.7 config.h $NHDT-Date: 1608933417 2020/12/25 21:56:57 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.146 $ */ +/* NetHack 3.7 config.h $NHDT-Date: 1610141601 2021/01/08 21:33:21 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.148 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2016. */ /* NetHack may be freely redistributed. See license for details. */ @@ -608,6 +608,5 @@ typedef unsigned char uchar; #endif #include "global.h" /* Define everything else according to choices above */ -#include "fnamesiz.h" /* Define file sizes shared between nethack and recover */ #endif /* CONFIG_H */ diff --git a/include/global.h b/include/global.h index c1b9ae14d..9f9efe376 100644 --- a/include/global.h +++ b/include/global.h @@ -1,4 +1,4 @@ -/* NetHack 3.7 global.h $NHDT-Date: 1594032649 2020/07/06 10:50:49 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.104 $ */ +/* NetHack 3.7 global.h $NHDT-Date: 1610141601 2021/01/08 21:33:21 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.117 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2006. */ /* NetHack may be freely redistributed. See license for details. */ @@ -110,6 +110,8 @@ typedef uchar nhsym; #include "coord.h" +#include "fnamesiz.h" /* file sizes shared between nethack and recover */ + #if defined(CROSSCOMPILE) struct cross_target_s { const char *build_date; diff --git a/sys/unix/Makefile.src b/sys/unix/Makefile.src index b2d1b9b1c..4782b3bc3 100644 --- a/sys/unix/Makefile.src +++ b/sys/unix/Makefile.src @@ -1,5 +1,5 @@ # NetHack Makefile. -# NetHack 3.7 Makefile.src $NHDT-Date: 1609702027 2021/01/03 19:27:07 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.117 $ +# NetHack 3.7 Makefile.src $NHDT-Date: 1610141602 2021/01/08 21:33:22 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.118 $ # Copyright (c) 2018 by Pasi Kallinen # NetHack may be freely redistributed. See license for details. @@ -831,9 +831,9 @@ depend: ../sys/unix/depend.awk \ # config.h timestamp $(CONFIG_H): ../include/config.h ../include/config1.h ../include/patchlevel.h \ ../include/tradstdc.h ../include/global.h ../include/coord.h \ - ../include/vmsconf.h ../include/system.h ../include/nhlua.h \ - ../include/unixconf.h ../include/pcconf.h ../include/micro.h \ - ../include/ntconf.h ../include/fnamesiz.h + ../include/fnamesiz.h ../include/vmsconf.h ../include/system.h \ + ../include/nhlua.h ../include/unixconf.h ../include/pcconf.h \ + ../include/micro.h ../include/ntconf.h #../include/amiconf.h touch $(CONFIG_H) # hack.h timestamp $(HACK_H): ../include/hack.h $(CONFIG_H) ../include/lint.h ../include/align.h \ diff --git a/sys/unix/depend.awk b/sys/unix/depend.awk index a488c5457..b78deede1 100644 --- a/sys/unix/depend.awk +++ b/sys/unix/depend.awk @@ -1,6 +1,6 @@ # depend.awk -- awk script used to construct makefile dependencies # for nethack's source files (`make depend' support for Makefile.src). -# $NHDT-Date: 1575916941 2019/12/09 18:42:21 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.10 $ +# $NHDT-Date: 1610141602 2021/01/08 21:33:22 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.12 $ # # usage: # cd src ; nawk -f depend.awk ../include/*.h list-of-.c/.cpp-files @@ -31,6 +31,7 @@ BEGIN { FS = "\"" #for `#include "X"', $2 is X alt_deps["../include/patchlev.h"] = "" alt_deps["interp.c"] = " #interp.c" #comment it out alt_deps["../include/win32api.h"] = " #../include/win32api.h" + alt_deps["../include/amiconf.h"] = " #../include/amiconf.h" alt_deps["../include/zlib.h"] = " #zlib.h" #comment it out } FNR == 1 { output_dep() #finish previous file