Skip to content

Commit

Permalink
Revise Make descent order
Browse files Browse the repository at this point in the history
This applies a Make pattern of depending on a phony Make target instead
of a flag file, to guarantee dependents of the monolothic ontology
builds are visited after the builds.  This has been used in CASE-Corpora
for some time, and also helps avoid an issue where updating the Git
submodules (such as in bumping the prerelease pointers) necessitated
manually deleting the flag file.

No effects were observed on Make-managed files.

Signed-off-by: Alex Nelson <[email protected]>
  • Loading branch information
ajnelson-nist committed Dec 21, 2023
1 parent ed131ef commit 1aefba8
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,18 @@ SHELL := /bin/bash
PYTHON3 ?= $(shell which python3.9 2>/dev/null || which python3.8 2>/dev/null || which python3.7 2>/dev/null || which python3.6 2>/dev/null || which python3)

all: \
.dependencies.done.log \
all-dependencies \
.venv-pre-commit/var/.pre-commit-built.log
$(MAKE) \
--directory examples/illustrations

.PHONY: \
all-dependencies \
check-supply-chain \
check-supply-chain-pre-commit \
check-supply-chain-submodules \
download

.dependencies.done.log: \
.venv.done.log
$(MAKE) \
--directory dependencies
touch $@

# Submodules are checked for having been cloned ever. A global git
# submodule udpate command is not run, to prevent resetting any pointers
# for someone developing with different submodule pointers.
Expand Down Expand Up @@ -112,8 +107,14 @@ all: \
--requirement requirements.txt
touch $@

all-dependencies: \
.venv.done.log
$(MAKE) \
--directory dependencies
touch $@

check: \
.dependencies.done.log \
all-dependencies \
.venv-pre-commit/var/.pre-commit-built.log
$(MAKE) \
--directory examples/illustrations \
Expand Down Expand Up @@ -145,8 +146,6 @@ clean:
@$(MAKE) \
--directory examples/illustrations \
clean
@rm -f \
.dependencies.done.log
@$(MAKE) \
--directory dependencies \
clean
Expand Down

0 comments on commit 1aefba8

Please sign in to comment.