-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
71 lines (61 loc) · 2.4 KB
/
Makefile
File metadata and controls
71 lines (61 loc) · 2.4 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
# SPDX-FileCopyrightText: (C) 2025 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
SUBPROJECTS := common cluster-agent hardware-discovery-agent in-band-manageability node-agent platform-observability-agent platform-manageability-agent platform-telemetry-agent platform-update-agent reporting-agent
NO_BUILD := common platform-observability-agent
NO_FUZZ := common platform-observability-agent
NO_LINT := platform-observability-agent
NO_TAR := common platform-update-agent
NO_UNIT := platform-observability-agent
NO_PACKAGE := common
NO_CLEAN := common
.PHONY: build-agents test-agents fuzztest-agents clean-agents help lint-agents package-agents tarball-agents
build-agents:
@# Help: runs `build` target for each sub directory/agents
@for s in $(filter-out $(NO_BUILD), $(SUBPROJECTS)); do \
echo "Building $$s"; \
$(MAKE) -C $$s build; \
done
test-agents:
@# Help: runs `test` target for each sub directory/agents
@for s in $(filter-out $(NO_UNIT), $(SUBPROJECTS)); do \
echo "Testing $$s"; \
$(MAKE) -C $$s test; \
done
fuzztest-agents:
@# Help: runs `fuzztest` target for each sub directory/agents
@for s in $(filter-out $(NO_FUZZ), $(SUBPROJECTS)); do \
echo "Fuzzing $$s"; \
$(MAKE) -C $$s fuzztest; \
done
lint-agents:
@# Help: runs `lint` target for each sub directory/agents
@for s in $(filter-out $(NO_LINT), $(SUBPROJECTS)); do \
echo "Linting $$s"; \
$(MAKE) -C $$s lint; \
done
tarball-agents:
@# Help: runs `tarball` target for each sub directory/agents
@for s in $(filter-out $(NO_TAR), $(SUBPROJECTS)); do \
echo "Tarballing $$s"; \
$(MAKE) -C $$s tarball; \
done
package-agents:
@# Help: runs `package` target for each sub directory/agents
@for s in $(filter-out $(NO_PACKAGE), $(SUBPROJECTS)); do \
echo "Packaging $$s"; \
$(MAKE) -C $$s package; \
done
clean-agents:
@# Help: runs `clean` target for each sub directory/agents
@for s in $(filter-out $(NO_CLEAN), $(SUBPROJECTS)); do \
echo "Cleaning $$s"; \
$(MAKE) -C $$s clean; \
done
help:
@printf "%-20s %s\n" "Target" "Description"
@printf "%-20s %s\n" "------" "-----------"
@make -pqR : 2>/dev/null \
| awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' \
| sort \
| egrep -v -e '^[^[:alnum:]]' -e '^$@$$' \
| xargs -I _ sh -c 'printf "%-20s " _; make _ -nB | (grep -i "^# Help:" || echo "") | tail -1 | sed "s/^# Help: //g"'