sys/unix/hints/*: mkfontdir and cp -n

Change all the POSTINSTALL 'mkfontdir' to 'mkfontdir -x .lev' although
the mkfontdir version on my system didn't think $(HACKDIR)/*.lev were
font files when I built without dlb.

Also change the PREINSTALL 'cp -n win/X11/nethack.rc ~/.nethackrc' to
keep going if it fails.  The linux hints use 'cp -n' for sysconf but
since it is doing so for the playground directory and 'make install'
starts out by clearing away everything in that directory, it shouldn't
fail.  But some extra bullet proofing there may be warranted.  Only
the initial cp is protected against clobbering an existing file; the
ownership+permission fixups that are applied to the copy of original
file still get applied to an existing one.
This commit is contained in:
PatR
2019-08-20 17:16:57 -07:00
parent 8a328ff7eb
commit b7b8c7a446
10 changed files with 37 additions and 35 deletions

View File

@@ -1,11 +1,12 @@
#
# NetHack 3.6 macosx10.7 $NHDT-Date: 1546082882 2018/12/29 11:28:02 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.34 $
# NetHack 3.6 macosx10.7 $NHDT-Date: 1566346606 2019/08/21 00:16:46 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.36 $
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2009.
# NetHack may be freely redistributed. See license for details.
#
#-PRE
# Mac OS X (Darwin) hints file
# This is for Mac OS X 10.7.2. If this doesn't work for some other version
# This is for Mac OS X 10.7.
# If this doesn't work for some other version
# of Mac OS X, make a new file for that OS, don't change this one. And
# let us know about it.
# Useful info: http://www.opensource.apple.com/darwinsource/index.html
@@ -95,7 +96,7 @@ endif # !WANT_WIN_TTY
ifdef WANT_WIN_X11
WINX11LIB = -lXaw -lXmu -lXext -lXt -lX11
VARDATND = x11tiles NetHack.ad pet_mark.xbm pilemark.xbm
POSTINSTALL+= bdftopcf win/X11/nh10.bdf > $(INSTDIR)/nh10.pcf; (cd $(INSTDIR); mkfontdir);
POSTINSTALL+= bdftopcf win/X11/nh10.bdf > $(INSTDIR)/nh10.pcf; ( cd $(INSTDIR); mkfontdir -x .lev );
CFLAGS += -DX11_GRAPHICS
ifdef USE_XPM
CFLAGS += -DUSE_XPM
@@ -194,7 +195,7 @@ VARFILEPERM = 0600
VARDIRPERM = 0700
ifdef WANT_WIN_X11
# install nethack.rc as ~/.nethackrc if no ~/.nethackrc exists
PREINSTALL= cp -n win/X11/nethack.rc ~/.nethackrc
PREINSTALL= cp -n win/X11/nethack.rc ~/.nethackrc || true
endif # WANT_WIN_X11
POSTINSTALL+= sys/unix/hints/macosx.sh editsysconf sys/unix/sysconf $(INSTDIR)/sysconf; $(CHOWN) $(GAMEUID) $(INSTDIR)/sysconf; $(CHGRP) $(GAMEGRP) $(INSTDIR)/sysconf; chmod $(VARFILEPERM) $(INSTDIR)/sysconf;
CFLAGS+=-DSYSCF -DSYSCF_FILE=\"$(HACKDIR)/sysconf\" -DSECURE