-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
55 lines (34 loc) · 1.41 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
PATH := ./node_modules/.bin:$(PATH)
all: clean dist/mac.zip dist/linux.zip dist/windows.zip
clean:
rm -rf dist
mac: dist/mac.zip
linux: dist/linux.zip
windows: dist/windows.zip
.PHONY: all clean mac linux windows
node_modules:
npm install
dist/mac:
mkdir -p dist/mac/
dist/linux:
mkdir -p dist/linux/
dist/windows:
mkdir -p dist/windows/
dist/mac/inkscape-svgo: node_modules dist/mac
pkg src/inkscape-svgo.js --targets node10-osx-x64 --out-path=dist/mac
dist/linux/inkscape-svgo: node_modules dist/linux
pkg src/inkscape-svgo.js --targets node10-linux-x64 --out-path=dist/linux
dist/windows/inkscape-svgo.exe: node_modules dist/windows
pkg src/inkscape-svgo.js --targets node10-win-x64 --out-path=dist/windows
dist/mac/inkscape-svgo.inx: dist/mac
cp inkscape-svgo.inx dist/mac/inkscape-svgo.inx
dist/linux/inkscape-svgo.inx: dist/linux
cp inkscape-svgo.inx dist/linux/inkscape-svgo.inx
dist/windows/inkscape-svgo.inx: dist/windows
sed 's/<command reldir="extensions">inkscape-svgo/<command reldir="extensions">inkscape-svgo.exe/g' inkscape-svgo.inx > dist/windows/inkscape-svgo.inx
dist/mac.zip: dist/mac/inkscape-svgo dist/mac/inkscape-svgo.inx
cd dist/mac && zip ../mac.zip *
dist/linux.zip: dist/linux/inkscape-svgo dist/linux/inkscape-svgo.inx
cd dist/linux && zip ../linux.zip *
dist/windows.zip: dist/windows/inkscape-svgo.exe dist/windows/inkscape-svgo.inx
cd dist/windows && zip ../windows.zip *