1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-12-21 21:30:08 +00:00
Tims-Chat/Makefile

44 lines
1.4 KiB
Makefile
Raw Normal View History

2018-08-16 22:30:59 +00:00
FILES = $(shell find files -type f)
WCF_FILES = $(shell find files_wcf -type f)
JS_MODULE_FILES = $(shell find files_wcf/js/Bastelstu.be -type f)
all: be.bastelstu.chat.tar be.bastelstu.chat.tar.gz
be.bastelstu.chat.tar.gz: be.bastelstu.chat.tar
gzip -9 < $< > $@
be.bastelstu.chat.tar: files.tar files_wcf.tar acptemplates.tar templates.tar *.xml LICENSE sql/*.sql language/*.xml
2018-08-21 16:32:59 +00:00
tar cvf $@ --mtime="@$(shell git log -1 --format=%ct)" --owner=0 --group=0 --numeric-owner --exclude-vcs -- $^
2018-08-16 22:30:59 +00:00
files.tar: $(FILES)
files_wcf.tar: $(WCF_FILES) files_wcf/js/Bastelstu.be.Chat.min.js
acptemplates.tar: acptemplates/*.tpl
templates.tar: templates/*.tpl
%.tar:
2018-08-21 16:32:59 +00:00
tar cvf $@ --mtime="@$(shell git log -1 --format=%ct)" --owner=0 --group=0 --numeric-owner --exclude-vcs -C $* -- $(^:$*/%=%)
2018-08-16 22:30:59 +00:00
files_wcf/js/Bastelstu.be.Chat.min.js: Bastelstu.be.Chat.babel.js
yarn run terser --comments '/Copyright|stackoverflow/' -m -c pure_funcs=[console.debug] --verbose --timings -o $@ $^
Bastelstu.be.Chat.babel.js: Bastelstu.be.Chat.js .babelrc
yarn run babel $< --out-file $@
Bastelstu.be.Chat.js: $(JS_MODULE_FILES)
yarn run r_js -o require.build.js
2018-08-16 22:30:59 +00:00
clean:
-rm -f files.tar
-rm -f files_wcf.tar
-rm -f templates.tar
-rm -f acptemplates.tar
-rm -f Bastelstu.be.Chat.js
-rm -f Bastelstu.be.Chat.babel.js
-rm -f files_wcf/js/Bastelstu.be.Chat.min.js
distclean: clean
-rm -f be.bastelstu.chat.tar
-rm -f be.bastelstu.chat.tar.gz
.PHONY: distclean clean