forked from httpwg/http-extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (28 loc) · 927 Bytes
/
Makefile
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
LIBDIR := lib
DISABLE_RIBBON := true
INDEX_FORMAT := md
GHPAGES_COMMIT_TTL = 7
GHPAGES_BRANCH_TTL = 2
XML_RESOURCE_ORG_PREFIX := https://xml2rfc-tools-ietf-org.lucaspardue.com/public/rfc
include $(LIBDIR)/main.mk
$(LIBDIR)/main.mk:
ifneq (,$(shell grep "path *= *$(LIBDIR)" .gitmodules 2>/dev/null))
git submodule sync
git submodule update $(CLONE_ARGS) --init
else
git clone -q --depth 10 $(CLONE_ARGS) \
-b main https://github.com/martinthomson/i-d-template $(LIBDIR)
endif
$(GHPAGES_EXTRA):
ln -sf draft-ietf-httpbis-$@ $@
clean::
-rm -f $(GHPAGES_EXTRA)
lint:: http-lint
rfc-http-validate ?= rfc-http-validate
.SECONDARY: $(drafts_xml)
.PHONY: http-lint
http-lint: $(drafts_xml) http-lint-install
$(rfc-http-validate) -q -m sf.json $(filter-out http-lint-install,$^)
.PHONY: http-lint-install
http-lint-install:
@hash $(rfc-http-validate) 2>/dev/null || pip3 install rfc-http-validate typing_extensions