type2/tools/makefile
Christian Fraß d67ca438be [mod] cleanup
2021-09-19 01:57:25 +02:00

24 lines
605 B
Makefile

## dirs
dir_temp := temp
dir_build := build
## commands
cmd_log := echo "--"
cmd_directory_create := mkdir -p
cmd_concatenate := cat
cmd_chmod := chmod
cmd_typescript_compile := tsc --removeComments --lib es2018
## rules
build/type2: source/head.js lib/plankton/plankton.js temp/unlinked.js
@ ${cmd_log} "linking …"
@ ${cmd_directory_create} ${dir_build}
@ ${cmd_concatenate} $^ > $@
@ ${cmd_chmod} +x $@
temp/unlinked.js: lib/plankton/plankton.d.ts source/base.ts source/type2.ts
@ ${cmd_log} "compiling …"
@ ${cmd_directory_create} ${dir_temp}
@ ${cmd_typescript_compile} $^ --outFile $@