do the Makefile checking using make itself
This commit is contained in:
@@ -1,57 +0,0 @@
|
||||
# NetHack 3.7 general-pre.370 $NHDT-Date: 1599687610 2020/09/09 21:40:10 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.11 $
|
||||
|
||||
ifdef MAKEFILE_TOP
|
||||
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
|
||||
mkfile_dir := $(dir $(mkfile_path))
|
||||
SUPATH :=$(mkfile_dir)sys/unix/
|
||||
#$(info $(.VARIABLES))
|
||||
ifeq ($(MAKELEVEL),0)
|
||||
notified=No
|
||||
touchquiet=
|
||||
# Check the placed Makefiles against the time stamp
|
||||
# of their source in sys/unix, and report if appropriate.
|
||||
MFCHECKDAT := $(shell [ $(SUPATH)Makefile.dat -nt $(mkfile_dir)dat/Makefile ] \
|
||||
&& echo "outdated")
|
||||
MFCHECKSRC := $(shell [ $(SUPATH)Makefile.src -nt $(mkfile_dir)src/Makefile ] \
|
||||
&& echo "outdated")
|
||||
MFCHECKUTL := $(shell [ $(SUPATH)Makefile.utl -nt $(mkfile_dir)util/Makefile ] \
|
||||
&& echo "outdated")
|
||||
MFCHECKDOC := $(shell [ $(SUPATH)Makefile.doc -nt $(mkfile_dir)doc/Makefile ] \
|
||||
&& echo "outdated")
|
||||
MFCHECKTOP := $(shell [ $(SUPATH)Makefile.top -nt $(mkfile_dir)Makefile ] \
|
||||
&& echo "outdated")
|
||||
ifeq ($(MFCHECKDAT),outdated)
|
||||
$(info Attention: ../sys/unix/Makefile.dat is newer than dat/Makefile)
|
||||
notified=Yes
|
||||
touchquiet += dat/Makefile
|
||||
endif
|
||||
ifeq ($(MFCHECKSRC),outdated)
|
||||
$(info Attention: ../sys/unix/Makefile.src is newer than src/Makefile)
|
||||
notified=Yes
|
||||
touchquiet += src/Makefile
|
||||
endif
|
||||
ifeq ($(MFCHECKUTL),outdated)
|
||||
$(info Attention: ../sys/unix/Makefile.utl is newer than util/Makefile)
|
||||
notified=Yes
|
||||
touchquiet += util/Makefile
|
||||
endif
|
||||
ifeq ($(MFCHECKDOC),outdated)
|
||||
$(info Attention: ../sys/unix/Makefile.doc is newer than doc/Makefile)
|
||||
notified=Yes
|
||||
touchquiet += doc/Makefile
|
||||
endif
|
||||
ifeq ($(MFCHECKTOP),outdated)
|
||||
$(info Attention: ../sys/unix/Makefile.top is newer than Makefile)
|
||||
notified=Yes
|
||||
touchquiet += Makefile
|
||||
endif
|
||||
ifeq ("$(notified)","Yes")
|
||||
$(info You should consider re-executing sys/unix/setup.sh)
|
||||
ifneq ("$(touchquiet)","")
|
||||
$(info or to quiet this message: 'touch $(touchquiet)')
|
||||
endif
|
||||
$(info )
|
||||
endif # notified
|
||||
endif # MAKELEVEL = 0
|
||||
endif # MAKEFILE_TOP
|
||||
# --- end of general-post.370
|
||||
@@ -17,11 +17,10 @@
|
||||
# as Ubuntu focal).
|
||||
|
||||
# note: '#-INCLUDE' is not just a comment
|
||||
#
|
||||
#-INCLUDE general-pre.370
|
||||
# multiw-1.370 contains sections 1 to 2
|
||||
#-INCLUDE multiw-1.370
|
||||
|
||||
PRECHECK+=checkmakefiles
|
||||
|
||||
ifndef LIBXPM
|
||||
LIBXPM= -L/opt/X11/lib -lXpm
|
||||
@@ -360,6 +359,10 @@ GAMEPERM = 0755
|
||||
#-INCLUDE multisnd-post.370
|
||||
#
|
||||
|
||||
.PHONY: checkmakefiles
|
||||
checkmakefiles:
|
||||
( $(MAKE) -f sys/unix/Makefile.check )
|
||||
|
||||
ifdef WANT_LIBNH
|
||||
$(TARGETPFX)libnh.a: $(HOBJ) $(LIBNHSYSOBJ) ../lib/lua/liblua.a
|
||||
$(AR) rcs $@ $(HOBJ) $(LIBNHSYSOBJ) ../lib/lua/liblua.a
|
||||
|
||||
@@ -18,10 +18,11 @@
|
||||
#
|
||||
|
||||
# note: '#-INCLUDE' is not just a comment; multiw-1 contains sections 1 to 2
|
||||
#-INCLUDE general-pre.370
|
||||
#
|
||||
#-INCLUDE multiw-1.370
|
||||
|
||||
|
||||
PRECHECK+=checkmakefiles
|
||||
|
||||
ifneq "$(USEMACPORTS)" "1"
|
||||
HAVE_HOMEBREW := $(shell expr `which -s brew; echo $$?` = 0)
|
||||
endif
|
||||
@@ -487,6 +488,11 @@ endif # MAKEFILE_SRC
|
||||
#-INCLUDE multisnd-post.370
|
||||
#
|
||||
|
||||
.PHONY: checkmakefiles
|
||||
checkmakefiles: checkstamp
|
||||
( $(MAKE) -f sys/unix/Makefile.check )
|
||||
|
||||
|
||||
ifdef WANT_LIBNH
|
||||
$(TARGETPFX)libnh.a: $(HOBJ) $(LIBNHSYSOBJ) ../lib/lua/liblua.a
|
||||
$(AR) rcs $@ $(HOBJ) $(LIBNHSYSOBJ) ../lib/lua/liblua.a
|
||||
|
||||
Reference in New Issue
Block a user