This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 4595f9388fb5bf3c6028a3f88298c6840146f219
Author: xuxin19 <[email protected]>
AuthorDate: Thu Jan 4 16:58:49 2024 +0800

    tools/Unix.mk:make incdir precedence over other targets
    
    Make.defs need incdir at the very beginning.
    fix error such as `make menuconfig` `make oldconfig` etc.
    
    Signed-off-by: xuxin19 <[email protected]>
---
 tools/Unix.mk | 4 ++--
 tools/Win.mk  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/Unix.mk b/tools/Unix.mk
index 3b55b3d91e..36f8f073fc 100644
--- a/tools/Unix.mk
+++ b/tools/Unix.mk
@@ -416,7 +416,7 @@ DIRLINKS_FILE += $(DIRLINKS_EXTERNAL_DEP)
 # The symlink subfolders need to be removed before the parent symlinks
 
 .PHONY: clean_dirlinks
-clean_dirlinks:
+clean_dirlinks: tools/incdir$(HOSTEXEEXT)
        $(Q) $(call DELFILE, $(DIRLINKS_FILE))
        $(Q) $(call DELFILE, .dirlinks)
        $(Q) $(DIRUNLINK) drivers/platform
@@ -815,7 +815,7 @@ endif
 # apps_distclean: Perform the distclean operation only in the user application
 #                 directory.
 
-apps_preconfig: .dirlinks
+apps_preconfig: tools/incdir$(HOSTEXEEXT) .dirlinks
 ifneq ($(APPDIR),)
        $(Q) $(MAKE) -C $(APPDIR) preconfig
 endif
diff --git a/tools/Win.mk b/tools/Win.mk
index 87fb218261..0f3273e2ec 100644
--- a/tools/Win.mk
+++ b/tools/Win.mk
@@ -397,7 +397,7 @@ DIRLINKS_FILE += $(DIRLINKS_EXTERNAL_DEP)
 # The symlink subfolders need to be removed before the parent symlinks
 
 .PHONY: clean_dirlinks
-clean_dirlinks:
+clean_dirlinks: tools\incdir$(HOSTEXEEXT)
        $(Q) $(call DELFILE, $(DIRLINKS_FILE))
        $(Q) $(call DELFILE, .dirlinks)
        $(Q) $(DIRUNLINK) drivers\platform
@@ -731,7 +731,7 @@ endif
 # apps_distclean: Perform the distclean operation only in the user application
 #                 directory.
 
-apps_preconfig: .dirlinks
+apps_preconfig: tools\incdir$(HOSTEXEEXT) .dirlinks
 ifneq ($(APPDIR),)
        $(Q) $(MAKE) -C "$(APPDIR)" preconfig
 endif

Reply via email to