c2a24c8539f54494d2a89df13fc55ba7b4845096
Christian Fraß [mod] tools

Christian Fraß authored 3 years ago

1) ## directories
2) dir_source := source
Christian Fraß [add] lib:plankton

Christian Fraß authored 3 years ago

3) dir_temp := temp
Christian Fraß [mod] tools

Christian Fraß authored 3 years ago

4) dir_build := build
5) dir_lib := lib
6) 
7) ## commands
Christian Fraß [add] lib:plankton

Christian Fraß authored 3 years ago

8) cmd_concatenate := cat
Christian Fraß [mod] tools

Christian Fraß authored 3 years ago

9) cmd_dir_make := mkdir --parents
10) cmd_copy := cp --recursive --update --verbose
11) cmd_tsc := tsc --lib es2015,dom --target es6
12) cmd_remove := rm --force
13) cmd_link := ln --symbolic
Christian Fraß [add] lib:plankton

Christian Fraß authored 3 years ago

14) cmd_log := echo "--"
Christian Fraß [mod] tools

Christian Fraß authored 3 years ago

15) 
Christian Fraß [mod] tools:makefile

Christian Fraß authored 3 years ago

16) ## rules
Christian Fraß [mod] tools

Christian Fraß authored 3 years ago

17) all: ${dir_build}/sql ${dir_build}/manage
18) .PHONY: all
19) 
20) ${dir_build}/sql:
21) 	@ ${cmd_dir_make} ${dir_build}/sql
22) 	@ ${cmd_copy} ${dir_source}/sql/* ${dir_build}/sql/
23) .PHONY: ${dir_build}/sql
24) 
Christian Fraß [add] lib:plankton

Christian Fraß authored 3 years ago

25) ${dir_temp}/plankton.d.ts:
26) 	@ ${cmd_log} "fetching plankton declaration"
27) 	@ ${cmd_dir_make} ${dir_temp}
28) 	@ schwamm --include=${dir_lib}/plankton/plankton.swm.json --output=dump:logic-decl > ${dir_temp}/plankton.d.ts
29) 
30) ${dir_temp}/plankton.js:
31) 	@ ${cmd_log} "fetching plankton implementation"
32) 	@ ${cmd_dir_make} ${dir_temp}
33) 	@ schwamm --include=${dir_lib}/plankton/plankton.swm.json --output=dump:logic-impl > ${dir_temp}/plankton.js
34) 
35) ${dir_temp}/manage-core.js: \
36) 	${dir_temp}/plankton.d.ts \
Christian Fraß [mod] tools

Christian Fraß authored 3 years ago

37) 	${dir_source}/types.ts \
38) 	${dir_source}/helpers/string.ts \
Christian Fraß [add] lib:plankton

Christian Fraß authored 3 years ago

39) 	${dir_source}/helpers/object.ts \
Christian Fraß [mod] makefile

Christian Fraß authored 3 years ago

40) 	${dir_source}/helpers/json.ts \
Christian Fraß [mod] tools

Christian Fraß authored 3 years ago

41) 	${dir_source}/helpers/file.ts \
42) 	${dir_source}/helpers/database.ts \
43) 	${dir_source}/helpers/misc.ts \
44) 	${dir_source}/helpers/module.ts \
45) 	${dir_source}/helpers/storage.ts \
46) 	${dir_source}/helpers/repository.ts \
47) 	${dir_source}/entities/concept.ts \
48) 	${dir_source}/repositories/language.ts \
49) 	${dir_source}/repositories/type.ts \
50) 	${dir_source}/repositories/tag.ts \
Christian Fraß [mod] makefile

Christian Fraß authored 3 years ago

51) 	${dir_source}/repositories/expression.ts \
Christian Fraß [mod] tools

Christian Fraß authored 3 years ago

52) 	${dir_source}/repositories/concept.ts \
53) 	${dir_source}/services/language.ts \
54) 	${dir_source}/services/type.ts \
55) 	${dir_source}/services/tag.ts \
Christian Fraß [mod] makefile

Christian Fraß authored 3 years ago

56) 	${dir_source}/services/expression.ts \
Christian Fraß [mod] tools

Christian Fraß authored 3 years ago

57) 	${dir_source}/services/concept.ts \
Christian Fraß [add] lib:plankton

Christian Fraß authored 3 years ago

58) 	${dir_source}/api/master.ts \
59) 	${dir_source}/api/actions/concept_add.ts \
60) 	${dir_source}/api/actions/translate.ts \
Christian Fraß [mod] tools

Christian Fraß authored 3 years ago

61) 	${dir_source}/main.ts
Christian Fraß [add] lib:plankton

Christian Fraß authored 3 years ago

62) 	@ ${cmd_log} "compiling …"
63) 	@ ${cmd_dir_make} ${dir_temp}
Christian Fraß [mod] tools

Christian Fraß authored 3 years ago

64) 	@ ${cmd_tsc} $^ --outFile $@
Christian Fraß [add] lib:plankton

Christian Fraß authored 3 years ago

65) 
66) ${dir_build}/manage: ${dir_temp}/plankton.js ${dir_temp}/manage-core.js
67) 	@ ${cmd_log} "linking …"
68) 	@ ${cmd_dir_make} ${dir_build}
69) 	@ echo "#!/usr/bin/env node" > $@
70) 	@ ${cmd_concatenate} $^ >> $@