forked from jscad/OpenJSCAD.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
116 lines (97 loc) · 3.26 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
VERSION = 0.6.0
PREFIX = /usr/local
BIN = $(PREFIX)/bin/
LIB = $(PREFIX)/lib/openjscad/
NODE_MODULES = $(PREFIX)/lib/node_modules/
all::
@echo "make install deinstall tests clean"
install::
test -d ${NODE_MODULES}/openscad-openjscad-translator || npm -g install openscad-openjscad-translator
#test -d ${NODE_MODULES}/jquery || npm -g install jquery
scp openjscad $(BIN)
mkdir -p ${LIB}
scp openjscad.js ${LIB}
scp openscad.js ${LIB}
scp Blob.js ${LIB}
scp formats.js ${LIB}
scp lightgl.js ${LIB}
scp csg.js ${LIB}
scp openscad-openjscad-translator.js ${LIB}
scp underscore.js ${LIB}
mkdir -p cache; chmod a+rw cache
deinstall::
rm -rf ${NODE_MODULES}openscad-openjscad-translator
rm $(BIN)/openjscad
rm -rf ${LIB}
tests::
openjscad examples/logo.jscad
openjscad examples/logo.jscad -of stlb -o examples/logo-binary.stl
openjscad examples/logo.jscad -of amf
openjscad examples/logo.amf -o examples/logo-fromAMF.jscad
openjscad examples/example001.jscad
openjscad examples/example001.jscad -o examples/example001-fromJSCAD.stl
openjscad examples/example001.jscad -o examples/example001-fromJSCAD.amf
openjscad examples/example001.scad -o examples/example001-fromSCAD.stl
openjscad examples/example001.scad -o examples/example001-fromSCAD.amf
openjscad examples/example001.scad -o examples/example001-fromSCAD.jscad
openjscad examples/transparency.jscad -o examples/transparency.amf
cd examples/platonics && make
cd examples; openjscad globe.jscad
cd examples/include-test && make
# -- enable if you have openscad installed ('unsetenv DISPLAY' perhaps too)
# openscad examples/example001.scad -o examples/example001-fromSCADviaOpenSCAD.stl
openjscad examples/name_plate.jscad --name "Just Me" --title "Geek" -o examples/JustMe_Geek_name_plate.amf
openjscad examples/benchmark.jscad
clean::
rm -f examples/logo.stl examples/logo-binary.stl examples/example001.stl examples/example001-from* examples/benchmark.stl
cd examples/platonics && make clean
cd examples/include-test && make clean
# TODO:
# - locally submodule of openscad-openjscad-translator, see http://git-scm.com/book/en/Git-Tools-Submodules
# --- developers only below
push::
git remote set-url origin git@github.com:Spiritdude/OpenJSCAD.org.git
git push -u origin master
push-dev::
git remote set-url origin git@github.com:Spiritdude/OpenJSCAD.org.git
git push -u origin dev
pull::
git remote set-url origin git@github.com:Spiritdude/OpenJSCAD.org.git
git pull -u origin master
dev-to-master::
git checkout dev
git merge -s ours master
git checkout master
git merge dev
master-to-dev::
git checkout master
git merge -s ours dev
git checkout dev
git merge master
dist::
cd ..; tar cfz Backup/openjscad.org-${VERSION}.tar.gz "--exclude=*.git/*" OpenJSCAD.org/
backup::
scp ../Backup/openjscad.org-${VERSION}.tar.gz the-labs.com:Backup/
edit::
dee4 index.html Makefile LICENSE README.md *.css *.js openjscad
live::
# -- do not enable --delete as it will destroy stats folder
rsync -av --exclude=.git --exclude=cache/ ./ delta:Sites/openjscad.org/
pjName := OpenJSCAD
docker:
docker run \
--name ${pjName} \
--rm \
-ti \
-p 3080:80 \
-p 3088:8080 \
-p 3030:3000 \
-p 3000:8000 \
-v $$(pwd):/root/${pjName} \
mooxe/node \
/bin/bash
in:
docker exec \
-ti \
${pjName} \
/bin/bash