-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (28 loc) · 827 Bytes
/
Makefile
File metadata and controls
37 lines (28 loc) · 827 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
.PHONY: clean
TARGET-DIR=l-systems-material
BOOK-SOURCE=book
BOOK-RESULT=docs
BOOK-TARGET=${TARGET-DIR}/${BOOK-SOURCE}
CODE-RESULT=code
CODE-TARGET=${TARGET-DIR}/${CODE-RESULT}
README-SOURCE=MATERIAL-README.md
README-TARGET=${TARGET-DIR}/README.md
ARCHIVE=${TARGET-DIR}.tar.gz
VENDOR-RESULT=${CODE-RESULT}/vendor
${ARCHIVE}: ${BOOK-TARGET} ${CODE-TARGET} ${README-TARGET}
tar cvfz $@ ${TARGET-DIR}
${BOOK-TARGET}: ${BOOK-RESULT} ${TARGET-DIR}
cp -r $< $@
${BOOK-RESULT}:
cd ${BOOK-SOURCE} && mdbook build
${CODE-TARGET}: ${CODE-RESULT} ${TARGET-DIR} ${VENDOR-RESULT}
find code -type d -name target | xargs rm -rf
cp -r $< $@
${README-TARGET}: ${README-SOURCE}
cp $< $@
${TARGET-DIR}:
mkdir -p $@
${VENDOR-RESULT}:
cd code && cargo vendor
clean:
rm -rf ${ARCHIVE} ${TARGET-DIR} ${BOOK-RESULT} ${VENDOR-RESULT}