]> granicus.if.org Git - nethack/commitdiff
vms build fix
authornethack.rankin <nethack.rankin>
Fri, 22 Aug 2003 09:59:15 +0000 (09:59 +0000)
committernethack.rankin <nethack.rankin>
Fri, 22 Aug 2003 09:59:15 +0000 (09:59 +0000)
     Noticed when trying out the "heck patch", where the name of the file
for the sanctum level was changed and I neglected to update my Makefile to
reflect that:  nothing was noticed if any files were missing when loading
them into a dlb container.  Populating the playground directory for the
non-dlb configuration suffered a similar problem.  Now the VMS playground
setup will issue a warning message if this happens (but not abort the
installation; perhaps it ought to do that as well...).

     Other ports have the same problem.  For example, Unix Makefile.top
relies on file globbing to build the dlb container; if a wildcard pattern
matches no files, dlb won't notice because the shell will have eaten the
offending pattern.  Likewise for its non-dlb configuration, where cp won't
notice.  However, this isn't a very interesting bug because it won't hit
when the distributed Makefiles correspond with the needed data files.

doc/fixes34.2
sys/vms/install.com

index 017c60fa5ef5df69f4e7871b0242fefff201d80e..4e7a41d502137030643194ba41b5f13d76984808 100644 (file)
@@ -160,6 +160,8 @@ linux: use random() by default instead of lrand48()
 OpenBSD: time() prototype and correct default Mail program
 Gnome: compilation problems on Solaris
 unix: better error message for .nethackrc access problems
+vms: during installation, warn if dlb file creation or non-dlb playground
+       setup is missing expected data files
 
 
 General New Features
index 7bea1498554e97c187a973028edc9e86aab94083..68fa96fdc244797ddf7a0baa7507b318e0619209 100755 (executable)
@@ -48,6 +48,8 @@ $ dgn_comp := $sys$disk:[-.util]dgn_comp
 $ dlb     := $sys$disk:[-.util]dlb
 $ milestone = "write sys$output f$fao("" !5%T "",0),"
 $ if p3.nes."" .and. f$edit(p4,"UPCASE").nes."VERBOSE" then  milestone = "!"
+$ echo = "write sys$output"
+$ warn = echo  !could be "write sys$error"
 $!
 $! make sure we've got a playground location
 $ gamedir := 'gamedir'
@@ -108,9 +110,11 @@ $dloop:
 $   g = f$element(i,",",dlb_files)
 $   if g.eqs."," then  goto ddone
 $   wild = f$locate("*",g).ne.f$locate("%",g)
+$   fcnt = 0
 $floop:
 $      f = f$search(g)
 $      if f.eqs."" then  goto fdone
+$      fcnt = fcnt + 1
 $! strip device, directory, and version from name
 $      f = f$parse(f,,,"NAME") + f$parse(f,,,"TYPE")
 $! strip trailing dot, if present, and change case
@@ -120,6 +124,7 @@ $   if f$extract(3,1,f).eqs."-" then -      !"xyz-foo.lev" -> "Xyz-foo.lev"
 $      write pfile$ f
 $      if wild then  goto floop
 $fdone:
+$   if fcnt.eq.0 then  warn "? no file(s) found for """,g,""""
 $   i = i + 1
 $   goto dloop
 $ddone:
@@ -223,7 +228,7 @@ $! done
 $      milestone "<done>"
 $ define/nolog nethackdir 'gamedir'
 $ define/nolog hackdir 'gamedir'
-$ write sys$output -
+$ echo -
     f$fao("!/ Nethack installation complete. !/ Playground is !AS !/",gamedir)
 $ exit
 $
@@ -244,14 +249,17 @@ $   g = f$element(i,",",p1)
 $   if g.eqs."," then  goto ldone
 $   g = p2 + g
 $   wild = f$locate("*",g).ne.f$locate("%",g)
+$   fcnt = 0
 $eloop:
 $      f = f$search(g)
 $      if f.eqs."" then  goto edone
+$      fcnt = fcnt + 1
 $      f = f - f$parse(f,,,"VERSION")
 $      e = f$parse(f,,,"NAME") + f$parse(f,,,"TYPE")
 $      call copy_file 'f' 'gamedir''e' "''p3'"
 $      if wild then  goto eloop
 $edone:
+$   if fcnt.eq.0 then  warn "? no file(s) found for """,g,""""
 $   i = i + 1
 $   goto lloop
 $ldone: