-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (28 loc) · 990 Bytes
/
Makefile
File metadata and controls
38 lines (28 loc) · 990 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
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
include cddl/frags.mk
EXAMPLES_JSON := $(addprefix cddl/,$(CMW_JSON_EXAMPLES))
EXAMPLES_JSON += $(addprefix cddl/,$(EAT_JSON_EXAMPLES))
EXAMPLES_DIAG := $(addprefix cddl/,$(CMW_CBOR_EXAMPLES))
EXAMPLES_DIAG += $(addprefix cddl/,$(EAT_CBOR_EXAMPLES))
EXAMPLES_PRETTY := $(EXAMPLES_DIAG:.diag=.pretty)
CDDL_FILES := $(addprefix cddl/,$(CMW_FRAGS))
CDDL_FILES += $(addprefix cddl/,$(EAT_FRAGS))
$(drafts_txt):: $(EXAMPLES_DIAG) $(EXAMPLES_JSON) $(EXAMPLES_PRETTY) $(CDDL_FILES)
$(EXAMPLES_PRETTY): $(EXAMPLES_DIAG)
$(MAKE) -C cddl
cddl/%.cddl: cddl/%.cddl.in ; $(MAKE) -C cddl
clean::
$(MAKE) -C cddl clean