follow-up to Makefile out-of-date checking
linux.370 and macOS.370 pass the name of the hints file and the list of included files, that they use, to Makefile.check. The name of the hints file is in variable HINTSFILE, the definition of which is now inserted by setup.sh The list of hints include files is in variable HINTSINCLFILES.
This commit is contained in:
@@ -1,30 +1,37 @@
|
||||
# NetHack 3.7 Makefile.check $NHDT-Date: 1599687610 2020/09/09 21:40:10 $ $NHDT-Branch: NetHack-3.7
|
||||
|
||||
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
|
||||
mkfile_dir := $(dir $(mkfile_path))
|
||||
SUPATH := sys/unix/
|
||||
MKINCLVERS := 370
|
||||
MKHINTSPATH := $(SUPATH)hints/
|
||||
MKINCLPATH := $(SUPATH)hints/include/
|
||||
MKINCLNAMES := compiler cross-pre cross-post \
|
||||
gbdates-pre gbdates-post \
|
||||
multiw-1 multiw-2 multiw-3 \
|
||||
multisnd1-pre multisnd2-pre multisnd-post
|
||||
MKINCLFILES := $(addprefix $(MKINCLPATH), $(addsuffix .$(MKINCLVERS), $(MKINCLNAMES)))
|
||||
|
||||
allmakefiles: dat/Makefile src/Makefile util/Makefile doc/Makefile Makefile
|
||||
#
|
||||
# Expectations:
|
||||
# HINTSFILE and HINTSINCLFILES are passed from the calling Makefile
|
||||
# which is the case with the hints/*.370 and hints/include/*.370
|
||||
# set.
|
||||
#
|
||||
ifneq ("$(HINTSFILE)","")
|
||||
MKHINTSFILE := $(addprefix $(MKHINTSPATH), $(notdir $(HINTSFILE)))
|
||||
endif
|
||||
ifneq ("$(HINTSINCLFILES)","")
|
||||
MKINCLFILES := $(addprefix $(MKINCLPATH), $(HINTSINCLFILES))
|
||||
endif
|
||||
|
||||
dat/Makefile: $(SUPATH)Makefile.dat $(MKINCLFILES)
|
||||
checkmakefiles: dat/Makefile src/Makefile util/Makefile doc/Makefile Makefile
|
||||
|
||||
dat/Makefile: $(SUPATH)Makefile.dat $(MKHINTSFILE) $(MKINCLFILES)
|
||||
@echo Attention: $@ is older than: $?
|
||||
|
||||
src/Makefile: $(SUPATH)Makefile.src $(MKINCLFILES)
|
||||
src/Makefile: $(SUPATH)Makefile.src $(MKHINTSFILE) $(MKINCLFILES)
|
||||
@echo Attention: $@ is older than: $?
|
||||
|
||||
util/Makefile: $(SUPATH)Makefile.utl $(MKINCLFILES)
|
||||
util/Makefile: $(SUPATH)Makefile.utl $(MKHINTSFILE) $(MKINCLFILES)
|
||||
@echo Attention: $@ is older than: $?
|
||||
|
||||
doc/Makefile: $(SUPATH)Makefile.doc $(MKINCLFILES)
|
||||
doc/Makefile: $(SUPATH)Makefile.doc $(MKHINTSFILE) $(MKINCLFILES)
|
||||
@echo Attention: $@ is older than: $?
|
||||
|
||||
Makefile: $(SUPATH)Makefile.top $(MKINCLFILES)
|
||||
Makefile: $(SUPATH)Makefile.top $(MKHINTSFILE) $(MKINCLFILES)
|
||||
@echo Attention: $@ is older than: $?
|
||||
|
||||
|
||||
@@ -20,7 +20,21 @@
|
||||
# multiw-1.370 contains sections 1 to 2
|
||||
#-INCLUDE multiw-1.370
|
||||
|
||||
HINTSVERSION := 370
|
||||
|
||||
ifdef MAKEFILE_TOP
|
||||
ifeq ($(MAKELEVEL),0)
|
||||
PRECHECK+=checkmakefiles
|
||||
HINTSVERSION := 370
|
||||
# all files included from this hints file get listed
|
||||
# in HINTSINCLNAMES (without suffix and without a path)
|
||||
HINTSINCLNAMES := compiler cross-pre cross-post \
|
||||
gbdates-pre gbdates-post \
|
||||
multiw-1 multiw-2 multiw-3 \
|
||||
multisnd1-pre multisnd2-pre multisnd-post
|
||||
HINTSINCLFILES := $(addsuffix .$(HINTSVERSION), $(HINTSINCLNAMES))
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef LIBXPM
|
||||
LIBXPM= -L/opt/X11/lib -lXpm
|
||||
@@ -359,9 +373,14 @@ GAMEPERM = 0755
|
||||
#-INCLUDE multisnd-post.370
|
||||
#
|
||||
|
||||
ifdef MAKEFILE_TOP
|
||||
ifeq ($(MAKELEVEL),0)
|
||||
.PHONY: checkmakefiles
|
||||
checkmakefiles:
|
||||
( $(MAKE) -f sys/unix/Makefile.check )
|
||||
@$(MAKE) -f sys/unix/Makefile.check \
|
||||
HINTSFILE="$(HINTSFILE)" HINTSINCLFILES="$(HINTSINCLFILES)"
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef WANT_LIBNH
|
||||
$(TARGETPFX)libnh.a: $(HOBJ) $(LIBNHSYSOBJ) ../lib/lua/liblua.a
|
||||
|
||||
@@ -20,8 +20,21 @@
|
||||
# note: '#-INCLUDE' is not just a comment; multiw-1 contains sections 1 to 2
|
||||
#-INCLUDE multiw-1.370
|
||||
|
||||
HINTSVERSION := 370
|
||||
|
||||
ifdef MAKEFILE_TOP
|
||||
ifeq ($(MAKELEVEL),0)
|
||||
PRECHECK+=checkmakefiles
|
||||
HINTSVERSION := 370
|
||||
# all files included from this hints file get listed
|
||||
# in HINTSINCLNAMES (without suffix and without a path)
|
||||
HINTSINCLNAMES := compiler cross-pre cross-post \
|
||||
gbdates-pre gbdates-post \
|
||||
multiw-1 multiw-2 multiw-3 \
|
||||
multisnd1-pre multisnd2-pre multisnd-post
|
||||
HINTSINCLFILES := $(addsuffix .$(HINTSVERSION), $(HINTSINCLNAMES))
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq "$(USEMACPORTS)" "1"
|
||||
HAVE_HOMEBREW := $(shell expr `which -s brew; echo $$?` = 0)
|
||||
@@ -488,10 +501,14 @@ endif # MAKEFILE_SRC
|
||||
#-INCLUDE multisnd-post.370
|
||||
#
|
||||
|
||||
ifdef MAKEFILE_TOP
|
||||
ifeq ($(MAKELEVEL),0)
|
||||
.PHONY: checkmakefiles
|
||||
checkmakefiles:
|
||||
( $(MAKE) -f sys/unix/Makefile.check )
|
||||
|
||||
@$(MAKE) -f sys/unix/Makefile.check \
|
||||
HINTSFILE="$(HINTSFILE)" HINTSINCLFILES="$(HINTSINCLFILES)"
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef WANT_LIBNH
|
||||
$(TARGETPFX)libnh.a: $(HOBJ) $(LIBNHSYSOBJ) ../lib/lua/liblua.a
|
||||
|
||||
@@ -17,6 +17,8 @@ echo "# Your changes will be lost. See sys/unix/NewInstall.unx." >> $3
|
||||
echo "# Identify this file:" >> $3
|
||||
echo "MAKEFILE_$2=1" >> $3
|
||||
echo "" >> $3
|
||||
echo "HINTSFILE=$5" >> $3
|
||||
echo "" >> $3
|
||||
|
||||
echo "###" >> $3
|
||||
echo "### Start $5 PRE" >> $3
|
||||
|
||||
Reference in New Issue
Block a user