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

Makefile fixes #217

Merged
merged 3 commits into from
Jan 26, 2024
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
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ era_test_node_base_path := $(current_dir)/.test-node-subtree
era_test_node := $(era_test_node_base_path)/target/release/era_test_node
era_test_node_makefile := $(era_test_node_base_path)/Makefile
precompile_dst_path := $(era_test_node_base_path)/etc/system-contracts/contracts/precompiles
era_test_node_src_files = $(shell find $(era_test_node_base_path)/src -name "*.rs")

precompiles_source = $(wildcard $(current_dir)/precompiles/*.yul)
precompiles_dst = $(patsubst $(current_dir)/precompiles/%, $(precompile_dst_path)/%, $(precompiles_source))
Expand All @@ -15,7 +16,9 @@ run-node: $(era_test_node) $(precompiles_dst)
run-node-light: $(era_test_node) $(precompiles_dst)
$(era_test_node) run

$(era_test_node): $(era_test_node_makefile)
# test node needs contracts for include bytes directive
# source files are obtained just to recompile if there are changes, and located with a find
$(era_test_node): $(era_test_node_makefile) $(era_test_node_src_files) $(precompiles_dst)
cd $(era_test_node_base_path) && make rust-build

## precompile source is added just to avoid recompiling if they haven't changed
Expand All @@ -26,7 +29,7 @@ build-precompiles: $(precompiles_dst)

# Node Commands
update-node: era_test_node
cd $(era_test_node_base_path) && git pull && make rust-build
cd $(era_test_node_base_path) && make rust-build

test:
cd tests && \
Expand Down
Loading