OSDN Git Service

upgrade to 3.6.1
[jnethack/source.git] / win / win32 / dgnstuff.mak
index 9196c5c..2339a8a 100644 (file)
@@ -1,4 +1,6 @@
-# $NHDT-Date$  $NHDT-Branch$:$NHDT-Revision$
+# $NHDT-Date: 1524689255 2018/04/25 20:47:35 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.12 $
+# Copyright (c) 2018 by Michael Allison
+# NetHack may be freely redistributed.  See license for details.
 
 # Set all of these or none of them.
 #
@@ -41,11 +43,30 @@ tools:
 # Dungeon Compiler Stuff
 #==========================================
 
-..\util\dgn_yacc.c ..\include\dgn_comp.h : ..\util\dgn_comp.y
+..\include\dgn_comp.h : ..\util\dgn_comp.y
 !IF "$(YACC)"==""
-          @echo Using pre-built dgn_yacc.c and dgn_comp.h
-          @copy ..\sys\share\dgn_yacc.c ..\util\dgn_yacc.c
-          @copy ..\sys\share\dgn_comp.h ..\include\dgn_comp.h
+          @echo Using pre-built dgn_comp.h
+          chdir ..\include
+          copy /y ..\sys\share\dgn_comp.h
+          copy /b dgn_comp.h+,,
+          chdir ..\src
+!ELSE
+          chdir ..\util
+          $(YACC) -d dgn_comp.y
+          copy $(YTABC) $@
+          copy $(YTABH) ..\include\dgn_comp.h
+          @del $(YTABC)
+          @del $(YTABH)
+          chdir ..\build
+!ENDIF
+
+..\util\dgn_yacc.c : ..\util\dgn_comp.y
+!IF "$(YACC)"==""
+          @echo Using pre-built dgn_yacc.c
+          chdir ..\util
+          copy /y ..\sys\share\dgn_yacc.c
+          copy /b dgn_yacc.c+,,
+          chdir ..\src
 !ELSE
           chdir ..\util
           $(YACC) -d dgn_comp.y
@@ -59,7 +80,10 @@ tools:
 ..\util\dgn_lex.c: ..\util\dgn_comp.l
 !IF "$(LEX)"==""
           @echo Using pre-built dgn_lex.c
-          @copy ..\sys\share\dgn_lex.c $@
+          chdir ..\util
+          copy /y ..\sys\share\dgn_lex.c
+          copy /b dgn_lex.c+,,
+          chdir ..\src
 !ELSE
           chdir ..\util
           $(LEX) dgn_comp.l