Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

Commit 9db8f2b

Browse files
Jimmy Huanggrgustaf
authored andcommitted
[build] Only checkout submodule if not found (#1855)
This fixes a non-desired behavior that git submodule update will always be called when building, and it will immediately checkout jerryscript at the desired commit, causing that repo to switch from the working branch into a detached head state. Signed-off-by: Jimmy Huang <[email protected]>
1 parent f680250 commit 9db8f2b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,9 @@ analyze: $(JS)
320320
# Update dependency repos
321321
.PHONY: update
322322
update: .gitmodules
323-
@git submodule update --init --recursive
323+
@if ! [ -f ${JERRY_BASE}/CMakeLists.txt ]; then \
324+
git submodule update --init --recursive; \
325+
fi
324326

325327
${JERRY_BASE}/CMakeLists.txt: update
326328

0 commit comments

Comments
 (0)