vms update (trunk only)

I hadn't tried the build script vmsbuild.com in a long time....
vmsbuild.com wasn't compiling src/sys.c;
vmsbuild.com and Makefile.src+Makefile.utl had some linking discrepancies;
Makefile.top, Makefile.dat, Makefile.doc - replace old SCCS id/date/rev
  comment with current cvs one (done for .src & .utl a month or so back);
config1.h - running DEC C in VAX C compatability mode to test linking
  yielded a diagnostic about signed in the schar typedef for every file.
This commit is contained in:
nethack.rankin
2011-05-23 03:27:10 +00:00
parent 5544dac753
commit 3453bf9a4d
7 changed files with 88 additions and 56 deletions

View File

@@ -1,5 +1,4 @@
/* NetHack 3.5 config1.h $Date$ $Revision$ */
/* SCCS Id: @(#)config1.h 3.5 1999/12/05 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -157,15 +156,18 @@
# define _DECC_V4_SOURCE /* avoid some incompatible V5.x changes */
# endif
# undef __HIDE_FORBIDDEN_NAMES /* need non-ANSI library support functions */
# ifdef VAXC /* DEC C in VAX C compatability mode; 'signed' works */
# define signed /* but causes diagnostic about VAX C not supporting it */
# endif
# else
# ifdef VAXC /* must use CC/DEFINE=ANCIENT_VAXC for vaxc v2.2 or older */
# define signed
# ifdef ANCIENT_VAXC /* vaxc v2.2 and earlier [lots of warnings to come] */
# define KR1ED /* simulate defined() */
# define USE_VARARGS
# else /* vaxc v2.3,2.4,or 3.x, or decc in vaxc mode */
# if defined(USE_PROTOTYPES) /* this breaks 2.2 (*forces* use of ANCIENT)*/
# define __STDC__ 0 /* vaxc is not yet ANSI compliant, but close enough */
# define signed /* well, almost close enough */
#include <stddef.h>
# define UNWIDENED_PROTOTYPES
# endif

View File

@@ -1,5 +1,5 @@
# NetHack Makefile (VMS) - data files: special levels and other data.
# SCCS Id: @(#)Makefile.dat 3.5 2002/03/02
# NetHack 3.5 Makefile.dat $Date$ $Revision$
# Copy this file to [.dat]Makefile.; no editing needed.

View File

@@ -1,5 +1,5 @@
# NetHack Makefile (VMS) - for the [Unix] documentation.
# SCCS Id: @(#)Makefile.doc 3.5 2007/05/25
# NetHack 3.5 Makefile.doc $Date$ $Revision$
# Copy this file to [.doc]Makefile. and edit it if needed.
@@ -17,7 +17,7 @@ Guidebook : $(GUIDEBOOK)
# the basic guidebook
#Guidebook. : Guidebook.mn
# #tbl tmac.n Guidebook.mn | nroff | col > Guidebook
# #tbl tmac.n Guidebook.mn | nroff | col -bx > Guidebook
# write sys$output "Guidebook.mn cannot be processed under VMS."
Guidebook. : Guidebook.txt # distributed version of plain text
copy Guidebook.txt Guidebook.

View File

