Skip to content

Commit e249a2f

Browse files
SPRESENSExiaoxiang781216
authored andcommittedJul 28, 2020
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.
1 parent d560ce6 commit e249a2f

File tree

38 files changed

+38
-38
lines changed

38 files changed

+38
-38
lines changed
 

‎arch/arm/src/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ endif
194194

195195
# Dependencies
196196

197-
.depend: Makefile chip$(DELIM)Make.defs $(SRCS)
197+
.depend: Makefile chip$(DELIM)Make.defs $(SRCS) $(TOPDIR)$(DELIM).config
198198
ifeq ($(BOARDMAKE),y)
199199
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" depend
200200
endif

‎arch/avr/src/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export_startup: board/libboard$(LIBEXT) $(STARTUP_OBJS)
140140

141141
# Dependencies
142142

143-
.depend: Makefile chip/Make.defs $(SRCS)
143+
.depend: Makefile chip/Make.defs $(SRCS) $(TOPDIR)$(DELIM).config
144144
ifeq ($(BOARDMAKE),y)
145145
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" depend
146146
endif

‎arch/hc/src/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export_startup: board/libboard$(LIBEXT) $(STARTUP_OBJS)
155155

156156
# Dependencies
157157

158-
.depend: Makefile chip/Make.defs $(SRCS)
158+
.depend: Makefile chip/Make.defs $(SRCS) $(TOPDIR)$(DELIM).config
159159
ifeq ($(BOARDMAKE),y)
160160
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" depend
161161
endif

‎arch/mips/src/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ export_startup: board/libboard$(LIBEXT) $(STARTUP_OBJS)
138138

139139
# Dependencies
140140

141-
.depend: Makefile chip/Make.defs $(SRCS)
141+
.depend: Makefile chip/Make.defs $(SRCS) $(TOPDIR)$(DELIM).config
142142
ifeq ($(BOARDMAKE),y)
143143
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" depend
144144
endif

‎arch/misoc/src/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export_startup: board/libboard$(LIBEXT) $(STARTUP_OBJS)
141141

142142
# Dependencies
143143

144-
.depend: Makefile chip/Make.defs $(SRCS)
144+
.depend: Makefile chip/Make.defs $(SRCS) $(TOPDIR)$(DELIM).config
145145
ifeq ($(BOARDMAKE),y)
146146
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" depend
147147
endif

‎arch/or1k/src/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ endif
181181

182182
# Dependencies
183183

184-
.depend: Makefile chip$(DELIM)Make.defs $(SRCS)
184+
.depend: Makefile chip$(DELIM)Make.defs $(SRCS) $(TOPDIR)$(DELIM).config
185185
ifeq ($(BOARDMAKE),y)
186186
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" depend
187187
endif

‎arch/renesas/src/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ export_startup: board/libboard$(LIBEXT) $(STARTUP_OBJS)
149149

150150
# Dependencies
151151

152-
.depend: Makefile chip/Make.defs $(SRCS)
152+
.depend: Makefile chip/Make.defs $(SRCS) $(TOPDIR)$(DELIM).config
153153
ifeq ($(BOARDMAKE),y)
154154
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" depend
155155
endif

‎arch/risc-v/src/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ endif
184184

185185
# Dependencies
186186

187-
.depend: Makefile $(SRCS)
187+
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
188188
ifeq ($(BOARDMAKE),y)
189189
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" depend
190190
endif

‎arch/sim/src/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ export_startup: board/libboard$(LIBEXT) up_head.o $(HOSTOBJS)
321321

322322
# Dependencies
323323

324-
.depend: Makefile $(SRCS)
324+
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
325325
$(Q) if [ -e board/Makefile ]; then \
326326
$(MAKE) -C board TOPDIR="$(TOPDIR)" depend ; \
327327
fi

‎arch/x86/src/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ export_startup: board/libboard$(LIBEXT) $(STARTUP_OBJS)
153153

154154
# Dependencies
155155

