-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (35 loc) · 1.1 KB
/
Makefile
File metadata and controls
44 lines (35 loc) · 1.1 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
LIBDIR := lib
include $(LIBDIR)/main.mk
$(LIBDIR)/main.mk:
ifneq (,$(shell grep "path *= *$(LIBDIR)" .gitmodules 2>/dev/null))
git submodule sync
git submodule update --init
else
ifneq (,$(wildcard $(ID_TEMPLATE_HOME)))
ln -s "$(ID_TEMPLATE_HOME)" $(LIBDIR)
else
git clone -q --depth 10 -b main \
https://github.com/martinthomson/i-d-template $(LIBDIR)
endif
endif
cddl_deps := cddl/coserv-autogen.cddl
cddl_deps += cddl/comid-autogen.cddl
cddl_deps += cddl/signed-coserv-autogen.cddl
cddl_deps += cddl/discovery-autogen.cddl
$(drafts_xml): $(cddl_deps)
$(cddl_deps): ; $(MAKE) -C cddl check
cddl/%.cddl: cddl/%.cddl.in ; $(MAKE) -C cddl
clean:: ; $(MAKE) -C cddl clean
lint:: http-lint openapi-lint
rfc-http-validate ?= rfc-http-validate
.SECONDARY: $(drafts_xml)
.PHONY: http-lint
http-lint: $(addsuffix .http-lint.txt,$(addprefix .,$(drafts)))
.PHONY: .%.http-lint.txt
.%.http-lint.txt: %.xml $(DEPS_FILES)
$(trace) $< -s http-lint $(rfc-http-validate) -q $<
@touch $@
openapi-spec-validator ?= openapi-spec-validator
.SECONDARY: $(drafts_xml)
.PHONY: openapi-lint
openapi-lint: ; $(MAKE) -C openapi check