-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (32 loc) · 1 KB
/
Copy pathMakefile
File metadata and controls
43 lines (32 loc) · 1 KB
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
# SPDX-FileCopyrightText: Yoran Heling <[email protected]>
# SPDX-License-Identifier: AGPL-3.0-only
.PHONY: release debug clean distclean
PRISM_VER=1.29.0
PRISM_CDN=https://cdnjs.cloudflare.com/ajax/libs/prism/${PRISM_VER}/
BIN_DEPS=main.cr style.css lib/script.js
release: ${BIN_DEPS}
shards build --release
debug: ${BIN_DEPS}
shards build --debug
clean:
rm -rf lib/*.js
rm -rf bin/
distclean: clean
rm -rf lib/
lib:
mkdir -p lib
lib/script.js: script.js lib/prism-${PRISM_VER}.min.js lib/prism-${PRISM_VER}-sql.min.js | lib
(\
echo '// @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat';\
echo '// @source: https://github.com/PrismJS/prism';\
cat lib/prism-${PRISM_VER}.min.js;\
echo;\
cat lib/prism-${PRISM_VER}-sql.min.js;\
echo;\
cat script.js;\
echo '// @license-end';\
) >$@
lib/prism-${PRISM_VER}.min.js: | lib
curl ${PRISM_CDN}prism.min.js -so $@
lib/prism-${PRISM_VER}-sql.min.js: | lib
curl ${PRISM_CDN}components/prism-sql.min.js -so $@