]> granicus.if.org Git - nethack/commitdiff
Makefile management
authorPatR <rankin@nethack.org>
Sat, 11 Feb 2023 00:42:01 +0000 (16:42 -0800)
committerPatR <rankin@nethack.org>
Sat, 11 Feb 2023 00:42:01 +0000 (16:42 -0800)
Have 'make clean' and 'make spotless' in 3.7 cleanup include/tile.h
from 3.6.  Otherwise use of 'cc -I../include -I../win/share' in
util/Makefile will get 3.6's include/tile.h instead of 3.7's
win/share/tile.h; use of FDECL() causes the old header to break when
used in various tiles utilities.

sys/unix/Makefile.utl

index 13a2bbe9c513471cbca61c4b31ee2c29b97bc220..f9a0c5af12aa3047fa9c902751fe405c65ef1568 100644 (file)
@@ -407,7 +407,16 @@ SYSSHARE=../sys/share/
 tags: $(UTILSRCS)
        @ctags -tw $(UTILSRCS)
 
-clean:
+# note:        3.6 copied tile.h from win/share/ to include/ and if someone
+#      switches branches from 3.6 to 3.7 without executing 'make spotless'
+#      first, the old tile.h sticks around and gets found during compile
+#      instead of current one; various tile utilities won't build in that
+#      mis-configuration so allow 'make clean' and 'make spotless' in 3.7
+#      to fix things up by deleting the out of date file (if present)
+clean-fixup:
+       -rm -f ../include/tile.h
+
+clean: clean-fixup
        -rm -f *.o
 
 spotless: clean