28f7e7c96a09b51e6cc91a364fa18ae64e1c22c0
Christian Fraß [mod] client:translate

Christian Fraß authored 3 years ago

1) ## directories
2) 
Christian Fraß [add] client

Christian Fraß authored 3 years ago

3) dir_lib := lib
4) dir_source := source
5) dir_temp := temp
6) dir_build := build
7) 
Christian Fraß [mod] client:translate

Christian Fraß authored 3 years ago

8) 
Christian Fraß [add] client

Christian Fraß authored 3 years ago

9) ## commands
Christian Fraß [mod] client:translate

Christian Fraß authored 3 years ago

10) 
Christian Fraß [add] client

Christian Fraß authored 3 years ago

11) cmd_log := echo "--"
12) cmd_copy := cp --recursive --update --verbose
13) cmd_concatenate := cat
14) cmd_dir_make := mkdir --parents
Christian Fraß [mod] client:translate

Christian Fraß authored 3 years ago

15) cmd_sassc := sassc
16) 
Christian Fraß [add] client

Christian Fraß authored 3 years ago

17) 
18) ## rules
Christian Fraß [mod] client:translate

Christian Fraß authored 3 years ago

19) 
Christian Fraß [add] client

Christian Fraß authored 3 years ago

20) all: ${dir_build}/index.html ${dir_build}/logic.js ${dir_build}/style.css
21) .PHONY: all
22) 
23) ${dir_temp}/plankton.d.ts:
24) 	@ ${cmd_log} "fetching plankton declaration"
25) 	@ ${cmd_dir_make} ${dir_temp}
26) 	@ schwamm --include=${dir_lib}/plankton/plankton.swm.json --output=dump:logic-decl > ${dir_temp}/plankton.d.ts
27) 
28) ${dir_temp}/plankton.js:
29) 	@ ${cmd_log} "fetching plankton implementation"
30) 	@ ${cmd_dir_make} ${dir_temp}
31) 	@ schwamm --include=${dir_lib}/plankton/plankton.swm.json --output=dump:logic-impl > ${dir_temp}/plankton.js
32) 
33) ${dir_build}/index.html: ${dir_source}/structure.html
34) 	@ ${cmd_log} "structure …"
35) 	@ ${cmd_dir_make} ${dir_build}
36) 	@ ${cmd_copy} $^ $@
37) 
38) ${dir_temp}/logic-unlinked.js: ${dir_source}/logic.js
39) 	@ ${cmd_log} "logic:compiling …"
40) 	@ ${cmd_dir_make} ${dir_temp}
41) 	@ ${cmd_concatenate} $^ > $@
42) 
43) ${dir_build}/logic.js: ${dir_temp}/plankton.js ${dir_temp}/logic-unlinked.js
44) 	@ ${cmd_log} "logic:linking …"
45) 	@ ${cmd_dir_make} ${dir_build}
46) 	@ ${cmd_concatenate} $^ > $@
47) 
Christian Fraß [mod] client:translate

Christian Fraß authored 3 years ago

48) ${dir_build}/style.css: ${dir_source}/style.sass
Christian Fraß [add] client

Christian Fraß authored 3 years ago

49) 	@ ${cmd_log} "style …"
Christian Fraß [mod] client:translate

Christian Fraß authored 3 years ago

50) 	@ ${cmd_concatenate} $^ | ${cmd_sassc} --stdin > $@