summaryrefslogtreecommitdiff
path: root/Makefile.am
blob: 9f98b6ab6b84edd3d30af1d034ab8066da04f695 (plain)
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# This Makefile.am is in the public domain

SUBDIRS = css js .

EXTRA_DIST = \
 favicon-taler.ico \
 js/bootstrap.bundle.min.js \
 js/chrome-any.d.ts \
 js/taler-wallet-lib.ts \
 js/bootstrap.min.js \
 js/taler-wallet-lib.js \
 js/tsconfig.json \
 licensing.rst \
 templates/base.html \
 AUTHORS

# Some file may be missing here...
pkgdata_DATA = \
  favicon-taler.ico


all: js/taler-wallet-lib.min.js js/taler-wallet-lib.js.tar.gz js/taler-wallet-lib.js
install: all

js/%.min.js: %.js
	python3 -m jsmin $< > $@

js/%.js.tar.gz: %.js
	tar czf $@ $<

js/taler-wallet-lib.js: js/taler-wallet-lib.ts js/chrome-any.d.ts
if HAVE_TSC
	tsc
else
	@echo
	@if [ ! -f "$@" ] ; then \
	  echo "*** Error: typescript compiler 'tsc' is missing," \
	       "can't build" $@ ; \
	  echo ; \
	  exit 1 ; \
	else \
	   echo "*** Warning: typescript compiler 'tsc' is missing," \
	        "using pre-build" $@ ; \
	  touch "$@"; \
	fi
	@echo
endif