-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
33 lines (25 loc) · 1.36 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
JSDEPLOY = $(DESTDIR)/js
JSCOMPILER ?= ./node_modules/terser/bin/terser
JSOPTIONS = --mangle reserved=['FormData','Ext','Zarafa','container','settings','properties','languages','serverconfig','user','version','urlActionData','console','Tokenizr','module','define','global','require','proxy','_','dgettext','dngettext','dnpgettext','ngettext','pgettext','onResize','tinymce','resizeLoginBox','userManager','DOMPurify','PDFJS','odf','L','GeoSearch'] \
--compress ecma=2015,computed_props=false
$(DESTDIR)/%: %
mkdir -p $$(dirname $@)
cp $< $@
MSGFMT ?= msgfmt
JSFILES = js/Google2FAPlugin.js \
js/data/Configuration.js \
js/data/ResponseHandler.js \
js/settings/Category.js \
js/settings/GeneralSettingsWidget.js
COPYFILES = manifest.xml config.php \
$(wildcard resources/css/*.css) \
$(wildcard resources/icons/*.png) \
$(shell find php/ -type f \! -name '.*' -not -path '*/tests/*' -not -path '*/examples/*' -not -path '*/vendor/bin/*' -not -path '*/.github/*' -not -iname '*.py' -not -iname 'naturalselection')
COPYFILESDEST = $(addprefix $(DESTDIR)/, $(COPYFILES))
all: $(COPYFILESDEST) $(JSDEPLOY)/google2fa.js
$(JSDEPLOY)/google2fa.js: $(JSFILES)
mkdir -p $(DESTDIR)/js
cat $(JSFILES) > $(@:.js=-debug.js)
$(JSCOMPILER) $(@:.js=-debug.js) --output $@ \
--source-map "url='$(shell basename [email protected])'" \
$(JSOPTIONS)