]> granicus.if.org Git - nethack/commitdiff
windows and msdos Makefile support of the changes in this branch
authornhmall <nhmall@nethack.org>
Sun, 24 Nov 2019 17:01:33 +0000 (12:01 -0500)
committernhmall <nhmall@nethack.org>
Sun, 24 Nov 2019 17:01:33 +0000 (12:01 -0500)
sys/msdos/Makefile.GCC
sys/msdos/Makefile1.cross
sys/msdos/Makefile2.cross
sys/winnt/Makefile.gcc
sys/winnt/Makefile.msc

index fee192932e483d003f861c82335cc31e6244c22f..a265b791efdf99e24aadff51841703c830e3fab9 100644 (file)
@@ -318,6 +318,7 @@ VVOBJ  = $(O)version.o
 
 ifeq "$(ADD_LUA)" "Y"
 LUAOBJ = $(O)nhlua.o    $(O)nhlsel.o
+LUA_QTEXT_FILE = "quest.lua"
 endif
 
 ifeq "$(ADD_CURSES)" "Y"
@@ -1004,8 +1005,10 @@ $(DAT)/data: $(O)utility.tag     $(DATABASE)
 $(DAT)/rumors:      $(O)utility.tag    $(DAT)/rumors.tru       $(DAT)/rumors.fal
        @$(subst /,\,$(U)makedefs.exe -r)
 
+ifndef LUA_QTEXT_FILE
 $(DAT)/quest.dat: $(O)utility.tag  $(DAT)/quest.txt
        @$(subst /,\,$(U)makedefs.exe -q)
+endif
 
 $(DAT)/oracles:             $(O)utility.tag    $(DAT)/oracles.txt
        @$(subst /,\,$(U)makedefs.exe -h)
@@ -1029,12 +1032,19 @@ $(O)sp_lev.tag: $(O)utility.tag
 #note that dir below assumes bin/dir.exe from djgpp distribution
 #
 $(DAT)/nhdat:  $(U)dlb_main.exe $(DAT)/data $(DAT)/rumors \
-           $(DAT)/oracles $(DAT)/quest.dat $(O)sp_lev.tag \
-           $(DAT)/bogusmon $(DAT)/engrave $(DAT)/epitaph $(DAT)/tribute
+               $(DAT)/oracles \
+ifndef LUA_QTEXT_FILE
+               $(DAT)/quest.dat \
+endif
+               $(O)sp_lev.tag \
+               $(DAT)/bogusmon $(DAT)/engrave $(DAT)/epitaph $(DAT)/tribute
        @$(subst /,\,echo dat done >$(O)dat.tag)
        @$(subst /,\,cd $(DAT))
        @$(subst /,\,copy $(MSYS)/msdoshlp.txt .)
-       @$(LS) data oracles options quest.dat rumors help hh >dlb.lst
+       @$(LS) data oracles options rumors help hh >dlb.lst
+ifndef LUA_QTEXT_FILE
+       @$(LS) quest.dat >>dlb.lst
+endif
        @$(LS) cmdhelp history opthelp wizhelp license msdoshlp.txt >>dlb.lst
        @$(LS) bogusmon engrave epitaph tribute >>dlb.lst
        $(LS) $(subst /,\,*.lua) >>dlb.lst
@@ -1083,7 +1093,9 @@ spotless: clean
        $(subst /,\,if exist $(DAT)/data del $(DAT)/data)
        $(subst /,\,if exist $(DAT)/rumors del $(DAT)/rumors)
        $(subst /,\,if exist $(DAT)/oracles del $(DAT)/oracles)
+ifndef LUA_QTEXT_FILE
        $(subst /,\,if exist $(DAT)/quest.dat del $(DAT)/quest.dat)
+endif
        $(subst /,\,if exist $(DAT)/bogusmon del $(DAT)/bogusmon)
        $(subst /,\,if exist $(DAT)/engrave del $(DAT)/engrave)
        $(subst /,\,if exist $(DAT)/epitaph del $(DAT)/epitaph)
@@ -1165,7 +1177,9 @@ spotless: clean
        $(subst /,\,if exist $(DAT)/data del $(DAT)/data)
        $(subst /,\,if exist $(DAT)/rumors del $(DAT)/rumors)
        $(subst /,\,if exist $(DAT)/oracles del $(DAT)/oracles)
+ifndef LUA_QTEXT_FILE
        $(subst /,\,if exist $(DAT)/quest.dat del $(DAT)/quest.dat)
+endif
        $(subst /,\,if exist $(DAT)/bogusmon del $(DAT)/bogusmon)
        $(subst /,\,if exist $(DAT)/engrave del $(DAT)/engrave)
        $(subst /,\,if exist $(DAT)/epitaph del $(DAT)/epitaph)
