-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (37 loc) · 905 Bytes
/
Copy pathMakefile
File metadata and controls
46 lines (37 loc) · 905 Bytes
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
LOCALBASE?= /usr/local
PAGER?= less
.sinclude "Mk/defaults.mk"
_PLUGIN_DIRS!= ls -1d */*/ 2>/dev/null | \
while read _DIR; do \
if [ -f "$${_DIR}Makefile" ]; then \
echo "$${_DIR}"; \
fi; \
done
.for _DIR in ${_PLUGIN_DIRS}
_PLUGIN_${_DIR:S/\///g}= ${_DIR}
.endfor
list:
.for _DIR in ${_PLUGIN_DIRS}
@echo ${_DIR:S/\/$//}
.endfor
lint:
.for _DIR in ${_PLUGIN_DIRS}
@echo ">>> Linting ${_DIR:S/\/$//}"
@cd ${.CURDIR}/${_DIR} && make lint
.endfor
style:
.for _DIR in ${_PLUGIN_DIRS}
@echo ">>> Checking style ${_DIR:S/\/$//}"
@cd ${.CURDIR}/${_DIR} && make style
.endfor
clean:
.for _DIR in ${_PLUGIN_DIRS}
@cd ${.CURDIR}/${_DIR} && make clean
.endfor
setup:
@git submodule update --init
@for dir in Mk Keywords Templates Scripts; do \
ln -sfn opnsense-plugins/$$dir $$dir; \
done
@echo "Symlinks created. Build infrastructure ready."
.PHONY: list lint style clean setup