forked from linkeddata/rdflib.js
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
87 lines (61 loc) · 1.81 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
# rdflib.js Makefile
R=util.js uri.js term.js rdfparser.js n3parser.js identity.js query.js sparql.js sparqlUpdate.js jsonparser.js serialize.js updatesVia.js web.js
targets=$(addprefix dist/, rdflib-stample-0.1.1.js rdflib-stample-pg-extension-0.1.1.js)
coffeejs=$(patsubst %.coffee,%.js,$(wildcard *.coffee))
all: dist $(targets)
dist:
mkdir -p dist
dist/rdflib-stample-0.1.1.js: $R module.js
echo "(function(root, undef) {" > $@
cat $R module.js >> $@
echo "})(this);" >> $@
P=$(addprefix pointedgraph/, pg.js pointedGraph.js fetcherWithPromise.js)
dist/rdflib-stample-pg-extension-0.1.1.js: $P
echo "(function(root, undef) {" > $@
cat $P >> $@
echo "})(this);" >> $@
J=dist
X=jquery.uri.js jquery.xmlns.js
dist/rdflib-rdfa.js: $X $R rdfa.js module.js
cat $X > $@
echo "(function(root, undef) {" > $@
cat $R rdfa.js module.js >> $@
echo "})(this);" >> $@
jquery.uri.js:
wget http://rdfquery.googlecode.com/svn-history/trunk/jquery.uri.js -O $@
#
jquery.xmlns.js:
wget http://rdfquery.googlecode.com/svn-history/trunk/jquery.xmlns.js -O $@
upstream: jquery.uri.js jquery.xmlns.js
.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) $(coffeejs)
status:
@pwd
@git branch -v
@git status -s
writable:
@sed -i -re 's/git:\/\/github.com\//[email protected]:/' .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