a7ec2dea46eb5c192fca308b7daeb59c9fb6fb89
Christian Fraß [ini]

Christian Fraß authored 3 years ago

1) ## consts
2) 
3) dir_lib := lib
4) dir_source := source
5) dir_temp := temp
6) dir_build := build
7) 
8) 
9) ## commands
10) 
11) cmd_log := echo "--"
12) cmd_mkdir := mkdir -p
13) cmd_cp := cp
14) cmd_cat := cat
15) cmd_tsc := tsc --lib es2017
16) cmd_chmod := chmod
17) 
18) 
19) ## rules
20) 
Christian Fraß [mod] web-irc -> wirc

Christian Fraß authored 3 years ago

21) all: node_modules ${dir_build}/wirc
Christian Fraß [ini]

Christian Fraß authored 3 years ago

22) .PHONY: all
23) 
24) node_modules:
25) 	@ ${cmd_log} "copying node modules …"
26) 	@ ${cmd_mkdir} ${dir_build}/node_modules
27) 	@ ${cmd_cp} -ru ${dir_lib}/node/node_modules/* ${dir_build}/node_modules/
28) .PHONY: node_modules
29) 
Christian Fraß [mod] web-irc -> wirc

Christian Fraß authored 3 years ago

30) ${dir_build}/wirc: ${dir_temp}/head.js ${dir_lib}/plankton/plankton.js ${dir_temp}/wirc-unlinked.ts
Christian Fraß [ini]

Christian Fraß authored 3 years ago

31) 	@ ${cmd_log} "linking …"
32) 	@ ${cmd_mkdir} $(dir $@)
33) 	@ ${cmd_cat} $^ > $@
34) 	@ ${cmd_chmod} +x $@
35) 
36) ${dir_temp}/head.js:
37) 	@ echo "#!/usr/bin/env node" > $@
38) 
Christian Fraß [mod] web-irc -> wirc

Christian Fraß authored 3 years ago

39) ${dir_temp}/wirc-unlinked.ts: ${dir_lib}/plankton/plankton.d.ts ${dir_source}/main.ts