Add DEPEND_MAKEFILE to disable rebuild on Makefile edit

This commit is contained in:
Zack Middleton committed 2024-06-11 04:40:08 -04:00
1 parent e0ce0ceea0
commit 198c92b9f8
2 files changed
+7 -4

No files matched your search

+5 -4
View File
@@ -3,10 +3,6 @@
#
# GNU Make required
#
# Rebuild every target if Makefile changes
.EXTRA_PREREQS:= $(abspath $(lastword $(MAKEFILE_LIST)))
COMPILE_PLATFORM=$(shell uname | sed -e 's/_.*//' | tr '[:upper:]' '[:lower:]' | sed -e 's/\//_/g')
COMPILE_ARCH=$(shell uname -m | sed -e 's/i.86/x86/' | sed -e 's/^arm.*/arm/')
@@ -3210,6 +3206,11 @@ dist:
# DEPENDENCIES
#############################################################################
# Rebuild every target if Makefile or Makefile.local changes
ifneq ($(DEPEND_MAKEFILE),0)
.EXTRA_PREREQS:= $(MAKEFILE_LIST)
endif
ifneq ($(B),)
OBJ_D_FILES=$(filter %.d,$(OBJ:%.o=%.d))
TOOLSOBJ_D_FILES=$(filter %.d,$(TOOLSOBJ:%.o=%.d))
+2
View File
@@ -133,6 +133,8 @@ The following variables may be set, either on the command line or in
Makefile.local:
```
DEPEND_MAKEFILE - set to 0 to disable rebuilding all targets when
the Makefile or Makefile.local is changed
CFLAGS - use this for custom CFLAGS
V - set to show cc command line when building
DEFAULT_BASEDIR - extra path to search for baseq3 and such