-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (27 loc) · 1000 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
37
38
39
#!make
SHELL := /bin/bash
DERIVABLE_YAML_SRC := $(wildcard concepts/concept-192*.yaml)
DERIVED_ADOC := $(patsubst concepts/%,sources/sections/terms/%,$(patsubst %.yaml,%.adoc,$(DERIVABLE_YAML_SRC)))
ADOC_GENERATOR := scripts/split_codes.rb
IEVDATA_DOWNLOAD_PATH := https://github.com/glossarist/iev-data/releases/download/v0.24.20201217/concepts-0.24.20201217.zip
# Two step process that requires an external call to `make`
# 1. Expand all concept YAML files into adoc files
# 2. Build the site
all: concepts/.done
$(MAKE) site/index.html
concepts.zip:
curl -sSL ${IEVDATA_DOWNLOAD_PATH} -o $@
concepts/.done: concepts.zip
unzip $<
touch concepts/.done
concepts/%.yaml: concepts/.done
sources/sections/terms/%.adoc: concepts/%.yaml $(ADOC_GENERATOR)
$(ADOC_GENERATOR) $< $@
site/index.html: $(DERIVED_ADOC)
bundle exec metanorma site generate
%.adoc:
clean:
rm -rf site/
distclean: clean
rm -rf concepts/ images/ sources/sections/terms concepts.zip
.PHONY: bundle all open clean