Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make all SKIP_MODULES=1 to not update modules #137

Merged
merged 2 commits into from
Aug 15, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ifeq ($NO_UPDATE),0) would also work with NO_UPDATE=yes or even NO_UPDATE=anything_not_0. Do you also plan to add information to README.md?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you also plan to add information to README.md?

I wouldn't recommend advertising it too much. After all, it's a developer option...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ifeq ($NO_UPDATE),0) would also work with NO_UPDATE=yes or even NO_UPDATE=anything_not_0. Do you also plan to add information to README.md?

You're right, that would make it easier to use but as @bertsky says, this is not something we want users to "try if anything else fails", so I think it's best not to document in the README.md (perhaps in the contributor guide?).

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