156-
.depend: Makefile chip/Make.defs $(SRCS)
156+
.depend: Makefile chip/Make.defs $(SRCS) $(TOPDIR)$(DELIM).config
157157
ifeq ($(BOARDMAKE),y)
158158
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" depend
159159
endif

‎arch/x86_64/src/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ export_startup: board/libboard$(LIBEXT) $(STARTUP_OBJS)
148148

149149
# Dependencies
150150

151-
.depend: Makefile chip/Make.defs $(SRCS)
151+
.depend: Makefile chip/Make.defs $(SRCS) $(TOPDIR)$(DELIM).config
152152
ifeq ($(BOARDMAKE),y)
153153
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" depend
154154
endif

‎arch/xtensa/src/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ export_startup: board/libboard$(LIBEXT) $(STARTUP_OBJS)
139139

140140
# Dependencies
141141

142-
.depend: Makefile chip/Make.defs $(SRCS)
142+
.depend: Makefile chip/Make.defs $(SRCS) $(TOPDIR)$(DELIM).config
143143
ifeq ($(BOARDMAKE),y)
144144
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" depend
145145
endif

‎arch/z16/src/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ nuttx$(EXEEXT): $(HEAD_OBJ) board/libboard$(LIBEXT) nuttx.linkcmd
109109
@echo "LD: nuttx$(EXEEXT)"
110110
$(Q) $(LD) $(LDFLAGS)
111111

112-
.depend: Makefile chip/Make.defs $(DEPSRCS)
112+
.depend: Makefile chip/Make.defs $(DEPSRCS) $(TOPDIR)$(DELIM).config
113113
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
114114
$(Q) if exist board$(DELIM)Makefile ( $(MAKE) -C board TOPDIR="$(TOPDIR)" depend )
115115
else

‎arch/z80/src/Makefile.sdccl

+1-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ export_startup: board/libboard$(LIBEXT) $(STARTUP_OBJS)
207207

208208
# Build dependencies
209209

210-
.depend: Makefile asm_mem.h chip/Make.defs $(DEPSRCS)
210+
.depend: Makefile asm_mem.h chip/Make.defs $(DEPSRCS) $(TOPDIR)$(DELIM).config
211211
$(Q) if [ -e board/Makefile ]; then \
212212
$(MAKE) -C board TOPDIR="$(TOPDIR)" depend ; \
213213
fi

‎arch/z80/src/Makefile.sdccw

+1-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ export_startup: board\libboard$(LIBEXT) $(STARTUP_OBJS)
201201

202202
# Build dependencies
203203

204-
.depend: Makefile asm_mem.h chip\Make.defs $(DEPSRCS)
204+
.depend: Makefile asm_mem.h chip\Make.defs $(DEPSRCS) $(TOPDIR)$(DELIM).config
205205
$(Q) if exist board\Makefile ( $(MAKE) -C board TOPDIR="$(TOPDIR)" depend )
206206
$(Q) $(MKDEP) --dep-path chip --dep-path common "$(CC)" -- $(CFLAGS) -- $(DEPSRCS) >Make.dep
207207
$(Q) touch $@

‎arch/z80/src/Makefile.zdsiil

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ nuttx$(EXEEXT): $(HEAD_OBJ) board$(DELIM)libboard$(LIBEXT) nuttx.linkcmd
137137
@echo "LD: nuttx$(EXEEXT)"
138138
$(Q) "$(LD)" $(LDFLAGS)
139139

140-
.depend: Makefile chip$(DELIM)Make.defs $(DEPSRCS)
140+
.depend: Makefile chip$(DELIM)Make.defs $(DEPSRCS) $(TOPDIR)$(DELIM).config
141141
$(Q) if [ -e board$(DELIM)Makefile ]; then \
142142
$(MAKE) -C board TOPDIR="$(TOPDIR)" depend ; \
143143
fi

‎arch/z80/src/Makefile.zdsiiw

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ nuttx$(EXEEXT): $(HEAD_OBJ) board$(DELIM)libboard$(LIBEXT) nuttx.linkcmd
126126
@echo "LD: nuttx$(EXEEXT)"
127127
$(Q) "$(LD)" $(LDFLAGS)
128128

