-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
74 lines (54 loc) · 2.54 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
all: public/index.xhtml public/destriant.js public/destriant.css fetch-ext
public/index.html: src/xhtml/main.html $(shell find src/xhtml -name "*.xhtml")
head -n-2 $< > $@
cat src/xhtml/*.xhtml >> $@
echo "</body></html>" >> $@
public/index.xhtml: public/index.html
echo '<?xml version="1.0" encoding="utf-8"?>' > $@
tail -n+2 $< >> $@
public/destriant.js: src/js/main.js $(shell find src/js -name "*.js" -not -name "main.js" -not -name "last.js") src/js/last.js
echo "/*! Destriant (https://gitlab.com/artefact2/destriant) */" > $@
echo "/*! Copyright 2019-2021 Destriant contributors (https://gitlab.com/artefact2/destriant/-/graphs/master) */" >> $@
echo "/*! Licensed under the Apache License, version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) */" >> $@
echo "\"use strict\";" >> $@
tail -q -n+18 $^ >> $@
public/destriant.css: src/scss/main.scss $(shell find src/scss -name "*.scss" -not -name "main.scss")
cat $^ | sassc -s -t compressed $@
fetch-ext: public/ext/bootstrap.min.css public/ext/bootstrap.bundle.min.js public/ext/bootstrap.bundle.min.js.map public/ext/jquery.min.js public/ext/localforage.min.js public/ext/d3.v5.min.js public/ext/c3.min.js public/ext/c3.min.css
public/ext:
mkdir $@
public/destriant-ext:
mkdir $@
public/ext/bootstrap.min.css:
make public/ext
wget -O $@ "https://bootswatch.com/4/darkly/bootstrap.min.css"
public/ext/bootstrap.bundle.min.js:
wget -O $@ "https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.bundle.min.js"
public/ext/bootstrap.bundle.min.js.map:
wget -O $@ "https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.bundle.min.js.map"
public/ext/jquery.min.js:
make public/ext
wget -O $@ "https://code.jquery.com/jquery-3.4.1.min.js"
public/ext/localforage.min.js:
make public/ext
wget -O $@ "https://raw.githubusercontent.com/localForage/localForage/1.7.3/dist/localforage.min.js"
public/ext/d3.v5.min.js:
make public/ext
wget -O $@ "https://d3js.org/d3.v5.min.js"
public/ext/c3.min.js:
make public/ext
wget -O $@ "https://raw.githubusercontent.com/c3js/c3/v0.7.8/c3.min.js"
public/ext/c3.min.css:
make public/ext
wget -O $@ "https://raw.githubusercontent.com/c3js/c3/v0.7.8/c3.min.css"
public/destriant-ext/static.json:
make public/destriant-ext
wget -O $@ "https://artefact2.gitlab.io/destriant-ext/static.json"
host: public/destriant-ext/static.json
xdg-open 'http://[::1]:24493' &
php -S '[::1]:24493' -t public
clean:
rm -f public/destriant.js public/destriant.css
dist-clean: clean
rm -Rf public/ext public/destriant-ext
.PHONY: all fetch-ext host clean dist-clean