index dde1ad256b8ccf7fc72c89ea17ffcf875fbe69d0..d6db569a788d576f73c84e27cc05dda9a7a8590f 100644 (file)
@@ -121,6 +121,8 @@ MAKESRC         = makedefs.c
 
 MAKEDEFSOBJS    = $(HOST_O)makedefs.o  $(HOST_O)monst.o         $(HOST_O)objects.o
 
+LUA_QTEXT_FILE = "quest.lua"
+
 #SPLEVSRC    = lev_yacc.c  lev_$(LEX).c         lev_main.c  panic.c
 #DGNCOMPSRC  = dgn_yacc.c  dgn_$(LEX).c         dgn_main.c
 #SPLEVOBJS   = $(HOST_O)lev_yacc.o $(HOST_O)lev_$(LEX).o $(HOST_O)lev_main.o $(HOST_O)alloc.o \
@@ -312,16 +314,22 @@ $(HOST_O)prereq.tag: hobj.tag $(U)makedefs $(HOST_O)utility.tag  \
 #note that dir below assumes bin/dir from djgpp distribution
 #
 $(DAT)/nhdat:  $(U)dlb_main $(DAT)/data $(DAT)/rumors \
-           $(DAT)/oracles $(DAT)/quest.dat \
-           $(DAT)/bogusmon $(DAT)/engrave $(DAT)/epitaph $(DAT)/tribute
+               $(DAT)/oracles \
+ifndef LUA_QTEXT_FILE
+               $(DAT)/quest.dat \
+endif
+               $(DAT)/bogusmon $(DAT)/engrave $(DAT)/epitaph $(DAT)/tribute
        cd $(DAT); \
        pwd; \
        cp $(MSYS)/msdoshlp.txt .; \
        ls -1 data oracles options quest.dat rumors help hh  >dlb.lst; \
        ls -1 cmdhelp history opthelp wizhelp license       >>dlb.lst; \
        ls -1 bogusmon engrave epitaph tribute msdoshlp.txt >>dlb.lst; \
+ifndef LUA_QTEXT_FILE
+       ls -1 quest.dat >>dlb.lst; \
+endif
        ls -1 *.lua >>dlb.lst; \
-       $(U)dlb_main cvIf dlb.lst nhdat
+       $(U)dlb_main cvIf dlb.lst nhdat; \
        cd $(SRC)
 
 $(U)dlb_main: $(DLBOBJS)
@@ -361,8 +369,10 @@ $(DAT)/rumors:          $(HOST_O)utility.tag    $(DAT)/rumors.tru  $(DAT)/rumors.fal
 $(DAT)/oracles:             $(HOST_O)utility.tag    $(DAT)/oracles.txt
        $(U)makedefs -h
 
+ifndef LUA_QTEXT_FILE
 $(DAT)/quest.dat: $(HOST_O)utility.tag  $(DAT)/quest.txt
        $(U)makedefs -q
+endif
 
 $(DAT)/bogusmon:     $(HOST_O)utility.tag    $(DAT)/bogusmon.txt
        $(U)makedefs -s
@@ -581,7 +591,7 @@ spotless: clean
 #      if [ -f $(DAT)/dungeon.pdf ];  then rm $(DAT)/dungeon.pdf; fi;
 #      if [ -f $(DAT)/dungeon ];      then rm $(DAT)/dungeon; fi;
 #      if [ -f $(DAT)/oracles ];      then rm $(DAT)/oracles; fi;
-#      if [ -f $(DAT)/quest.dat ];    then rm $(DAT)/quest.dat; fi;
+##     if [ -f $(DAT)/quest.dat ];    then rm $(DAT)/quest.dat; fi;
 #      if [ -f $(DAT)/bogusmon ];     then rm $(DAT)/bogusmon; fi;
 #      if [ -f $(DAT)/engrave ];      then rm $(DAT)/engrave; fi;
 #      if [ -f $(DAT)/epitaph ];      then rm $(DAT)/epitaph; fi;
index 75b64854149f2cbfb73b1c38dbfa6c39005d5ea8..1904b7f953515307c9599d9fa571a25d37498183 100644 (file)
@@ -321,6 +321,7 @@ MDLIB  = $(O)mdlib.o
 
 ifeq "$(ADD_LUA)" "Y"
 LUAOBJ = $(O)nhlua.o    $(O)nhlsel.o
+LUA_QTEXT_FILE = "quest.lua"
 endif
 
 ifeq "$(ADD_CURSES)" "Y"
@@ -834,7 +835,9 @@ spotless: clean
        if [ -f $(DAT)/data ];         then rm $(DAT)/data; fi;
        if [ -f $(DAT)/rumors ];       then rm $(DAT)/rumors; fi;
        if [ -f $(DAT)/oracles ];      then rm $(DAT)/oracles; fi;
