Skip to content

Commit

Permalink
Merge pull request #137 from OCR-D/skip-modules
Browse files Browse the repository at this point in the history
make all SKIP_MODULES=1 to not update modules
  • Loading branch information
stweil authored Aug 15, 2020
2 parents 18547e4 + e7e456e commit adb5209
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ export PIP
# Derived variable to allow filtering -e, or inserting other options
# (the option --editable must always be last and only applies to src install)
PIP_OPTIONS_E = $(filter-out -e,$(PIP_OPTIONS))
# Set to 1 to skip all submodule updates. For development.
NO_UPDATE = 0
GIT_RECURSIVE = # --recursive
# Required and optional Tesseract models.
ALL_TESSERACT_MODELS = eng equ osd $(TESSERACT_MODELS)
Expand Down Expand Up @@ -87,6 +89,7 @@ Variables:
PIP: name of the Python packaging binary
PIP_OPTIONS: extra options for the `pip install` command like `-q` or `-v` or `-e`
GIT_RECURSIVE: set to `--recursive` to checkout/update all submodules recursively
NO_UPDATE: set to `1` to omit git submodule sync and update
OCRD_MODULES: list of submodules to include (defaults to all git submodules, see `show`)
DISABLED_MODULES: list of disabled modules. Default: $(DISABLED_MODULES)
TESSERACT_MODELS: list of additional models/languages to download for Tesseract
Expand All @@ -108,11 +111,13 @@ modules: $(OCRD_MODULES)
# but bypass updates if we have no repo here (e.g. Docker build)
ifneq (,$(wildcard .git))
$(OCRD_MODULES): always-update
ifneq ($(NO_UPDATE),1)
sem --fg --id ocrd_all_git git submodule sync $(GIT_RECURSIVE) $@
if git submodule status $(GIT_RECURSIVE) $@ | grep -qv '^ '; then \
sem --fg --id ocrd_all_git git submodule update --init $(GIT_RECURSIVE) $@ && \
touch $@; fi
endif
endif

deinit: clean
.PHONY: deinit
Expand Down

0 comments on commit adb5209

Please sign in to comment.