revisit Makefile sysconf steps
Add distinct potential steps into Makefile.top for putting sysconf into place, instead of appending the steps for doing so to the generic POSTINSTALL. SYSCONFINSTALL is used for 'make install' and unconditionally copies sys/unix/sysconf to the install directory. SYSCONFENSURE is used for 'make update' and only copies sys/unix/sysconf to the installation directory if it doesn't already exist. The initial trigger for revisiting this was because of new reports that cp from (GNU coreutils) 9.4 is now issuing a warning during NetHack builds. The warning pertains to deprecated use of the '-n' switch with cp, which is used to only copy the file if the target does not exist. After this update, the shell is used to make that determination, and if the file doesn't exist, cp is now invoked on Linux without the '-n' switch. For the macOS hints file, macOS.370, cp wasn't being used for sysconf anyway, a utility script was being invoked and this doesn't change that. macOS.370 was updated to remain in sync with linux.370 and Makefile.top regarding the use of SYSCONFINSTALL and SYSCONFENSURE.
This commit is contained in:
@@ -295,6 +295,17 @@ override GAME=
|
||||
MOREALL += ( cd src ; $(MAKE) pregame ; $(MAKE) $(TARGETPFX)libnh.a )
|
||||
endif # WANT_LIBNH
|
||||
|
||||
SYSCONFCREATE = cp sys/unix/sysconf $(INSTDIR)/sysconf
|
||||
SYSCONFINSTALL = $(SYSCONFCREATE) && \
|
||||
$(CHOWN) $(GAMEUID) $(INSTDIR)/sysconf && \
|
||||
$(CHGRP) $(GAMEGRP) $(INSTDIR)/sysconf && \
|
||||
chmod $(VARFILEPERM) $(INSTDIR)/sysconf;
|
||||
SYSCONFENSURE = (if ! test -f $(INSTDIR)/sysconf ; then \
|
||||
$(SYSCONFCREATE) && \
|
||||
$(CHOWN) $(GAMEUID) $(INSTDIR)/sysconf && \
|
||||
$(CHGRP) $(GAMEGRP) $(INSTDIR)/sysconf && \
|
||||
chmod $(VARFILEPERM) $(INSTDIR)/sysconf; fi );
|
||||
|
||||
ifdef WANT_SOURCE_INSTALL
|
||||
PREFIX=$(abspath $(NHSROOT))
|
||||
#SHELLDIR=
|
||||
@@ -317,14 +328,10 @@ endif #?WANT_SOURCE_INSTALL
|
||||
INSTDIR=$(HACKDIR)
|
||||
VARDIR = $(HACKDIR)
|
||||
|
||||
POSTINSTALL+= cp -n sys/unix/sysconf $(INSTDIR)/sysconf; \
|
||||
$(CHOWN) $(GAMEUID) $(INSTDIR)/sysconf; \
|
||||
$(CHGRP) $(GAMEGRP) $(INSTDIR)/sysconf; \
|
||||
chmod $(VARFILEPERM) $(INSTDIR)/sysconf; \
|
||||
( util/makedefs --grep-defined CRASHREPORT && \
|
||||
POSTINSTALL+= ( util/makedefs --grep-defined CRASHREPORT && \
|
||||
( cp win/share/nhcrashreport.lua $(INSTDIR) ; \
|
||||
chmod 555 $(INSTDIR)/nhcrashreport.lua ; \
|
||||
cp $(LUATOP)/lua $(INSTDIR)/nhlua); true);
|
||||
cp $(LUATOP)/lua $(INSTDIR)/nhlua); true );
|
||||
|
||||
ifneq "$(CCISCLANG)" ""
|
||||
# gdb may not be installed if clang is chosen compiler so the game
|
||||
|
||||
Reference in New Issue
Block a user