+ifndef LUA_QTEXT_FILE
        if [ -f $(DAT)/quest.dat ];    then rm $(DAT)/quest.dat; fi;
+endif
        if [ -f $(DAT)/bogusmon ];     then rm $(DAT)/bogusmon; fi;
        if [ -f $(DAT)/engrave ];      then rm $(DAT)/engrave; fi;
        if [ -f $(DAT)/epitaph ];      then rm $(DAT)/epitaph; fi;
index ff2ec3bee34b4baa89ef1dc4e25b9372a9df7dec..1b10a03951b37ba5dd7487d52c963fd54c2298c8 100644 (file)
@@ -329,6 +329,7 @@ VOBJ29 = $(O)sfstruct.o $(O)sfascii.o  $(O)sflendian.o
 
 ifeq "$(ADD_LUA)" "Y"
 LUAOBJ = $(O)nhlua.o    $(O)nhlsel.o
+LUA_QTEXT_FILE = "quest.lua"
 endif
 
 DLBOBJ = $(O)dlb.o
@@ -751,7 +752,10 @@ install: initialchk $(O)utility.tag $(GAMEDIR)/NetHack.exe $(NETHACKW_EXE) \
        @echo Done.
 
 $(O)install.tag:  $(DAT)/data    $(DAT)/rumors $(DAT)/oracles \
-               $(DAT)/quest.dat $(O)sp_lev.tag $(DLB)
+ifndef LUA_QTEXT_FILE
+               $(DAT)/quest.dat \
+endif
+               $(O)sp_lev.tag $(DLB)
 ifdef TRAVIS_COMPILER
        ls -l $(SRC)
        ls -l $(DAT)
@@ -921,8 +925,10 @@ $(DAT)/data: $(O)utility.tag    $(DATABASE)
 $(DAT)/rumors: $(O)utility.tag    $(DAT)/rumors.tru   $(DAT)/rumors.fal
        $(subst /,\,$(U)makedefs -r)
 
+ifndef LUA_QTEXT_FILE
 $(DAT)/quest.dat: $(O)utility.tag  $(DAT)/quest.txt
        $(subst /,\,$(U)makedefs -q)
+endif
 
 $(DAT)/oracles: $(O)utility.tag    $(DAT)/oracles.txt
        $(subst /,\,$(U)makedefs -h)
@@ -1029,17 +1035,22 @@ $(DAT)/porthelp: $(MSWSYS)/porthelp
        $(subst /,\,@copy $(MSWSYS)/porthelp $@ >nul)
 
 nhdat$(NHV):  $(U)dlb_main.exe $(DAT)/data $(DAT)/oracles $(OPTIONS_FILE) \
-        $(DAT)/quest.dat $(DAT)/rumors $(DAT)/help $(DAT)/hh $(DAT)/cmdhelp $(DAT)/keyhelp \
-        $(DAT)/history $(DAT)/opthelp $(DAT)/wizhelp \
-        $(DAT)/porthelp $(DAT)/license $(DAT)/engrave \
-        $(DAT)/epitaph $(DAT)/bogusmon $(DAT)/tribute $(O)sp_lev.tag
+ifndef LUA_QTEXT_FILE
+       $(DAT)/quest.dat \
+endif
+       $(DAT)/rumors $(DAT)/help $(DAT)/hh $(DAT)/cmdhelp $(DAT)/keyhelp \
+       $(DAT)/history $(DAT)/opthelp $(DAT)/wizhelp \
+       $(DAT)/porthelp $(DAT)/license $(DAT)/engrave \
+       $(DAT)/epitaph $(DAT)/bogusmon $(DAT)/tribute $(O)sp_lev.tag
        $(subst /,\,echo data >$(DAT)/dlb.lst)
        $(subst /,\,echo oracles >>$(DAT)/dlb.lst)
        $(subst /,\,if exist $(DAT)/options echo options >>$(DAT)/dlb.lst)
        $(subst /,\,if exist $(DAT)/ttyoptions echo ttyoptions >>$(DAT)/dlb.lst)
        $(subst /,\,if exist $(DAT)/guioptions echo guioptions >>$(DAT)/dlb.lst)
        $(subst /,\,if exist $(DAT)/porthelp echo porthelp >>$(DAT)/dlb.lst)
+ifndef LUA_QTEXT_FILE
        $(subst /,\,echo quest.dat >>$(DAT)/dlb.lst)
+endif
        $(subst /,\,echo rumors >>$(DAT)/dlb.lst)
        $(subst /,\,echo help >>$(DAT)/dlb.lst)
        $(subst /,\,echo hh >>$(DAT)/dlb.lst)
@@ -1201,7 +1212,9 @@ ifneq "$(W_DAT)" ""
        if exist $(W_DAT)\bogusmon         del $(W_DAT)\bogusmon
        if exist $(W_DAT)\oracles          del $(W_DAT)\oracles
        if exist $(W_DAT)\rumors           del $(W_DAT)\rumors
