1 # NetHack Makefile (VMS) - top level for making & installing everything.
2 # SCCS Id: @(#)Makefile.top 3.4 2003/05/19
4 # Copy this file to <top>Makefile.; edit the appropriate values for
5 # GAMEDIR ("playground" location) and GAMEOWNER (UIC or identifier
6 # for the owner of playground files).
8 # usage: mms all,install
9 # or mms no_tools,all,install
10 # or substitute freeware `MMK' for Digital's `MMS'.
14 ECHO = write sys$output
16 NOOP = continue # don't do anything interesting
17 TOUCH = set file/truncate # multiple files per $(TOUCH), but no creation
18 # support directories, relative to 'top'
22 TOP = [-] # relative to the others
26 GAMEDIR = # defaults to [.play]
27 GAMEOWNER = # defaults to installer's UIC
28 # these are the distributed values in [.include]vmsconf.h
29 #GAMEDIR = DISK$USERS:[GAMES.NETHACK.3-4-2.PLAY]
32 # just about everything, except installation
33 all : program utilities data dlb_data documentation
34 @ $(ECHO) "all code and data is now up to date."
38 $(MAKE)$(MAKEFLAGS) all
42 $(MAKE)$(MAKEFLAGS) all
46 $(MAKE)$(MAKEFLAGS) all
50 $(MAKE)$(MAKEFLAGS) all
53 install : program all_data make_directories create_writeable_files update
54 @ $(ECHO) "installation is now complete."
56 # assume there're no active games in progress
57 update : place_readonly_files place_executable place_vms_support
58 @ open/Write f tmp-update.com;
59 @ write f "$ set noon"
60 @ write f "$ if p1.eqs."""" then p1 = f$trnlnm(""HACKDIR"")"
61 @ write f "$ if p1.eqs."""" then p1 = ""[.play]"""
62 @ write f "$ old_default = f$environ(""DEFAULT"")"
63 @ write f "$ set default 'p1'"
65 "$ if f$search(""*.*;-2"").nes."""" then set file/prot=(s:rwed,o:rwed) *.*;-2"
67 "$ if f$search(""*.*;-1"").nes."""" then set file/prot=(s:rwed,o:rwed) *.*;-1"
68 @ write f "$ if f$search(""*.*;-1"").nes."""" then purge"
69 @ write f "$! if f$search(""bones*.*"").nes."""" then $(TOUCH) bones*.*"
70 @ write f "$! if f$search(""[.save]*"").nes."""" then $(TOUCH) [.save]*"
71 @ write f "$ set default 'old_default'"
74 - $(EXEC)tmp-update.com; $(GAMEDIR) !purge old version
75 @ delete tmp-update.com;
76 @ $(ECHO) "playground files updated."
80 $(MAKE)$(MAKEFLAGS) Guidebook
84 $(MAKE)$(MAKEFLAGS) manpages
87 all_data : data dlb_data
91 $(EXEC)$(VMS)install.com "$(GAMEDIR)" "$(GAMEOWNER)" dlb
94 $(EXEC)$(VMS)install.com "$(GAMEDIR)" "$(GAMEOWNER)" directories
96 create_writeable_files :
97 $(EXEC)$(VMS)install.com "$(GAMEDIR)" "$(GAMEOWNER)" writeable_files
99 place_readonly_files :
100 $(EXEC)$(VMS)install.com "$(GAMEDIR)" "$(GAMEOWNER)" readonly_files
103 $(EXEC)$(VMS)install.com "$(GAMEDIR)" "$(GAMEOWNER)" executable
106 $(EXEC)$(VMS)install.com "$(GAMEDIR)" "$(GAMEOWNER)" termcap
107 $(EXEC)$(VMS)install.com "$(GAMEDIR)" "$(GAMEOWNER)" procedure
108 $(EXEC)$(VMS)install.com "$(GAMEDIR)" "$(GAMEOWNER)" documentation
111 # 'make no_tools' should be done first if you don't have the appropriate
112 # tools to process the parser and scanner for the special level and
113 # dungeon compilers; doing so will copy distributed, pre-processed files
114 # from [.sys.share] to [.util]. If you _do_ have the tools, be sure to
115 # edit [.util]Makefile so that it uses the right ones.
118 $(MAKE)$(MAKEFLAGS) no_yacc
119 $(MAKE)$(MAKEFLAGS) no_lex
123 # 'make clean' removes all the .obj files, but leaves around all the executables
124 # and compiled data files.
127 - $(MAKE)$(MAKEFLAGS) clean
130 - $(MAKE)$(MAKEFLAGS) clean
133 # 'make spotless' returns the source tree to near-distribution condition.
134 # it removes .obj files, executables, and compiled data files.
137 - $(MAKE)$(MAKEFLAGS) spotless
140 - $(MAKE)$(MAKEFLAGS) spotless
143 - $(MAKE)$(MAKEFLAGS) spotless
146 - $(MAKE)$(MAKEFLAGS) spotless