129-
.depend: Makefile chip$(DELIM)Make.defs $(DEPSRCS)
129+
.depend: Makefile chip$(DELIM)Make.defs $(DEPSRCS) $(TOPDIR)$(DELIM).config
130130
$(Q) if exist board$(DELIM)Makefile ( $(MAKE) -C board TOPDIR="$(TOPDIR)" depend )
131131
$(Q) $(MKDEP) --dep-path chip --dep-path common "$(CC)" -- $(CFLAGS) -- $(DEPSRCS) >Make.dep
132132
$(Q) touch $@

‎audio/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ $(COBJS): %$(OBJEXT): %.c
6969
$(BIN): $(OBJS)
7070
$(call ARCHIVE, $@, $(OBJS))
7171

72-
.depend: Makefile $(SRCS)
72+
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
7373
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
7474
$(Q) touch $@
7575

‎binfmt/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ $(BINFMT_COBJS): %$(OBJEXT): %.c
8181
$(BIN): $(BINFMT_OBJS)
8282
$(call ARCHIVE, $@, $(BINFMT_OBJS))
8383

84-
.depend: Makefile $(BINFMT_SRCS)
84+
.depend: Makefile $(BINFMT_SRCS) $(TOPDIR)$(DELIM).config
8585
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(BINFMT_SRCS) >Make.dep
8686
$(Q) touch $@
8787

‎boards/Board.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ ifneq ($(CXXOBJS),)
112112
$(call ARCHIVE, $@, $(CXXOBJS))
113113
endif
114114

115-
.depend: Makefile $(SRCS) $(CXXSRCS) $(RCSRCS)
115+
.depend: Makefile $(SRCS) $(CXXSRCS) $(RCSRCS) $(TOPDIR)$(DELIM).config
116116
ifneq ($(ZDSVERSION),)
117117
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
118118
else

‎boards/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ $(CXXOBJS): %$(OBJEXT): %.cxx
9999
$(BIN): $(OBJS)
100100
$(call ARCHIVE, $@, $(OBJS))
101101

102-
.depend: Makefile $(SRCS)
102+
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
103103
ifneq ($(SRCS),)
104104
$(Q) $(MKDEP) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
105105
endif

‎crypto/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ $(COBJS): %$(OBJEXT): %.c
9090
$(BIN): $(OBJS)
9191
$(call ARCHIVE, $@, $(OBJS))
9292

93-
.depend: Makefile $(SRCS)
93+
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
9494
ifeq ($(CONFIG_CRYPTO),y)
9595
$(Q) $(MKDEP) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
9696
endif

‎drivers/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ $(COBJS): %$(OBJEXT): %.c
118118
$(BIN): $(OBJS)
119119
$(call ARCHIVE, $@, $(OBJS))
120120

121-
.depend: Makefile $(SRCS)
121+
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
122122
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
123123
$(Q) touch $@
124124

‎fs/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ $(BIN): $(OBJS)
9898

9999
context::
100100

101-
.depend: Makefile $(SRCS)
101+
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
102102
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
103103
$(Q) touch $@
104104

‎graphics/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ $(BIN): $(OBJS)
124124

125125
mklibgraphics: $(BIN)
126126

127-
.depend: gensources Makefile $(SRCS)
127+
.depend: gensources Makefile $(SRCS) $(TOPDIR)$(DELIM).config
128128
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
129129
$(Q) touch $@
130130

‎libs/libc/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ endif
154154

155155
# Dependencies
156156

157-
.depend: Makefile $(SRCS)
157+
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
158158
$(Q) $(MKDEP) --obj-path bin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >bin/Make.dep
159159
ifneq ($(CONFIG_BUILD_FLAT),y)
160160
$(Q) $(MKDEP) --obj-path kbin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) $(KDEFINE) -- $(SRCS) >kbin/Make.dep

‎libs/libc/zoneinfo/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ context: .tzbuilt romfs
118118

