Skip to content

Commit e5965c0

Browse files
author
Wataru Ishida
committed
make: support buildimage to be git submodule
Signed-off-by: Wataru Ishida <[email protected]>
1 parent 6a37365 commit e5965c0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Makefile.work

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,11 @@ OVERLAY_MODULE_CHECK := lsmod | grep "^overlay " > /dev/null 2>&1 || (echo "ERRO
6363

6464
BUILD_TIMESTAMP := $(shell date +%Y%m%d\.%H%M%S)
6565

66+
GIT_DIRECTORY := $(shell file .git | grep -q ASCII && awk '{split($$2, ary, ".git"); print ary[1]}' .git | xargs realpath || pwd )
67+
6668
DOCKER_RUN := docker run --rm=true --privileged \
67-
-v $(PWD):/sonic \
68-
-w /sonic \
69+
-v $(GIT_DIRECTORY):$(GIT_DIRECTORY) \
70+
-w $(PWD) \
6971
-e "http_proxy=$(http_proxy)" \
7072
-e "https_proxy=$(https_proxy)" \
7173
-i$(if $(TERM),t,)

0 commit comments

Comments
 (0)