From d9e4376e3594b7df97841fe70e94d03e5ff9382e Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Wed, 31 Jul 2024 01:55:31 +0200 Subject: [PATCH] make: avoid duplicate `fetchthirdparty` When using `make fetchthirdparty` and base has not been checkout yet: - make want to include `Makefile.defs` which is missing - the rule for `Makefile.defs` / `fetchthirdparty` are executed - make reload the main makefile, and execute `fetchthirdparty` --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c26f89827..2479ae0ed 100644 --- a/Makefile +++ b/Makefile @@ -131,7 +131,11 @@ coverage: $(INSTALL_DIR)/koreader/.luacov +$$(($$(grep -nm1 -e "^Summary$$" luacov.report.out|cut -d: -f1)-1)) \ luacov.report.out -$(KOR_BASE)/Makefile.defs fetchthirdparty: +ifeq (,$(wildcard $(KOR_BASE)/Makefile.defs)) +$(KOR_BASE)/Makefile.defs: fetchthirdparty +endif + +fetchthirdparty: git submodule init git submodule sync ifneq (,$(CI))