Skip to content

Commit 77d9e11

Browse files
xumiasanthosh-kt
authored andcommitted
Simplify the Makefile to build slave (sonic-net#6117)
* Simplify the Makefile to build slave * remove an empty line
1 parent 8b686bc commit 77d9e11

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

Makefile.work

+5-15
Original file line numberDiff line numberDiff line change
@@ -251,30 +251,20 @@ else
251251
endif
252252

253253
sonic-slave-base-build :
254-
$(DOCKER_BASE_BUILD)
255-
256-
sonic-slave-build :
257-
$(DOCKER_BASE_BUILD)
258-
$(DOCKER_BUILD)
259-
260-
sonic-slave-bash :
261254
@$(OVERLAY_MODULE_CHECK)
262255
@docker inspect --type image $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) &> /dev/null || \
263256
{ echo Image $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) not found. Building... ; \
264257
$(DOCKER_BASE_BUILD) ; }
258+
259+
sonic-slave-build : sonic-slave-base-build
265260
@docker inspect --type image $(SLAVE_IMAGE):$(SLAVE_TAG) &> /dev/null || \
266261
{ echo Image $(SLAVE_IMAGE):$(SLAVE_TAG) not found. Building... ; \
267262
$(DOCKER_BUILD) ; }
263+
264+
sonic-slave-bash : sonic-slave-build
268265
@$(DOCKER_RUN) -t $(SLAVE_IMAGE):$(SLAVE_TAG) bash
269266

270-
sonic-slave-run :
271-
@$(OVERLAY_MODULE_CHECK)
272-
@docker inspect --type image $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) &> /dev/null || \
273-
{ echo Image $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) not found. Building... ; \
274-
$(DOCKER_BASE_BUILD) ; }
275-
@docker inspect --type image $(SLAVE_IMAGE):$(SLAVE_TAG) &> /dev/null || \
276-
{ echo Image $(SLAVE_IMAGE):$(SLAVE_TAG) not found. Building... ; \
277-
$(DOCKER_BUILD) ; }
267+
sonic-slave-run : sonic-slave-build
278268
@$(DOCKER_RUN) $(SLAVE_IMAGE):$(SLAVE_TAG) bash -c "$(SONIC_RUN_CMDS)"
279269

280270
showtag:

0 commit comments

Comments
 (0)