-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (25 loc) · 824 Bytes
/
Makefile
File metadata and controls
37 lines (25 loc) · 824 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
REVIEWS = $(shell find . -name '*.src-re' | sed 's/ /\\ /g')
SOURCES = $(REVIEWS:.src-re=.re)
XMLS = $(REVIEWS:.src-re=.xml)
HTMLS = $(REVIEWS:.src-re=.html)
SRCDIR = src
NPMDIR = $(shell npm bin)
BE = bundle exec
build: clean all
git submodule init
git submodule update
clean:
rm $(SOURCES) $(XMLS) $(HTMLS) -f
%.re: %.src-re
$(NPMDIR)/lsc scripts/build.ls "$<" "$@"
%.rawxml: %.re
$(BE) review-compile --target idgxml "$<" --yaml config.yml > "$@"
%.xml: %.rawxml
sed -e 's/file:\/\/src/file:\/\/\/C:\/Users\/hakatashi\/Documents\/src/g' "$<" > "$@"
%.html: %.src-re
cp "$<" "$(basename $<).re"
cp --parents layouts/layout.html.erb "$(dir $<)"
cd "$(dir $<)"; $(BE) review-compile --target html "$(notdir $<)" --yaml ../../config.yml > "$(notdir $@)"
html: $(HTMLS)
xml: $(XMLS)
all: $(HTMLS) $(XMLS)