forked from linkeddata/rdflib.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
73 lines (54 loc) · 1.51 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
# rdflib.js Makefile
R=util.js uri.js term.js rdfparser.js n3parser.js identity.js parseRDFa.js \
patchParser.js query.js sparql.js update.js jsonparser.js serialize.js \
updatesVia.js web.js
targets=$(addprefix dist/, rdflib-node.js)
# coffeejs=$(patsubst %.coffee,%.js,$(wildcard *.coffee))
PATH:=./node_modules/.bin:${PATH}
all: dist $(targets) dist/rdflib.js
size:
wc $R
dist/rdflib.js: dist/rdflib-node.js
browserify -r ./dist/rdflib-node.js:rdflib --exclude "xmlhttprequest" --standalone "\$$rdf" > dist/rdflib.js
dist:
mkdir -p dist
dist/rdflib-node.js: $R module.js
# dist/rdflib.js: $R module.js
echo "(function(root, undef) {" > $@
cat $R module.js >> $@
date '+$$rdf.buildTime = "%Y-%m-%dT%H:%M:%S";' >> $@
echo '})(this);' >> $@
.PHONY: detach gh-pages
detach:
git checkout origin/master
git reset --hard HEAD
# WARNING .. don't do this if you have uncommitted local changes
#
gh-pages: detach
git branch -D gh-pages ||:
git checkout -b gh-pages
make -B
git add -f dist/*.js *.js
git commit -m 'gh-pages: update to latest'
git push -f origin gh-pages
git checkout master
clean:
rm -f $(targets)
rm -f dist/rdflib.js
status:
@pwd
@git branch -v
@git status -s
writable:
@sed -i -re 's/git:\/\/github.com\//git@github.com:/' .git/config
# npm install -g coffee-script nodeunit
# SRC=$(wildcard *.coffee */*.coffee)
# LIB=$(SRC:%.coffee=%.js)
# %.js: %.coffee
# coffee -bp $< > $@
# .PHONY: coffee
# coffee: $(LIB)
.PHONY: test
test: # $(LIB)
@nodeunit tests/*.js
make -C tests/serialize