don't build in support for obsolete makedefs options

unless OLD_MAKEDEFS_OPTIONS is defined during the compile of makedefs.c
This commit is contained in:
nhmall
2023-11-19 10:05:01 -05:00
parent d3e80bf9bf
commit 13f49bdd92
5 changed files with 506 additions and 451 deletions

View File

@@ -746,9 +746,9 @@ $(TARGETPFX)date.o: date.c $(HACK_H) $(HACKCSRC) $(HOBJ)
# Do NOT include ../dat/gitinfo.txt as either a prerequisite or target.
# 'makedefs -v' processes it when present and ignores it if not.
#
../include/date.h: ../util/makedefs $(VERSOURCES) $(HACK_H)
-$(SHELL) ../sys/unix/gitinfo.sh $(GITINFO) #before 'makedefs -v'
../util/makedefs -v
#../include/date.h: ../util/makedefs $(VERSOURCES) $(HACK_H)
# -$(SHELL) ../sys/unix/gitinfo.sh $(GITINFO) #before 'makedefs -v'
# ../util/makedefs -v
lint:
# lint cannot have -p here because (i) capitals are meaningful:

View File

@@ -67,7 +67,7 @@ DIRPERM = 0755
# Qt without X11; assumes GRAPHIC_TOMBSTONE:
# VARDATND = nhtiles.bmp pet_mark.xbm pilemark.xbm rip.xpm
VARDATD = bogusmon data engrave epitaph oracles options quest.lua rumors
VARDATD = bogusmon data engrave epitaph oracles quest.lua rumors
VARDAT = $(VARDATD) $(VARDATND)
# Some versions of make use the SHELL environment variable as the
@@ -245,8 +245,9 @@ GEM_RSC.RSC:
title.img:
( cd dat ; $(MAKE) title.img )
check-dlb: options
@if egrep -s librarian dat/options ; then $(MAKE) dlb ; else true ; fi
check-dlb:
@true
# @if egrep -s librarian options; then $(MAKE) dlb ; else true ; fi
dlb:
( cd util ; $(MAKE) dlb )
@@ -264,12 +265,12 @@ recover: $(GAME)
( cd util ; $(MAKE) recover )
dofiles:
target=`sed -n \
-e '/librarian/{' \
-e 's/.*/dlb/p' \
-e 'q' \
-e '}' \
-e '$$s/.*/nodlb/p' < dat/options` ; \
# target=`sed -n \
# -e '/librarian/{' \
# -e 's/.*/dlb/p' \
# -e 'q' \
# -e '}' \
# -e '$$s/.*/nodlb/p' < dat/options` ; \
$(MAKE) dofiles-$${target-nodlb}
cp src/$(GAME) $(INSTDIR)
cp util/recover $(INSTDIR)

View File

@@ -194,6 +194,11 @@ ODATE = $(OBJDIR)/date.o
# object files for makedefs
MAKEOBJS = makedefs.o $(OMONOBJ) $(ODATE) $(OALLOC)
# To include old makedefs options support, define
# OLD_MAKEDEFS_OPTIONS
#OLD_MAKEDEFS_OPTIONS = -DOLD_MAKEDEFS_OPTIONS
OLD_MAKEDEFS_OPTIONS =
# object files for recovery utility
RECOVOBJS = $(TARGETPFX)recover.o
@@ -231,7 +236,7 @@ makedefs.o: makedefs.c ../src/mdlib.c $(CONFIG_H) \
../include/monst.h ../include/monsters.h ../include/objects.h \
../include/you.h ../include/context.h ../include/flag.h \
../include/dlb.h ../include/patchlevel.h mdgrep.h
$(CC) $(CFLAGS) $(CSTD) -c makedefs.c -o $@
$(CC) $(CFLAGS) $(CSTD) $(OLD_MAKEDEFS_OPTIONS) -c makedefs.c -o $@
# Don't require perl to build; that is why mdgrep.h is spelled wrong below.
mdgreph: mdgrep.pl

View File

@@ -701,7 +701,7 @@ CLEAN_FILE += $(UTARGETS) $(UOBJS)
#==========================================
ODLB = $(O)dlb
DLBOBJS = $(addprefix $(ODLB)/, alloc.o dlb.o dlb_main.o panic.o)
DAT_CLEAN = $(addprefix $(DAT)/, data oracles options porthelp rumors engrave epitaph bogusmon)
DAT_CLEAN = $(addprefix $(DAT)/, data oracles porthelp rumors engrave epitaph bogusmon)
DAT_NOCLEAN = $(addprefix $(DAT)/, help hh cmdhelp keyhelp history opthelp optmenu \
wizhelp license engrave epitaph bogusmon tribute)
DLBLST = $(DAT)/dlb.lst
@@ -728,9 +728,6 @@ $(DAT)/data: $(U)makedefs.exe $(DAT)/data.base
$(DAT)/oracles: $(U)makedefs.exe $(DAT)/oracles.txt
$< -h
$(DAT)/options $(INCL)/date.h: $(U)makedefs.exe
$< -v
$(DAT)/porthelp: $(MSWSYS)/porthelp
cp $< $@
@@ -747,9 +744,6 @@ $(DAT)/bogusmon: $(U)makedefs.exe $(DAT)/bogusmon.txt $(DAT)/engrave.txt $(DAT)/
$(DLBLST): $(LUAFILES) | $(DAT_CLEAN) $(DAT_NOCLEAN)
echo data > $(DLBLST)
echo oracles >> $(DLBLST)
echo options >> $(DLBLST)
if [ -f $(DAT)/ttyoptions ] ; then echo ttyoptions >> $(DLBLST) ; fi
if [ -f $(DAT)/guioptions ] ; then echo guioptions >> $(DLBLST) ; fi
echo porthelp >> $(DLBLST)
echo rumors >> $(DLBLST)
echo help >> $(DLBLST)

File diff suppressed because it is too large Load Diff