Skip to content

Commit

Permalink
Add a Make rule to touch the build tree
Browse files Browse the repository at this point in the history
Ref. eng/recordflux/RecordFlux#1743
  • Loading branch information
andrestt committed Oct 9, 2024
1 parent 6dc6126 commit 8b010c9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
14 changes: 2 additions & 12 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,18 +132,8 @@ setup:
. .venv$PYTHON_VERSION/bin/activate;
make init;
fi
# Prevent regeneration of Langkit-based parser.
# The full set of dependencies must be touched in the relative build order.
- touch .venv$PYTHON_VERSION/lib/python$PYTHON_VERSION/site-packages/langkit
- touch generated/python/librflxlang
- touch generated/lib/relocatable/dev/librflxlang.so
- touch rflx/lang/librflxlang.so
# Prevent recompilation of RapidFlux library.
- find librapidflux rapidflux -type f -exec touch {} \;
- touch target/debug/librapidflux.so
- touch rflx/rapidflux.so
# Prevent reinstallation of RecordFlux
- touch .venv$PYTHON_VERSION/bin/rflx
# Prevent the regeneration and rebuild of RecordFlux and its components
- make touch_build_tree

changelog:
rules:
Expand Down
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,26 @@ audit: $(RFLX) rapidflux_devel
@echo Auditing Rust dependencies
@cargo audit

# --- Workflow optimization utilities ---

.PHONY: touch_build_tree

# Touch the main build artifacts to mark them up to date to prevent their
# recompilation when that isn't required and desirable. The order of touching
# must correspond to the relative build order.
touch_build_tree:
@# Langkit-based parser
touch $(BUILD_DEPS)
touch $(GENERATED_DIR)/python/librflxlang
touch $(GENERATED_DIR)/lib/relocatable/dev/librflxlang.so
touch $(PARSER)
@# RapidFlux
find librapidflux rapidflux -type f -exec touch {} +
touch target/debug/librapidflux.so
touch $(RAPIDFLUX)
@# RecordFlux
touch $(DEVEL_VENV)/bin/rflx

# --- Clean ---

.PHONY: clean clean_build clean_cache clean_all
Expand Down

0 comments on commit 8b010c9

Please sign in to comment.