-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
80 lines (70 loc) · 1.95 KB
/
Makefile
File metadata and controls
80 lines (70 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Makefile for iap-https-rust workspace
RUST_VARIANTS := iap manual local stdio stdiokey
PYTHON_VARIANTS := local-python manual-python stdiokey-python
ALL_VARIANTS := $(RUST_VARIANTS) $(PYTHON_VARIANTS)
.PHONY: all build clean test fmt clippy check help $(ALL_VARIANTS)
# The default target
all: build
# Build all variants
build:
@for dir in $(RUST_VARIANTS); do \
echo "Building $$dir variant..."; \
$(MAKE) -C $$dir build; \
done
@for dir in $(PYTHON_VARIANTS); do \
echo "Installing dependencies for $$dir variant..."; \
$(MAKE) -C $$dir install; \
done
# Clean all variants
clean:
@echo "Cleaning the projects..."
@for dir in $(ALL_VARIANTS); do \
$(MAKE) -C $$dir clean; \
done
# Run tests for all
test:
@for dir in $(ALL_VARIANTS); do \
echo "Testing $$dir variant..."; \
$(MAKE) -C $$dir test; \
done
# Format the code
fmt:
@echo "Formatting code..."
@for dir in $(ALL_VARIANTS); do \
$(MAKE) -C $$dir fmt; \
done
# Lint the code
clippy:
@echo "Linting code..."
@for dir in $(RUST_VARIANTS); do \
$(MAKE) -C $$dir clippy; \
done
@for dir in $(PYTHON_VARIANTS); do \
echo "Linting $$dir variant..."; \
$(MAKE) -C $$dir lint; \
done
# Check the code
check:
@echo "Checking the code..."
@for dir in $(RUST_VARIANTS); do \
$(MAKE) -C $$dir check; \
done
@for dir in $(PYTHON_VARIANTS); do \
echo "Linting (checking) $$dir variant..."; \
$(MAKE) -C $$dir lint; \
done
help:
@echo "Root Makefile for iap-https-rust"
@echo ""
@echo "Usage:"
@echo " make <target>"
@echo ""
@echo "Targets:"
@echo " build Build Rust variants and install Python dependencies"
@echo " clean Clean all variants"
@echo " test Run tests for all variants"
@echo " fmt Format code for all variants"
@echo " clippy Lint all variants (clippy for Rust, lint for Python)"
@echo " check Check all variants"
@echo ""
@echo "Note: To run or deploy, navigate to the specific directory."