summaryrefslogtreecommitdiff
path: root/talermerchantdemos/blog/static/web-common/Makefile.am
blob: 71c1d68eadec99815a5418ee54eaabe1e7ba74ca (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
48
49
50
51
# This Makefile.am is in the public domain
EXTRA_DIST = \
 style.css \
 taler-wallet-lib.ts \
 chrome-any.d.ts \
 logo-2015-medium.png \
 licensing.rst \
 favicon-taler.ico \
 dropdown-navbar.html \
 lang.html \
 lang.css \
 lang.js \
 dropdown-navbar_style.css \
 dropdown-navbar_script.js \
 taler-fallback.css \
 tsconfig.json \
 AUTHORS

# Some file may be missing here...
pkgdata_DATA = \
  dropdown-navbar.html \
  favicon-taler.ico \
  logo-2015-medium.png \
  style.css \
  taler-wallet-lib.js

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

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

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

taler-wallet-lib.js: taler-wallet-lib.ts 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