@@ -40,17 +40,24 @@ CFLAGS = /Prefix=All/Incl=$(INC)/noList # DECC in native mode
LFLAGS = /noMap
LINK = link
LIBS = # blank for DECC
#LIBS = sys$share:vaxcrtl.exe/Shareable # VAX C or GNU C
# DEC C (decc$shr linked by default)
LIBS =
MORELIBS =
# GCC needs an extra library
# VAX C or GNU C, using shareable image run-time library
# (leave MORELIBS blank for VAX C)
#LIBS = sys$share:vaxcrtl.exe/Shareable
#MORELIBS = gnu_cc:[000000]gcclib.olb/Library
# VAX C or GNU C, using object library run-time library
# (leave LIBS blank for VAX C)
#LIBS = gnu_cc:[000000]gcclib.olb/Library
#MORELIBS = sys$library:vaxcrtl.olb/Library
# Specific VMS object files
SYSSRC = $(VMS)vmsmain.c,$(VMS)vmstty.c,$(VMS)vmsunix.c,\
$(VMS)vmsmisc.c,$(VMS)vmsfiles.c,$(VMS)vmsmail.c
SYSOBJ = vmsmain.obj,vmstty.obj,vmsunix.obj,vmsmail.obj #,vmsmisc.obj,vmsfiles.obj
LIBOPT = $(SRC)crtl.opt;
ID_OPT = $(SRC)ident.opt;
# termcap library
TERMCAPSRC = tclib.c
@@ -171,9 +178,9 @@ nethack : $(GAME)
$(GAME) : $(SYSTEM)
@ $(NOOP)
$(SYSTEM) : $(LIBOPT) $(HOBJ) nethack.opt
$(SYSTEM) : $(LIBOPT) $(ID_OPT) $(HOBJ) nethack.opt
@ $(ECHO) "Linking ..."
$(LINK)/Exe=$(GAME) $(LFLAGS) nethack.opt/Opt,$(LIBOPT)/Opt
$(LINK)/Exe=$(GAME) $(LFLAGS) nethack.opt/Opt,$(LIBOPT)/Opt,$(ID_OPT)/Opt
$(TOUCH) $(SYSTEM)
all : $(GAME)
@@ -194,7 +201,6 @@ nethack.opt : $(MAKEFILE) # this file
@ write f f$edit("$(HOBJ5)","COLLAPSE")
@ write f f$edit("$(HOBJ6)","COLLAPSE")
@ write f "iosegment=128"
write f "identification=$(VERSION)"
close f
# linker options file for run-time libraries, also used by $(UTL)Makefile
@@ -208,6 +214,16 @@ $(LIBOPT) : $(MAKEFILE) # this file
crtl.opt : $(LIBOPT)
@ $(NOOP)
# linker options file for version number, also used by $(UTL)Makefile
$(ID_OPT) : $(MAKEFILE) # this file
open/Write f $(ID_OPT)
write f "! ident.opt"
write f "identification=""$(VERSION)"""
close f
# simplified target name, for interactive convenience
ident.opt : $(ID_OPT)
@ $(NOOP)
# dependencies for makedefs and its outputs, which the util
# Makefile is responsible for keeping up to date
#
@@ -226,7 +242,8 @@ $(MAKEDEFS) : $(FIRSTOBJ) $(UTL)makedefs.c \
$(CONFIG_H) $(INC)permonst.h $(INC)objclass.h \
$(INC)monsym.h $(INC)artilist.h $(INC)dungeon.h \
$(INC)obj.h $(INC)monst.h $(INC)you.h $(INC)flag.h \
$(INC)dlb.h $(INC)patchlevel.h $(INC)qtext.h $(LIBOPT)
$(INC)dlb.h $(INC)patchlevel.h $(INC)qtext.h \
$(LIBOPT) $(ID_OPT)
$(CD) $(UTL)
$(MAKE)$(MAKEFLAGS) $(MAKEDEFS)
@ $(CD) $(SRC)
@@ -270,22 +287,23 @@ $(INC)date.h : $(VERSOURCES) $(HACK_H)
# special targets
clean :
- if f$search("*.*;-1") .nes."" then purge
- if f$search("$(INC)*.*;-1").nes."" then purge $(INC) /Exclude=*conf*.h
- if f$search("*.obj") .nes."" then delete *.obj;
- if f$search("*.h-t").nes."" then delete *.h-t; !$(HACK_H),$(CONFIG_H)
- if f$search("*.opt").nes."" then delete *.opt; !nethack.opt,$(LIBOPT)
- if f$search("*.*;-2").nes."" then purge/Keep=2
- if f$search("$(INC)*.*;-2").nes."" then purge/Keep=2 $(INC) /Exclude=*conf*.h
- if f$search("*.obj").nes."" then delete *.obj;*
- if f$search("*.h-t").nes."" then delete *.h-t;* !$(HACK_H),$(CONFIG_H)
spotless : clean
- if f$search("$(LIBOPT)").nes."" then delete $(LIBOPT)
- if f$search("*.*;-1).nes."" then purge
- if f$search("$(INC)*.*;-1").nes."" then purge $(INC)
- if f$search("$(SYSTEM)").nes."" then delete $(SYSTEM)
- if f$search("$(GAME)") .nes."" then delete $(GAME)
- if f$search("$(GAME)").nes."" then delete $(GAME)
- delete monstr.c;,vis_tab.c;,$(INC)vis_tab.h;,\
$(INC)pm.h;,$(INC)onames.h;,$(INC)date.h;
- if f$search("tile.c") .nes."" then delete tile.c;
- if f$search("tclib.c") .nes."" then delete tclib.c;
- if f$search("random.c") .nes."" then delete random.c;
- if f$search("tile.c").nes."" then delete tile.c;
- if f$search("tclib.c").nes."" then delete tclib.c;
- if f$search("random.c").nes."" then delete random.c;
- if f$search("nethack.olb").nes."" then delete nethack.olb;
- if f$search("*.opt").nes."" then delete *.opt; !nethack.opt,$(LIBOPT),$(ID_OPT)
# dependencies (mostly cloned from sys/unix/Makefile.src)
# config.h timestamp

View File

@@ -1,5 +1,5 @@
# NetHack Makefile (VMS) - top level for making & installing everything.
# SCCS Id: @(#)Makefile.top 3.5 2003/05/19
# NetHack 3.5 Makefile.top $Date$ $Revision$
# Copy this file to <top>Makefile.; edit the appropriate values for
# GAMEDIR ("playground" location) and GAMEOWNER (UIC or identifier

View File

@@ -39,7 +39,7 @@ MARKER = $(UTL)util.timestamp;
CFLAGS = /Prefix=All/Incl=$(INC)/noList # DECC in native mode
#CFLAGS = /Include=$(INC)/noList # VAXC or GNUC
LFLAGS = /noMap
LIBS = $(SRC)crtl.opt/Options # run-time library(s) needed
LIBS = $(SRC)crtl.opt/Options,$(SRC)ident.opt/Options # run-time library
LINK = link
# If you don't have yacc, byacc, or bison or just don't want to run any of
@@ -76,8 +76,9 @@ LEXOUT = lexyy # flex
# Nothing below this line should have to be changed.
# linker options file
# linker options files
LIBOPT = $(SRC)crtl.opt;
ID_OPT = $(SRC)ident.opt;
# timestamps for primary header files, matching src/Makefile
CONFIG_H = $(SRC)config.h-t
@@ -149,9 +150,14 @@ $(LIBOPT) : $(SRC)Makefile.; # linker options file
$(MAKE)$(MAKEFLAGS) $(LIBOPT)
@ $(CD) $(UTL)
$(ID_OPT) : $(SRC)Makefile.; # linker options file
$(CD) $(SRC)
$(MAKE)$(MAKEFLAGS) $(ID_OPT)
@ $(CD) $(UTL)
# dependencies for makedefs
#
$(MAKEDEFS) : $(MAKEOBJS) $(VMSOBJS) $(LIBOPT)
$(MAKEDEFS) : $(MAKEOBJS) $(VMSOBJS) $(LIBOPT) $(ID_OPT)
$(LINK) $(LFLAGS) $(MAKEOBJS),$(VMSOBJS),$(LIBS)
@ $(TOUCH) $(MARKER)
@@ -181,7 +187,7 @@ $(INC)date.h : $(MAKEDEFS)
# dependencies for lev_comp
#
$(LEVCOMP) : $(SPLEVOBJS) $(VMSOBJS) # $(LIBOPT)
$(LEVCOMP) : $(SPLEVOBJS) $(VMSOBJS) $(LIBOPT) $(ID_OPT)
$(LINK)/Exe=$(LEVCOMP) $(LFLAGS) $(SPLEVOBJS),$(VMSOBJS),$(LIBS)
lev_yacc.obj : $(HACK_H) $(INC)sp_lev.h lev_yacc.c
@@ -214,7 +220,7 @@ lev_lex.c : lev_comp.l
# dependencies for dgn_comp
#
$(DGNCOMP) : $(DGNCOMPOBJS) $(VMSOBJS) # $(LIBOPT)
$(DGNCOMP) : $(DGNCOMPOBJS) $(VMSOBJS) $(LIBOPT) $(ID_OPT)
$(LINK)/Exe=$(DGNCOMP) $(LFLAGS) $(DGNCOMPOBJS),$(VMSOBJS),$(LIBS)
dgn_yacc.obj : $(CONFIG_H) $(INC)dgn_file.h $(INC)date.h dgn_yacc.c
@@ -245,14 +251,14 @@ dgn_lex.c : dgn_comp.l
# dependencies for recover
#
$(RECOVER) : $(RECOVOBJS) $(VMSOBJS) # $(LIBOPT)
$(RECOVER) : $(RECOVOBJS) $(VMSOBJS) $(LIBOPT) $(ID_OPT)
$(LINK) $(LFLAGS) $(RECOVOBJS),$(VMSOBJS),$(LIBS)
recover.obj : $(CONFIG_H) recover.c
# dependencies for dlb
#
$(DLB) : $(DLBOBJS) $(VMSOBJS) # $(LIBOPT)
$(DLB) : $(DLBOBJS) $(VMSOBJS) $(LIBOPT) $(ID_OPT)
$(LINK)/Exe=$(DLB) $(LFLAGS) $(DLBOBJS),$(VMSOBJS),$(LIBS)
dlb_main.obj : $(CONFIG_H) $(INC)dlb.h dlb_main.c
@@ -271,13 +277,13 @@ PPMWRITERS = ppmwrite.obj,panic.obj,$(SRC)alloc.obj
tileutils : $(TILEUTILS)
@ $(NOOP)
$(GIF2TXT) : $(GIFREADERS) $(TEXTIO)
$(GIF2TXT) : $(GIFREADERS) $(TEXTIO) $(LIBOPT) $(ID_OPT)
$(LINK)/Exe=$(GIF2TXT) $(LFLAGS) $(GIFREADERS),$(TEXTIO),$(LIBS)
$(TXT2PPM) : $(PPMWRITERS) $(TEXTIO)
$(TXT2PPM) : $(PPMWRITERS) $(TEXTIO) $(LIBOPT) $(ID_OPT)
$(LINK)/Exe=$(TXT2PPM) $(LFLAGS) $(PPMWRITERS),$(TEXTIO),$(LIBS)
$(TILE2X11) : tile2x11.obj $(TEXTIO)
$(TILE2X11) : tile2x11.obj $(TEXTIO) $(LIBOPT) $(ID_OPT)
$(LINK) $(LFLAGS) tile2x11.obj,$(TEXTIO),$(LIBS)
$(TILEMAP) : tilemap.obj $(SRC)vmsmisc.obj
$(TILEMAP) : tilemap.obj $(SRC)vmsmisc.obj $(LIBOPT) $(ID_OPT)
$(LINK) $(LFLAGS) tilemap.obj,$(SRC)vmsmisc.obj,$(LIBS)
$(SRC)tile.c : $(TILEMAP)

View File

@@ -146,33 +146,37 @@ $ g := 'f$extract(0,1,cc)'
$ if g.eqs."$" then g := 'f$extract(1,1,cc)' !"foreign" gcc
$ if f$edit(f$extract(1,1,cc),"UPCASE").eqs."E" then g := X !GEMC
$ if g.nes."G" .and. c_opt.ne.o_GNUC then gnulib = ""
$ if g.eqs."G" .or. c_opt.eq.o_GNUC then gnulib = "," + gnulib
$ ! linker setup; if a symbol for "LINK" is defined, we'll use it
$ if f$type(link).nes."STRING" then link = "LINK/NOMAP"
$ if p4.nes."" then link = link + p4 !append optional user preferences
$ if c_opt.eq.o_DECC .or. l_opt.eq.10
$ then
$ crtl = "" !sys$share:decc$shr.exe/Sharable found automatically
$ if f$trnlnm("F").nes."" then close/noLog f
$ create crtl.opt !empty
$ open/Append f crtl.opt
$ write f "! crtl.opt"
$ if c_opt.eq.o_DECC .or. l_opt.eq.20
$ then $! l_opt=="none", leave crtl.opt empty (shs$share:decc$shr.exe/Share)
$ else
$ crtl = ",sys$library:vaxcrtl.olb/Library" !object library
$ if l_opt.ne.0 then goto crtl_ok
$ crtl = ",sys$disk:[-.src]crtl.opt/Options" !shareable image
$ if f$search("crtl.opt").nes."" then goto crtl_ok !assume its right
$ create sys$disk:[-.src]crtl.opt
sys$share:vaxcrtl.exe/Shareable
$ ! gnulib order: vaxcrtl.exe+gcclib.olb vs gcclib.olb+vaxcrtl.olb
$ if l_opt.eq.0 then write f "sys$share:vaxcrtl.exe/Shareable"
$ if gnulib.nes."" then write f gnulib
$ if l_opt.ne.0 then write f "sys$library:vaxcrtl.olb/Library"
$ endif
$crtl_ok:
$ close f
$ if f$search("crtl.opt;-2").nes."" then purge/Keep=2/noLog crtl.opt
$ ! version ID info for linker to record in .EXE files
$ create ident.opt
$ open/Append f ident.opt
$ write f "! ident.opt"
$ write f "identification=""",version_number,""" !version"
$ close f
$ if f$search("ident.opt;-1").nes."" then purge/noLog ident.opt
$ ident_opt = ",sys$disk:[-.src]ident.opt/Options"
$ ! final setup
$ nethacklib = "[-.src]nethack.olb"
$ create nethack.opt
! nethack.opt
nethack.olb/Library/Include=(vmsmain)
iosegment=128
$ if f$search("nethack.opt;-2").nes."" then purge/Keep=2/noLog nethack.opt
$ milestone = "write sys$output f$fao("" !5%T "",0),"
$ if c_opt.eq.o_LINK then goto link !"LINK" requested, skip compilation
$ rename := rename/New_Vers
@@ -220,11 +224,11 @@ $ if f$search("[-.util]lev_yacc.c").eqs."" then @[-.sys.vms]spec_lev.com
$!
$! create object library
$!
$ if c_opt.ne.o_SPCL .or. f$search("''nethacklib'").eqs."" then -
$ if c_opt.ne.o_SPCL .or. f$search(nethacklib).eqs."" then -
libr/Obj 'nethacklib'/Create=(Block=3000,Hist=0)
$ if f$search("''nethacklib';-1").nes."" then purge 'nethacklib'
$!
$! compile and link makedefs, then nethack, finally lev_comp & dgn_comp.
$! compile and link makedefs, then nethack, lev_comp+dgn_comp, dlb+recover.
$!
$ milestone "<compiling...>"
$ c_list = "[-.sys.vms]vmsmisc,[-.sys.vms]vmsfiles,[]alloc,dlb,monst,objects"
@@ -234,7 +238,7 @@ $ if c_opt.eq.o_SPCL then goto special !"SPECIAL" requested, skip main buil
$ set default [-.util]
$ c_list = "#makedefs"
$ gosub compile_list
$ link makedefs.obj,'nethacklib'/Lib'crtl''gnulib''ident_opt'
$ link makedefs.obj,'nethacklib'/Lib,[-.src]ident.opt/Opt,[-.src]crtl/Opt
$ milestone "makedefs"
$! create some build-time files
$ makedefs -p !pm.h
@@ -264,8 +268,8 @@ $ c_list = "hack,hacklib,invent,light,lock,mail,makemon,mapglyph,mcastu" -
$ gosub compile_list
$ c_list = "pline,polyself,potion,pray,priest,quest,questpgr,read" -
+ ",rect,region,restore,rip,rnd,role,rumors,save,shk,shknam,sit" -
+ ",sounds,sp_lev,spell,steal,steed,teleport,timeout,topten,track" -
+ ",trap,u_init"
+ ",sounds,sp_lev,spell,steal,steed,sys,teleport,timeout,topten" -
+ ",track,trap,u_init"
$ gosub compile_list
$ c_list = "uhitm,vault,vision,vis_tab,weapon,were,wield,windows" -
+ ",wizard,worm,worn,write,zap"
@@ -273,7 +277,7 @@ $ gosub compile_list
$!
$link:
$ milestone "<linking...>"
$ link/Exe=nethack.exe 'nethacklib'/Lib/Incl=(vmsmain)'crtl''gnulib''ident_opt'
$ link/Exe=nethack.exe nethack.opt/Options,ident.opt/Options,crtl.opt/Options
$ milestone "NetHack"
$ if c_opt.eq.o_LINK then goto done !"LINK" only
$special:
@@ -289,17 +293,19 @@ $ copy [-.sys.vms]lev_lex.h stdio.*/Prot=(s:rwd,o:rwd)
$ gosub compile_list
$ rename stdio.h lev_lex.*
$ link/exe=lev_comp.exe lev_main.obj,lev_yacc.obj,lev_lex.obj,-
panic.obj,'nethacklib'/Lib'crtl''gnulib''ident_opt'
panic.obj,'nethacklib'/Lib,[-.src]ident.opt/Opt,[-.src]crtl.opt/Opt
$ milestone "lev_comp"
$ link/exe=dgn_comp.exe dgn_main.obj,dgn_yacc.obj,dgn_lex.obj,-
panic.obj,'nethacklib'/Lib'crtl''gnulib''ident_opt'
panic.obj,'nethacklib'/Lib,[-.src]ident.opt/Opt,[-.src]crtl.opt/Opt
$ milestone "dgn_comp"
$!
$ c_list = "#dlb_main,#recover"
$ gosub compile_list
$ link/exe=dlb.exe dlb_main.obj,panic.obj,'nethacklib'/Lib'crtl''gnulib''ident_opt'
$ link/exe=dlb.exe dlb_main.obj,-
panic.obj,'nethacklib'/Lib,[-.src]ident.opt/Opt,[-.src]crtl.opt/Opt
$ milestone "dlb"
$ link/exe=recover.exe recover.obj,'nethacklib'/Lib'crtl''gnulib''ident_opt'
$ link/exe=recover.exe recover.obj,-
'nethacklib'/Lib,[-.src]ident.opt/Opt,[-.src]crtl.opt/Opt
$ milestone "recover"
$!
$done: