Guidebook make sequencing

Be able to run 'make Guidebook{|.txt|.ps}' in the doc subdirectory
without requring a full install first.

makedefs is no longer one of the first things built when building
nethack, and even if it was, nobody should have to rebuild all of
nethack after 'make spotless' when they just want to create one
or more of the formatted Guidebooks.  The 'roff versions (.ps and
also .txt) use makedefs as a filter by default, so wouldn't build
if it wasn't there.

Have Makefile.doc build makedefs when needed.

Clean up some dependencies in Makefile.utl.

Add a couple of comments to Makefile.src.
This commit is contained in:
PatR
2021-09-27 01:30:53 -07:00
parent bdfd41d203
commit e52f38b3a3
3 changed files with 34 additions and 11 deletions

View File

@@ -3,6 +3,11 @@
# Copyright (c) 2018 by Robert Patrick Rankin
# NetHack may be freely redistributed. See license for details.
#
# Note: as of nethack 3.7, 'lev_comp' and 'dgn_comp' are no longer present
# so use of yacc and lex to build them is no longer required.
#
# Root of source tree:
NHSROOT=..
@@ -206,12 +211,18 @@ TARGET_CXXFLAGS = $(CXXFLAGS)
makedefs: $(MAKEOBJS) mdgrep.h
$(CLINK) $(LFLAGS) -o makedefs $(MAKEOBJS)
makedefs.o: makedefs.c ../src/mdlib.c $(CONFIG_H) ../include/permonst.h \
../include/objclass.h ../include/sym.h ../include/defsym.h \
# note: the headers listed here are maintained manually rather than via
# 'make depend'; only the ones which are directly included by
# makedefs.c are listed, without various nested ones that they include;
# for makedefs (but not for nethack's core), mdlib.c gets included
# rather than be compiled separately
makedefs.o: makedefs.c ../src/mdlib.c $(CONFIG_H) \
../include/permonst.h ../include/objclass.h \
../include/artilist.h ../include/dungeon.h ../include/obj.h \
../include/monst.h ../include/monsters.h ../include/objects.h \
../include/you.h ../include/flag.h ../include/dlb.h \
../include/patchlevel.h
../include/you.h ../include/context.h ../include/flag.h \
../include/dlb.h ../include/patchlevel.h mdgrep.h
$(CC) $(CFLAGS) -c makedefs.c -o $@
# Don't require perl to build; that is why mdgrep.h is spelled wrong below.