diff --git a/Makefile b/Makefile index f6e4a11e..ba45103e 100644 --- a/Makefile +++ b/Makefile @@ -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)) diff --git a/README.md b/README.md index 746cfa95..51b27a8b 100644 --- a/README.md +++ b/README.md @@ -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