diff --git a/tools/Config.mk b/tools/Config.mk index ef78ee2b7e..464d23b298 100644 --- a/tools/Config.mk +++ b/tools/Config.mk @@ -458,6 +458,15 @@ define PRELINK endef endif +# PREBUILD -- Perform pre build operations +# Some architectures require the use of special tools and special handling +# BEFORE building NuttX. The `Make.defs` files for those architectures +# should override the following define with the correct operations for +# that platform. + +define PREBUILD +endef + # POSTBUILD -- Perform post build operations # Some architectures require the use of special tools and special handling # AFTER building the NuttX binary. Make.defs files for those architectures diff --git a/tools/Unix.mk b/tools/Unix.mk index 439066b2ff..90d90263d9 100644 --- a/tools/Unix.mk +++ b/tools/Unix.mk @@ -244,7 +244,7 @@ include/nuttx/version.h: $(TOPDIR)/.version tools/mkversion$(HOSTEXEEXT) # part of the overall NuttX configuration sequence. Notice that the # tools/mkconfig tool is built and used to create include/nuttx/config.h -tools/mkconfig$(HOSTEXEEXT): +tools/mkconfig$(HOSTEXEEXT): prebuild $(Q) $(MAKE) -C tools -f Makefile.host mkconfig$(HOSTEXEEXT) include/nuttx/config.h: $(TOPDIR)/.config tools/mkconfig$(HOSTEXEEXT) @@ -486,6 +486,16 @@ clean_context: clean_dirlinks include tools/LibTargets.mk +# prebuild +# +# Some architectures require the use of special tools and special handling +# BEFORE building NuttX. The `Make.defs` files for those architectures +# should override the following define with the correct operations for +# that platform. + +prebuild: + $(call PREBUILD, $(TOPDIR)) + # pass1 and pass2 # # If the 2 pass build option is selected, then this pass1 target is diff --git a/tools/Win.mk b/tools/Win.mk index 483910339c..af8b21c7ad 100644 --- a/tools/Win.mk +++ b/tools/Win.mk @@ -231,7 +231,7 @@ include\nuttx\version.h: $(TOPDIR)\.version tools\mkversion$(HOSTEXEEXT) # part of the overall NuttX configuration sequence. Notice that the # tools\mkconfig tool is built and used to create include\nuttx\config.h -tools\mkconfig$(HOSTEXEEXT): +tools\mkconfig$(HOSTEXEEXT): prebuild $(Q) $(MAKE) -C tools -f Makefile.host mkconfig$(HOSTEXEEXT) include\nuttx\config.h: $(TOPDIR)\.config tools\mkconfig$(HOSTEXEEXT) @@ -473,6 +473,16 @@ clean_context: include tools/LibTargets.mk +# prebuild +# +# Some architectures require the use of special tools and special handling +# BEFORE building NuttX. The `Make.defs` files for those architectures +# should override the following define with the correct operations for +# that platform. + +prebuild: + $(call PREBUILD, $(TOPDIR)) + # pass1 and pass2 # # If the 2 pass build option is selected, then this pass1 target is