faf7e12c13eaaaa19677086fd5b2f06c4bca86a5
Christian Fraß [mod] tools

Christian Fraß authored 3 years ago

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

Christian Fraß authored 3 years ago

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

Christian Fraß authored 3 years ago

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

Christian Fraß authored 3 years ago

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

Christian Fraß authored 3 years ago

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

Christian Fraß authored 3 years ago

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

Christian Fraß authored 3 years ago

tools/makefile 15) 
Christian Fraß [mod] tools:makefile

Christian Fraß authored 3 years ago

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

Christian Fraß authored 3 years ago

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

Christian Fraß authored 3 years ago

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

Christian Fraß authored 3 years ago

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

Christian Fraß authored 3 years ago

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

Christian Fraß authored 3 years ago

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

Christian Fraß authored 3 years ago

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

Christian Fraß authored 3 years ago

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

Christian Fraß authored 3 years ago

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

Christian Fraß authored 3 years ago

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

Christian Fraß authored 3 years ago

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

Christian Fraß authored 3 years ago

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

Christian Fraß authored 3 years ago

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

Christian Fraß authored 3 years ago

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

Christian Fraß authored 3 years ago

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

Christian Fraß authored 3 years ago

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