+ifndef LUA_QTEXT_FILE
        if exist $(W_DAT)\quest.dat        del $(W_DAT)\quest.dat
+endif
 ifdef OBSOLETE_DGN_COMPILER
        if exist $(W_DAT)\dungeon          del $(W_DAT)\dungeon
        if exist $(W_DAT)\dungeon.pdf      del $(W_DAT)\dungeon.pdf
index 8455cd075720c53b12faa13dccfb6e48589323e7..33ae60bace9229ae8727051308e1e24f1ef5cc08 100644 (file)
@@ -313,6 +313,7 @@ VOBJ28 = $(O)sfbase.o   $(O)sfdata.o
 VOBJ29 = $(O)sfstruct.o $(O)sfascii.o  $(O)sflendian.o
 
 LUAOBJ = $(O)nhlua.o    $(O)nhlsel.o
+LUA_QTEXT_FILE = "quest.lua"
 
 DLBOBJ = $(O)dlb.o
 
@@ -995,7 +996,10 @@ $(GAMEDIR)\nhraykey.dll : $(O)$(@B).o $(O)gamedir.tag $(O)$(@B).def
                /IMPLIB:$(O)$(@B).lib -out:$@ $(O)$(@B).o
 
 $(O)install.tag:       $(DAT)\data     $(DAT)\rumors   $(DAT)\oracles \
-               $(DAT)\quest.dat $(O)sp_lev.tag $(DLB)
+! IFNDEF LUA_QTEXT_FILE
+               $(DAT)\quest.dat \
+! ENDIF
+               $(O)sp_lev.tag $(DLB)
 ! IF ("$(USE_DLB)"=="Y")
        copy nhdat$(NHV)          $(GAMEDIR)
        copy $(DAT)\license       $(GAMEDIR)
@@ -1309,7 +1313,12 @@ $(DAT)\porthelp: $(MSWSYS)\porthelp
        @copy $(MSWSYS)\porthelp $@ >nul
 
 nhdat$(NHV):   $(U)dlb_main.exe $(DAT)\data $(DAT)\oracles $(OPTIONS_FILE) \
-       $(DAT)\quest.dat $(DAT)\rumors $(DAT)\help $(DAT)\hh $(DAT)\cmdhelp $(DAT)\keyhelp \
+!IFNDEF LUA_QTEXT_FILE
+       $(DAT)\quest.dat \
+!ELSE
+        $(DAT)\quest.lua \
+!ENDIF
+       $(DAT)\rumors $(DAT)\help $(DAT)\hh $(DAT)\cmdhelp $(DAT)\keyhelp \
        $(DAT)\history $(DAT)\opthelp $(DAT)\wizhelp $(DAT)\porthelp \
        $(DAT)\license $(DAT)\engrave $(DAT)\epitaph $(DAT)\bogusmon $(DAT)\tribute $(O)sp_lev.tag
        cd $(DAT)
@@ -1319,7 +1328,9 @@ nhdat$(NHV):      $(U)dlb_main.exe $(DAT)\data $(DAT)\oracles $(OPTIONS_FILE) \
        if exist ttyoptions echo ttyoptions >>dlb.lst
        if exist guioptions echo guioptions >>dlb.lst
        if exist porthelp echo porthelp >>dlb.lst
+!IFNDEF LUA_QTEXT_FILE
        echo quest.dat >>dlb.lst
+!ENDIF
        echo rumors >>dlb.lst
        echo help >>dlb.lst
        echo hh >>dlb.lst
@@ -1552,7 +1563,9 @@ spotless: clean
 !ENDIF
        if exist $(DAT)\oracles          del $(DAT)\oracles
        if exist $(DAT)\rumors           del $(DAT)\rumors
+!IFNDEF LUA_QTEXT_FILE
        if exist $(DAT)\quest.dat        del $(DAT)\quest.dat
+!ENDIF
        if exist $(DAT)\options          del $(DAT)\options
        if exist $(DAT)\ttyoptions       del $(DAT)\ttyoptions
        if exist $(DAT)\guioptions       del $(DAT)\guioptions
@@ -1661,8 +1674,10 @@ $(DAT)\data: $(O)utility.tag    $(DATABASE)
 $(DAT)\rumors: $(O)utility.tag    $(DAT)\rumors.tru   $(DAT)\rumors.fal
        $(U)makedefs -r
 
+!IFNDEF LUA_QTEXT_FILE
 $(DAT)\quest.dat: $(O)utility.tag  $(DAT)\quest.txt
        $(U)makedefs -q
+!ENDIF
 
 $(DAT)\oracles: $(O)utility.tag    $(DAT)\oracles.txt
        $(U)makedefs -h