You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/05/24 02:45:44 UTC

[incubator-nuttx] branch master updated: build: Fix dependencies of kernel targets.

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/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 4896623be2 build: Fix dependencies of kernel targets.
4896623be2 is described below

commit 4896623be2adf20f5ce487138317bb9c8966b7b4
Author: Abdelatif Guettouche <ab...@espressif.com>
AuthorDate: Mon May 23 21:43:05 2022 +0200

    build: Fix dependencies of kernel targets.
    
    Targets build during the kernel phase did not have their dependencies
    specified and thus they were not rebuilt after their dependencies have
    changed, for example by changing options in menuconfig.
    
    Signed-off-by: Abdelatif Guettouche <ab...@espressif.com>
---
 libs/libc/Makefile  | 4 ++--
 libs/libnx/Makefile | 4 ++--
 mm/Makefile         | 4 ++--
 tools/LibTargets.mk | 6 +++---
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/libs/libc/Makefile b/libs/libc/Makefile
index b97ef2ac08..a94d4a97bf 100644
--- a/libs/libc/Makefile
+++ b/libs/libc/Makefile
@@ -144,8 +144,8 @@ endif
 # C library for the kernel phase of the two-pass kernel build
 
 ifneq ($(BIN),$(KBIN))
-$(KBIN):
-	$(Q) $(MAKE) $(KBIN) BIN=$(KBIN) BINDIR=kbin EXTRAFLAGS="$(EXTRAFLAGS)"
+$(KBIN): $(OBJS)
+	$(Q) $(MAKE) $(KBIN) BIN=$(KBIN) EXTRAFLAGS="$(EXTRAFLAGS)"
 endif
 
 # Context
diff --git a/libs/libnx/Makefile b/libs/libnx/Makefile
index 263c399d48..81a36263e0 100644
--- a/libs/libnx/Makefile
+++ b/libs/libnx/Makefile
@@ -214,8 +214,8 @@ $(BIN): $(OBJS)
 # NX library for the kernel phase of the two-pass kernel build
 
 ifneq ($(BIN),$(KBIN))
-$(KBIN):
-	$(Q) $(MAKE) $(KBIN) BIN=$(KBIN) BINDIR=kbin EXTRAFLAGS="$(EXTRAFLAGS)"
+$(KBIN): $(OBJS)
+	$(Q) $(MAKE) $(KBIN) BIN=$(KBIN) EXTRAFLAGS="$(EXTRAFLAGS)"
 endif
 
 # Dependencies
diff --git a/mm/Makefile b/mm/Makefile
index 323a8ed33c..c34f5e1ba6 100644
--- a/mm/Makefile
+++ b/mm/Makefile
@@ -62,8 +62,8 @@ $(BIN):	$(OBJS)
 # Memory manager for the kernel phase of the two-pass kernel build
 
 ifneq ($(BIN),$(KBIN))
-$(KBIN):
-	$(Q) $(MAKE) $(KBIN) BIN=$(KBIN) BINDIR=kbin EXTRAFLAGS="$(EXTRAFLAGS)"
+$(KBIN): $(OBJS)
+	$(Q) $(MAKE) $(KBIN) BIN=$(KBIN) EXTRAFLAGS="$(EXTRAFLAGS)"
 endif
 
 # Dependencies
diff --git a/tools/LibTargets.mk b/tools/LibTargets.mk
index 06d1f3db72..1d49e9b6f0 100644
--- a/tools/LibTargets.mk
+++ b/tools/LibTargets.mk
@@ -26,19 +26,19 @@
 # Possible kernel-mode builds
 
 libs$(DELIM)libc$(DELIM)libkc$(LIBEXT): pass2dep
-	$(Q) $(MAKE) -C libs$(DELIM)libc libkc$(LIBEXT) EXTRAFLAGS="$(KDEFINE) $(EXTRAFLAGS)"
+	$(Q) $(MAKE) -C libs$(DELIM)libc libkc$(LIBEXT) BINDIR=kbin EXTRAFLAGS="$(KDEFINE) $(EXTRAFLAGS)"
 
 staging$(DELIM)libkc$(LIBEXT): libs$(DELIM)libc$(DELIM)libkc$(LIBEXT)
 	$(Q) $(call INSTALL_LIB,$<,$@)
 
 libs$(DELIM)libnx$(DELIM)libknx$(LIBEXT): pass2dep
-	$(Q) $(MAKE) -C libs$(DELIM)libnx libknx$(LIBEXT) EXTRAFLAGS="$(KDEFINE) $(EXTRAFLAGS)"
+	$(Q) $(MAKE) -C libs$(DELIM)libnx libknx$(LIBEXT) BINDIR=kbin EXTRAFLAGS="$(KDEFINE) $(EXTRAFLAGS)"
 
 staging$(DELIM)libknx$(LIBEXT): libs$(DELIM)libnx$(DELIM)libknx$(LIBEXT)
 	$(Q) $(call INSTALL_LIB,$<,$@)
 
 mm$(DELIM)libkmm$(LIBEXT): pass2dep
-	$(Q) $(MAKE) -C mm libkmm$(LIBEXT) EXTRAFLAGS="$(KDEFINE) $(EXTRAFLAGS)"
+	$(Q) $(MAKE) -C mm libkmm$(LIBEXT) BINDIR=kbin EXTRAFLAGS="$(KDEFINE) $(EXTRAFLAGS)"
 
 staging$(DELIM)libkmm$(LIBEXT): mm$(DELIM)libkmm$(LIBEXT)
 	$(Q) $(call INSTALL_LIB,$<,$@)