Makefile: Fix Make.dep not updated by config changes
Make.dep file should be updated by .config changed after first make. There are 2 cases affected for this problem: 1) Add source files by config symbol 2) Include header files in #ifdef directive These 2 cases may not be included in Make.dep and this may prevent the differential build from working correctly.
This commit is contained in:
parent
d560ce65ff
commit
e249a2f82f
@ -194,7 +194,7 @@ endif
|
||||
|
||||
# Dependencies
|
||||
|
||||
.depend: Makefile chip$(DELIM)Make.defs $(SRCS)
|
||||
.depend: Makefile chip$(DELIM)Make.defs $(SRCS) $(TOPDIR)$(DELIM).config
|
||||
ifeq ($(BOARDMAKE),y)
|
||||
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" depend
|
||||
endif
|
||||
|
@ -140,7 +140,7 @@ export_startup: board/libboard$(LIBEXT) $(STARTUP_OBJS)
|
||||
|
||||
# Dependencies
|
||||
|
||||
.depend: Makefile chip/Make.defs $(SRCS)
|
||||
.depend: Makefile chip/Make.defs $(SRCS) $(TOPDIR)$(DELIM).config
|
||||
ifeq ($(BOARDMAKE),y)
|
||||
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" depend
|
||||
endif
|
||||
|
@ -155,7 +155,7 @@ export_startup: board/libboard$(LIBEXT) $(STARTUP_OBJS)
|
||||
|
||||
# Dependencies
|
||||
|
||||
.depend: Makefile chip/Make.defs $(SRCS)
|
||||
.depend: Makefile chip/Make.defs $(SRCS) $(TOPDIR)$(DELIM).config
|
||||
ifeq ($(BOARDMAKE),y)
|
||||
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" depend
|
||||
endif
|
||||
|
@ -138,7 +138,7 @@ export_startup: board/libboard$(LIBEXT) $(STARTUP_OBJS)
|
||||
|
||||
# Dependencies
|
||||
|
||||
.depend: Makefile chip/Make.defs $(SRCS)
|
||||
.depend: Makefile chip/Make.defs $(SRCS) $(TOPDIR)$(DELIM).config
|
||||
ifeq ($(BOARDMAKE),y)
|
||||
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" depend
|
||||
endif
|
||||
|
@ -141,7 +141,7 @@ export_startup: board/libboard$(LIBEXT) $(STARTUP_OBJS)
|
||||
|
||||
# Dependencies
|
||||
|
||||
.depend: Makefile chip/Make.defs $(SRCS)
|
||||
.depend: Makefile chip/Make.defs $(SRCS) $(TOPDIR)$(DELIM).config
|
||||
ifeq ($(BOARDMAKE),y)
|
||||
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" depend
|
||||
endif
|
||||
|
@ -181,7 +181,7 @@ endif
|
||||
|
||||
# Dependencies
|
||||
|
||||
.depend: Makefile chip$(DELIM)Make.defs $(SRCS)
|
||||
.depend: Makefile chip$(DELIM)Make.defs $(SRCS) $(TOPDIR)$(DELIM).config
|
||||
ifeq ($(BOARDMAKE),y)
|
||||
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" depend
|
||||
endif
|
||||
|
@ -149,7 +149,7 @@ export_startup: board/libboard$(LIBEXT) $(STARTUP_OBJS)
|
||||
|
||||
# Dependencies
|
||||
|
||||
.depend: Makefile chip/Make.defs $(SRCS)
|
||||
.depend: Makefile chip/Make.defs $(SRCS) $(TOPDIR)$(DELIM).config
|
||||
ifeq ($(BOARDMAKE),y)
|
||||
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" depend
|
||||
endif
|
||||
|
@ -184,7 +184,7 @@ endif
|
||||
|
||||
# Dependencies
|
||||
|
||||
.depend: Makefile $(SRCS)
|
||||
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
|
||||
ifeq ($(BOARDMAKE),y)
|
||||
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" depend
|
||||
endif
|
||||
|
@ -321,7 +321,7 @@ export_startup: board/libboard$(LIBEXT) up_head.o $(HOSTOBJS)
|
||||
|
||||
# Dependencies
|
||||
|
||||
.depend: Makefile $(SRCS)
|
||||
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
|
||||
$(Q) if [ -e board/Makefile ]; then \
|
||||
$(MAKE) -C board TOPDIR="$(TOPDIR)" depend ; \
|
||||
fi
|
||||
|
@ -153,7 +153,7 @@ export_startup: board/libboard$(LIBEXT) $(STARTUP_OBJS)
|
||||
|
||||
# Dependencies
|
||||
|
||||
.depend: Makefile chip/Make.defs $(SRCS)
|
||||
.depend: Makefile chip/Make.defs $(SRCS) $(TOPDIR)$(DELIM).config
|
||||
ifeq ($(BOARDMAKE),y)
|
||||
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" depend
|
||||
endif
|
||||
|
@ -148,7 +148,7 @@ export_startup: board/libboard$(LIBEXT) $(STARTUP_OBJS)
|
||||
|
||||
# Dependencies
|
||||
|
||||
.depend: Makefile chip/Make.defs $(SRCS)
|
||||
.depend: Makefile chip/Make.defs $(SRCS) $(TOPDIR)$(DELIM).config
|
||||
ifeq ($(BOARDMAKE),y)
|
||||
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" depend
|
||||
endif
|
||||
|
@ -139,7 +139,7 @@ export_startup: board/libboard$(LIBEXT) $(STARTUP_OBJS)
|
||||
|
||||
# Dependencies
|
||||
|
||||
.depend: Makefile chip/Make.defs $(SRCS)
|
||||
.depend: Makefile chip/Make.defs $(SRCS) $(TOPDIR)$(DELIM).config
|
||||
ifeq ($(BOARDMAKE),y)
|
||||
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" depend
|
||||
endif
|
||||
|
@ -109,7 +109,7 @@ nuttx$(EXEEXT): $(HEAD_OBJ) board/libboard$(LIBEXT) nuttx.linkcmd
|
||||
@echo "LD: nuttx$(EXEEXT)"
|
||||
$(Q) $(LD) $(LDFLAGS)
|
||||
|
||||
.depend: Makefile chip/Make.defs $(DEPSRCS)
|
||||
.depend: Makefile chip/Make.defs $(DEPSRCS) $(TOPDIR)$(DELIM).config
|
||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||
$(Q) if exist board$(DELIM)Makefile ( $(MAKE) -C board TOPDIR="$(TOPDIR)" depend )
|
||||
else
|
||||
|
@ -207,7 +207,7 @@ export_startup: board/libboard$(LIBEXT) $(STARTUP_OBJS)
|
||||
|
||||
# Build dependencies
|
||||
|
||||
.depend: Makefile asm_mem.h chip/Make.defs $(DEPSRCS)
|
||||
.depend: Makefile asm_mem.h chip/Make.defs $(DEPSRCS) $(TOPDIR)$(DELIM).config
|
||||
$(Q) if [ -e board/Makefile ]; then \
|
||||
$(MAKE) -C board TOPDIR="$(TOPDIR)" depend ; \
|
||||
fi
|
||||
|
@ -201,7 +201,7 @@ export_startup: board\libboard$(LIBEXT) $(STARTUP_OBJS)
|
||||
|
||||
# Build dependencies
|
||||
|
||||
.depend: Makefile asm_mem.h chip\Make.defs $(DEPSRCS)
|
||||
.depend: Makefile asm_mem.h chip\Make.defs $(DEPSRCS) $(TOPDIR)$(DELIM).config
|
||||
$(Q) if exist board\Makefile ( $(MAKE) -C board TOPDIR="$(TOPDIR)" depend )
|
||||
$(Q) $(MKDEP) --dep-path chip --dep-path common "$(CC)" -- $(CFLAGS) -- $(DEPSRCS) >Make.dep
|
||||
$(Q) touch $@
|
||||
|
@ -137,7 +137,7 @@ nuttx$(EXEEXT): $(HEAD_OBJ) board$(DELIM)libboard$(LIBEXT) nuttx.linkcmd
|
||||
@echo "LD: nuttx$(EXEEXT)"
|
||||
$(Q) "$(LD)" $(LDFLAGS)
|
||||
|
||||
.depend: Makefile chip$(DELIM)Make.defs $(DEPSRCS)
|
||||
.depend: Makefile chip$(DELIM)Make.defs $(DEPSRCS) $(TOPDIR)$(DELIM).config
|
||||
$(Q) if [ -e board$(DELIM)Makefile ]; then \
|
||||
$(MAKE) -C board TOPDIR="$(TOPDIR)" depend ; \
|
||||
fi
|
||||
|
@ -126,7 +126,7 @@ nuttx$(EXEEXT): $(HEAD_OBJ) board$(DELIM)libboard$(LIBEXT) nuttx.linkcmd
|
||||
@echo "LD: nuttx$(EXEEXT)"
|
||||
$(Q) "$(LD)" $(LDFLAGS)
|
||||
|
||||
.depend: Makefile chip$(DELIM)Make.defs $(DEPSRCS)
|
||||
.depend: Makefile chip$(DELIM)Make.defs $(DEPSRCS) $(TOPDIR)$(DELIM).config
|
||||
$(Q) if exist board$(DELIM)Makefile ( $(MAKE) -C board TOPDIR="$(TOPDIR)" depend )
|
||||
$(Q) $(MKDEP) --dep-path chip --dep-path common "$(CC)" -- $(CFLAGS) -- $(DEPSRCS) >Make.dep
|
||||
$(Q) touch $@
|
||||
|
@ -69,7 +69,7 @@ $(COBJS): %$(OBJEXT): %.c
|
||||
$(BIN): $(OBJS)
|
||||
$(call ARCHIVE, $@, $(OBJS))
|
||||
|
||||
.depend: Makefile $(SRCS)
|
||||
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
|
||||
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
$(Q) touch $@
|
||||
|
||||
|
@ -81,7 +81,7 @@ $(BINFMT_COBJS): %$(OBJEXT): %.c
|
||||
$(BIN): $(BINFMT_OBJS)
|
||||
$(call ARCHIVE, $@, $(BINFMT_OBJS))
|
||||
|
||||
.depend: Makefile $(BINFMT_SRCS)
|
||||
.depend: Makefile $(BINFMT_SRCS) $(TOPDIR)$(DELIM).config
|
||||
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(BINFMT_SRCS) >Make.dep
|
||||
$(Q) touch $@
|
||||
|
||||
|
@ -112,7 +112,7 @@ ifneq ($(CXXOBJS),)
|
||||
$(call ARCHIVE, $@, $(CXXOBJS))
|
||||
endif
|
||||
|
||||
.depend: Makefile $(SRCS) $(CXXSRCS) $(RCSRCS)
|
||||
.depend: Makefile $(SRCS) $(CXXSRCS) $(RCSRCS) $(TOPDIR)$(DELIM).config
|
||||
ifneq ($(ZDSVERSION),)
|
||||
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
else
|
||||
|
@ -99,7 +99,7 @@ $(CXXOBJS): %$(OBJEXT): %.cxx
|
||||
$(BIN): $(OBJS)
|
||||
$(call ARCHIVE, $@, $(OBJS))
|
||||
|
||||
.depend: Makefile $(SRCS)
|
||||
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
|
||||
ifneq ($(SRCS),)
|
||||
$(Q) $(MKDEP) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
endif
|
||||
|
@ -90,7 +90,7 @@ $(COBJS): %$(OBJEXT): %.c
|
||||
$(BIN): $(OBJS)
|
||||
$(call ARCHIVE, $@, $(OBJS))
|
||||
|
||||
.depend: Makefile $(SRCS)
|
||||
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
|
||||
ifeq ($(CONFIG_CRYPTO),y)
|
||||
$(Q) $(MKDEP) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
endif
|
||||
|
@ -118,7 +118,7 @@ $(COBJS): %$(OBJEXT): %.c
|
||||
$(BIN): $(OBJS)
|
||||
$(call ARCHIVE, $@, $(OBJS))
|
||||
|
||||
.depend: Makefile $(SRCS)
|
||||
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
|
||||
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
$(Q) touch $@
|
||||
|
||||
|
@ -98,7 +98,7 @@ $(BIN): $(OBJS)
|
||||
|
||||
context::
|
||||
|
||||
.depend: Makefile $(SRCS)
|
||||
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
|
||||
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
$(Q) touch $@
|
||||
|
||||
|
@ -124,7 +124,7 @@ $(BIN): $(OBJS)
|
||||
|
||||
mklibgraphics: $(BIN)
|
||||
|
||||
.depend: gensources Makefile $(SRCS)
|
||||
.depend: gensources Makefile $(SRCS) $(TOPDIR)$(DELIM).config
|
||||
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
$(Q) touch $@
|
||||
|
||||
|
@ -154,7 +154,7 @@ endif
|
||||
|
||||
# Dependencies
|
||||
|
||||
.depend: Makefile $(SRCS)
|
||||
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
|
||||
$(Q) $(MKDEP) --obj-path bin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >bin/Make.dep
|
||||
ifneq ($(CONFIG_BUILD_FLAT),y)
|
||||
$(Q) $(MKDEP) --obj-path kbin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) $(KDEFINE) -- $(SRCS) >kbin/Make.dep
|
||||
|
@ -118,7 +118,7 @@ context: .tzbuilt romfs
|
||||
|
||||
# Create dependencies
|
||||
|
||||
.depend: Makefile $(SRCS)
|
||||
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
|
||||
$(Q) $(MKDEP) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
$(Q) touch $@
|
||||
|
||||
|
@ -65,7 +65,7 @@ $(COBJS): %$(OBJEXT): %.c
|
||||
$(BIN): $(OBJS)
|
||||
$(call ARCHIVE, $@, $(OBJS))
|
||||
|
||||
.depend: Makefile $(SRCS)
|
||||
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
|
||||
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
$(Q) touch $@
|
||||
|
||||
|
@ -235,7 +235,7 @@ endif
|
||||
|
||||
# Dependencies
|
||||
|
||||
.depend: Makefile gensources $(SRCS)
|
||||
.depend: Makefile gensources $(SRCS) $(TOPDIR)$(DELIM).config
|
||||
$(Q) $(MKDEP) --obj-path bin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >bin/Make.dep
|
||||
ifneq ($(CONFIG_BUILD_FLAT),y)
|
||||
$(Q) $(MKDEP) --obj-path kbin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) $(KDEFINE) -- $(SRCS) >kbin/Make.dep
|
||||
|
@ -87,7 +87,7 @@ $(BIN): $(OBJS)
|
||||
|
||||
dirlinks::
|
||||
|
||||
.depend: Makefile $(SRCS)
|
||||
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
|
||||
$(Q) $(MKDEP) $(DEPPATH) "$(CXX)" -- $(CXXFLAGS) -- $(SRCS) >Make.dep
|
||||
$(Q) touch $@
|
||||
|
||||
|
@ -81,7 +81,7 @@ endif
|
||||
|
||||
# Dependencies
|
||||
|
||||
.depend: Makefile $(SRCS)
|
||||
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
|
||||
$(Q) $(MKDEP) --obj-path bin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >bin/Make.dep
|
||||
ifneq ($(CONFIG_BUILD_FLAT),y)
|
||||
$(Q) $(MKDEP) --obj-path kbin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) $(KDEFINE) -- $(SRCS) >kbin/Make.dep
|
||||
|
@ -92,7 +92,7 @@ $(COBJS): %$(OBJEXT): %.c
|
||||
$(BIN): $(OBJS)
|
||||
$(call ARCHIVE, $@, $(OBJS))
|
||||
|
||||
.depend: Makefile $(SRCS)
|
||||
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
|
||||
ifeq ($(CONFIG_NET),y)
|
||||
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
endif
|
||||
|
@ -62,7 +62,7 @@ $(BIN): $(OBJS)
|
||||
|
||||
dirlinks::
|
||||
|
||||
.depend: Makefile $(SRCS)
|
||||
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
|
||||
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
$(Q) touch $@
|
||||
|
||||
|
@ -58,7 +58,7 @@ $(COBJS): %$(OBJEXT): %.c
|
||||
$(BIN): $(OBJS)
|
||||
$(call ARCHIVE, $@, $(OBJS))
|
||||
|
||||
.depend: Makefile $(SRCS)
|
||||
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
|
||||
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
$(Q) touch $@
|
||||
|
||||
|
@ -59,7 +59,7 @@ $(COBJS): %$(OBJEXT): %.c
|
||||
$(BIN): $(OBJS)
|
||||
$(call ARCHIVE, $@, $(OBJS))
|
||||
|
||||
.depend: Makefile $(SRCS)
|
||||
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
|
||||
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
$(Q) touch $@
|
||||
|
||||
|
@ -93,7 +93,7 @@ $(BIN3): $(WRAP_OBJS)
|
||||
|
||||
$(SYSCALLWRAPS): .context
|
||||
|
||||
.depend: Makefile $(SRCS)
|
||||
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
|
||||
$(Q) $(MKDEP) $(PROXYDEPPATH) $(STUBDEPPATH) $(WRAPDEPPATH) \
|
||||
"$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
$(Q) touch $@
|
||||
|
@ -56,7 +56,7 @@ $(COBJS): %$(OBJEXT): %.c
|
||||
$(BIN): $(OBJS)
|
||||
$(call ARCHIVE, $@, $(OBJS))
|
||||
|
||||
.depend: Makefile $(SRCS)
|
||||
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
|
||||
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
$(Q) touch $@
|
||||
|
||||
|
@ -61,7 +61,7 @@ $(COBJS): %$(OBJEXT): %.c
|
||||
$(BIN): $(OBJS)
|
||||
$(call ARCHIVE, $@, $(OBJS))
|
||||
|
||||
.depend: Makefile $(SRCS)
|
||||
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
|
||||
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
$(Q) touch $@
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user