119119
# Create dependencies
120120

121-
.depend: Makefile $(SRCS)
121+
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
122122
$(Q) $(MKDEP) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
123123
$(Q) touch $@
124124

‎libs/libdsp/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ $(COBJS): %$(OBJEXT): %.c
6565
$(BIN): $(OBJS)
6666
$(call ARCHIVE, $@, $(OBJS))
6767

68-
.depend: Makefile $(SRCS)
68+
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
6969
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
7070
$(Q) touch $@
7171

‎libs/libnx/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ endif
235235

236236
# Dependencies
237237

238-
.depend: Makefile gensources $(SRCS)
238+
.depend: Makefile gensources $(SRCS) $(TOPDIR)$(DELIM).config
239239
$(Q) $(MKDEP) --obj-path bin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >bin/Make.dep
240240
ifneq ($(CONFIG_BUILD_FLAT),y)
241241
$(Q) $(MKDEP) --obj-path kbin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) $(KDEFINE) -- $(SRCS) >kbin/Make.dep

‎libs/libxx/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ $(BIN): $(OBJS)
8787

8888
dirlinks::
8989

90-
.depend: Makefile $(SRCS)
90+
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
9191
$(Q) $(MKDEP) $(DEPPATH) "$(CXX)" -- $(CXXFLAGS) -- $(SRCS) >Make.dep
9292
$(Q) touch $@
9393

‎mm/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ endif
8181

8282
# Dependencies
8383

84-
.depend: Makefile $(SRCS)
84+
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
8585
$(Q) $(MKDEP) --obj-path bin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >bin/Make.dep
8686
ifneq ($(CONFIG_BUILD_FLAT),y)
8787
$(Q) $(MKDEP) --obj-path kbin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) $(KDEFINE) -- $(SRCS) >kbin/Make.dep

‎net/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ $(COBJS): %$(OBJEXT): %.c
9292
$(BIN): $(OBJS)
9393
$(call ARCHIVE, $@, $(OBJS))
9494

95-
.depend: Makefile $(SRCS)
95+
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
9696
ifeq ($(CONFIG_NET),y)
9797
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
9898
endif

‎openamp/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ $(BIN): $(OBJS)
6262

6363
dirlinks::
6464

65-
.depend: Makefile $(SRCS)
65+
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
6666
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
6767
$(Q) touch $@
6868

‎pass1/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ $(COBJS): %$(OBJEXT): %.c
5858
$(BIN): $(OBJS)
5959
$(call ARCHIVE, $@, $(OBJS))
6060

61-
.depend: Makefile $(SRCS)
61+
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
6262
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
6363
$(Q) touch $@
6464

‎sched/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ $(COBJS): %$(OBJEXT): %.c
5959
$(BIN): $(OBJS)
6060
$(call ARCHIVE, $@, $(OBJS))
6161

62-
.depend: Makefile $(SRCS)
62+
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
6363
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
6464
$(Q) touch $@
6565

‎syscall/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ $(BIN3): $(WRAP_OBJS)
9393

9494
$(SYSCALLWRAPS): .context
9595

96-
.depend: Makefile $(SRCS)
96+
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
9797
$(Q) $(MKDEP) $(PROXYDEPPATH) $(STUBDEPPATH) $(WRAPDEPPATH) \
9898
"$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
9999
$(Q) touch $@

‎video/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ $(COBJS): %$(OBJEXT): %.c
5656
$(BIN): $(OBJS)
5757
$(call ARCHIVE, $@, $(OBJS))
5858

59-
.depend: Makefile $(SRCS)
59+
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
6060
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
6161
$(Q) touch $@
6262

‎wireless/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ $(COBJS): %$(OBJEXT): %.c
6161
$(BIN): $(OBJS)
6262
$(call ARCHIVE, $@, $(OBJS))
6363

64-
.depend: Makefile $(SRCS)
64+
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
6565
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
6666
$(Q) touch $@
6767

0 commit comments

Comments
 (0)
Please sign in to comment.