From 217da10fa5c24f6da3ac1c7fc428b9c116418729 Mon Sep 17 00:00:00 2001 From: dzaima Date: Sun, 22 Sep 2024 23:51:04 +0300 Subject: [PATCH] respect nogit=1 in makefile-only build --- build/makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/build/makefile b/build/makefile index b8017abb..231a5f24 100644 --- a/build/makefile +++ b/build/makefile @@ -92,8 +92,7 @@ endif BYTECODE_DIR = $(shell if [ -d build/bytecodeLocal ]; then echo bytecodeLocal; else echo bytecodeSubmodule; fi) ifeq ($(BYTECODE_DIR),bytecodeLocal) custom = 1 -endif -ifeq ($(BYTECODE_DIR),bytecodeSubmodule) +else ifeq ($(i_USE_BC_SUBMODULE),) i_USE_BC_SUBMODULE=1 endif @@ -160,7 +159,11 @@ else ifeq ($(origin builddir),command line) else # run build ifeq ($(i_USE_BC_SUBMODULE),1) - @git submodule update --init build/bytecodeSubmodule || (echo 'Failed to initialize submodule; clone CBQN as a git repo, or place local copies in build/ (see README.md#submodules).' && false) +ifeq ($(nogit),1) + @echo "git needed for updating build/singeliSubmodule, but nogit=1 specified" && false +else + @git submodule update --init build/bytecodeSubmodule || (echo 'Failed to initialize build/bytecodeSubmodule; clone CBQN as a git repo, or place a local copy in build/bytecodeLocal (see README.md).' && false) +endif endif @export bd=$$("$(MAKEHERE)" builddir); \ [ "build/obj/" = "$$bd" ] && echo "Neither shasum nor sha256sum was found; cannot use custom configurations" && exit 1; \