generated from martinthomson/internet-draft-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
41 lines (30 loc) · 1.11 KB
/
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
37
38
39
40
41
LIBDIR := lib
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
CDDL_DIR := cddl/
CE_DIR := concise-evidence/
CORIM_DIR := draft-ietf-rats-corim/cddl/
# Import profile frags - no dependencies
include $(CDDL_DIR)profile-frags.mk
PROFILE_DEPS := $(addprefix $(CDDL_DIR), $(PROFILE_FRAGS))
define cddl_targets
$(drafts_xml):: $(CDDL_DIR)$(1)-autogen.cddl
$(drafts_html):: $(CDDL_DIR)$(1)-autogen.cddl
$(drafts_txt):: $(CDDL_DIR)$(1)-autogen.cddl
$(CDDL_DIR)$(1)-autogen.cddl: $(2)
$(MAKE) -C $(CDDL_DIR)
endef # cddl_targets
$(eval $(call cddl_targets,profile,$(PROFILE_DEPS)))
$(eval $(call cddl_targets,irim,$(PROFILE_DEPS)))
$(eval $(call cddl_targets,ice,$(PROFILE_DEPS)))
$(eval $(call cddl_targets,ispdm,$(PROFILE_DEPS)))
clean:: ; $(MAKE) -C $(CDDL_DIR) clean
clean-extra:: clean ; $(MAKE) -C $(CDDL_DIR) clean-extra
debug:: ; echo $(drafts_xml) $(drafts_html) $(drafts_txt)