-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
31 lines (28 loc) · 1022 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
.PHONY: example
RECIPES=MarBock IPAnema
README=README.md
RT=${README}.tmp
all:
@echo you probably do not need to run \"make\"
# (re-)create examples in readme
examples:
sed '/<!-- BEGIN EXAMPLE -->/q' < ${README} > ${RT}
for r in ${RECIPES:%=example-recipes/%.yaml}; do \
printf 'Example recipe\n---\n```\n' >> ${RT}; \
cat $${r} >> ${RT}; \
printf '```\n' >> ${RT}; \
printf 'translated with `wbcrecipe -P units_output=metric ' \
>> ${RT}; \
printf -- '-P strength_output=plato`:\n```\n' >> ${RT}; \
PYTHONPATH=. python3 \
./bin/wbcrecipe -p ./WBCparams-example \
-P units_output=metric -P strength_output=plato \
$${r} >> ${RT}; \
printf '```\n\n' >> ${RT}; \
printf 'translated with `wbcrecipe -P units_output=us '>>${RT};\
printf -- '-P strength_output=sg`:\n```\n' >> ${RT}; \
PYTHONPATH=. python3 \
./bin/wbcrecipe -p ./WBCparams-example \
-P units_output=us -P strength_output=sg $${r} >> ${RT}; \
printf '```\n\n' >> ${RT} ; done
mv ${RT} ${README}