@@ -52,6 +52,9 @@ configure :
52
52
distclean : .platform clean
53
53
@rm -f .platform
54
54
55
+ list :
56
+ @$(foreach target,$(SONIC_TARGET_LIST ) ,echo $(target ) ;)
57
+
55
58
# ##############################################################################
56
59
# # Include other rules
57
60
# ##############################################################################
@@ -118,6 +121,8 @@ $(addprefix $(DEBS_PATH)/, $(SONIC_COPY_DEBS)) : $(DEBS_PATH)/% : .platform
118
121
{ cp $( $( deb) _PATH) /$( deb) $( DEBS_PATH) / $( LOG) || exit 1 ; } ; )
119
122
$(FOOTER )
120
123
124
+ SONIC_TARGET_LIST += $(addprefix $(DEBS_PATH ) /, $(SONIC_COPY_DEBS ) )
125
+
121
126
# Copy regular files from local directory
122
127
# Add new package for copy:
123
128
# SOME_NEW_FILE = some_new_file
@@ -128,6 +133,8 @@ $(addprefix $(FILES_PATH)/, $(SONIC_COPY_FILES)) : $(FILES_PATH)/% : .platform
128
133
cp $($* _PATH) /$* $(FILES_PATH ) / $(LOG ) || exit 1
129
134
$(FOOTER )
130
135
136
+ SONIC_TARGET_LIST += $(addprefix $(FILES_PATH ) /, $(SONIC_COPY_FILES ) )
137
+
131
138
# ##############################################################################
132
139
# # Online targets
133
140
# ##############################################################################
@@ -143,6 +150,8 @@ $(addprefix $(DEBS_PATH)/, $(SONIC_ONLINE_DEBS)) : $(DEBS_PATH)/% : .platform
143
150
{ wget --no-use-server-timestamps -O $( DEBS_PATH) /$( deb) $( $( deb) _URL) $( LOG) || exit 1 ; } ; )
144
151
$(FOOTER )
145
152
153
+ SONIC_TARGET_LIST += $(addprefix $(DEBS_PATH ) /, $(SONIC_ONLINE_DEBS ) )
154
+
146
155
# Download regular files from online location
147
156
# Files are stored in deb packages directory for convenience
148
157
# Add new file for download:
@@ -154,6 +163,8 @@ $(addprefix $(FILES_PATH)/, $(SONIC_ONLINE_FILES)) : $(FILES_PATH)/% : .platform
154
163
wget --no-use-server-timestamps -O $@ $($* _URL) $(LOG )
155
164
$(FOOTER )
156
165
166
+ SONIC_TARGET_LIST += $(addprefix $(FILES_PATH ) /, $(SONIC_ONLINE_FILES ) )
167
+
157
168
# ##############################################################################
158
169
# # Debian package related targets
159
170
# ##############################################################################
@@ -178,6 +189,8 @@ $(addprefix $(DEBS_PATH)/, $(SONIC_MAKE_DEBS)) : $(DEBS_PATH)/% : .platform $$(a
178
189
if [ -f $( $* _SRC_PATH) .patch/series ]; then pushd $( $* _SRC_PATH) && quilt pop -a -f; popd ; fi
179
190
$(FOOTER )
180
191
192
+ SONIC_TARGET_LIST += $(addprefix $(DEBS_PATH ) /, $(SONIC_MAKE_DEBS ) )
193
+
181
194
# Build project with dpkg-buildpackage
182
195
# Add new package for build:
183
196
# SOME_NEW_DEB = some_new_deb.deb
@@ -199,6 +212,8 @@ $(addprefix $(DEBS_PATH)/, $(SONIC_DPKG_DEBS)) : $(DEBS_PATH)/% : .platform $$(a
199
212
mv $(addprefix $($* _SRC_PATH) /../, $* $($* _DERIVED_DEBS) $($* _EXTRA_DEBS) ) $(DEBS_PATH ) $(LOG )
200
213
$(FOOTER )
201
214
215
+ SONIC_TARGET_LIST += $(addprefix $(DEBS_PATH ) /, $(SONIC_DPKG_DEBS ) )
216
+
202
217
# Build project with python setup.py --command-packages=stdeb.command
203
218
# Add new package for build:
204
219
# SOME_NEW_DEB = some_new_deb.deb
@@ -214,6 +229,8 @@ $(addprefix $(DEBS_PATH)/, $(SONIC_PYTHON_STDEB_DEBS)) : $(DEBS_PATH)/% : .platf
214
229
mv $(addprefix $($* _SRC_PATH) /deb_dist/, $* $($* _DERIVED_DEBS) ) $(DEBS_PATH ) $(LOG )
215
230
$(FOOTER )
216
231
232
+ SONIC_TARGET_LIST += $(addprefix $(DEBS_PATH ) /, $(SONIC_PYTHON_STDEB_DEBS ) )
233
+
217
234
# Rules for derived debian packages (dev, dbg, etc.)
218
235
# All noise takes place in main deb recipe, so we are just telling that
219
236
# we depend on it and move our deb to other targets
@@ -227,6 +244,8 @@ $(addprefix $(DEBS_PATH)/, $(SONIC_DERIVED_DEBS)) : $(DEBS_PATH)/% : .platform $
227
244
[ -f $@ ] && touch $@
228
245
$(FOOTER )
229
246
247
+ SONIC_TARGET_LIST += $(addprefix $(DEBS_PATH ) /, $(SONIC_DERIVED_DEBS ) )
248
+
230
249
# Rules for extra debian packages
231
250
# All noise takes place in main deb recipe, so we are just telling that
232
251
# we need to build the main deb and move our deb to other targets
@@ -240,6 +259,8 @@ $(addprefix $(DEBS_PATH)/, $(SONIC_EXTRA_DEBS)) : $(DEBS_PATH)/% : .platform $$(
240
259
[ -f $@ ] && touch $@
241
260
$(FOOTER )
242
261
262
+ SONIC_TARGET_LIST += $(addprefix $(DEBS_PATH ) /, $(SONIC_EXTRA_DEBS ) )
263
+
243
264
# Targets for installing debian packages prior to build one that depends on them
244
265
SONIC_INSTALL_TARGETS = $(addsuffix -install,$(addprefix $(DEBS_PATH ) /, \
245
266
$(SONIC_ONLINE_DEBS ) \
@@ -285,6 +306,8 @@ $(addprefix $(PYTHON_WHEELS_PATH)/, $(SONIC_PYTHON_WHEELS)) : $(PYTHON_WHEELS_PA
285
306
mv $($* _SRC_PATH) /dist/$* $(PYTHON_WHEELS_PATH ) $(LOG )
286
307
$(FOOTER )
287
308
309
+ SONIC_TARGET_LIST += $(addprefix $(PYTHON_WHEELS_PATH ) /, $(SONIC_PYTHON_WHEELS ) )
310
+
288
311
# Targets for installing python wheels.
289
312
# Autogenerated
290
313
SONIC_INSTALL_WHEELS = $(addsuffix -install, $(addprefix $(PYTHON_WHEELS_PATH ) /, $(SONIC_PYTHON_WHEELS ) ) )
@@ -314,6 +337,8 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_SIMPLE_DOCKER_IMAGES)) : $(TARGET_PATH)/%.g
314
337
docker save $* | gzip -c > $@
315
338
$(FOOTER )
316
339
340
+ SONIC_TARGET_LIST += $(addprefix $(TARGET_PATH ) /, $(SONIC_SIMPLE_DOCKER_IMAGES ) )
341
+
317
342
# Targets for building docker images
318
343
$(addprefix $(TARGET_PATH ) /, $(SONIC_DOCKER_IMAGES ) ) : $(TARGET_PATH ) /% .gz : .platform docker-start $$(addprefix $(DEBS_PATH ) /,$$($$* .gz_DEPENDS) ) $$(addprefix $(FILES_PATH ) /,$$($$* .gz_FILES) ) $$(addprefix $(PYTHON_WHEELS_PATH ) /,$$($$* .gz_PYTHON_WHEELS) ) $$(addsuffix -load,$$(addprefix $(TARGET_PATH ) /,$$($$* .gz_LOAD_DOCKERS) ) ) $$($$* .gz_PATH) /Dockerfile.j2
319
344
$(HEADER )
@@ -332,6 +357,8 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_DOCKER_IMAGES)) : $(TARGET_PATH)/%.gz : .pl
332
357
docker save $* | gzip -c > $@
333
358
$(FOOTER )
334
359
360
+ SONIC_TARGET_LIST += $(addprefix $(TARGET_PATH ) /, $(SONIC_DOCKER_IMAGES ) )
361
+
335
362
DOCKER_LOAD_TARGETS = $(addsuffix -load,$(addprefix $(TARGET_PATH ) /, \
336
363
$(SONIC_SIMPLE_DOCKER_IMAGES ) \
337
364
$(SONIC_DOCKER_IMAGES ) ) )
@@ -401,6 +428,8 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : .platform
401
428
chmod a+x $@
402
429
$(FOOTER)
403
430
431
+ SONIC_TARGET_LIST += $(addprefix $(TARGET_PATH ) /, $(SONIC_INSTALLERS ) )
432
+
404
433
# ##############################################################################
405
434
# # Clean targets
406
435
# ##############################################################################
0 commit comments