forked from spudtrooper/rdiorb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·64 lines (46 loc) · 1 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
NAME=rdio
VERSION=0.0.99
DATE=$(shell date +"%Y-%m-%d")
.PHONY: test
%.gemspec:%.gemspec.in
cat $< | sed \
-e 's/%NAME%/$(NAME)/g' \
-e 's/%DATE%/$(DATE)/g' \
-e 's/%VERSION%/$(VERSION)/g' \
> $@
.rdio_access_token: create_access_token
chmod +x $<
./$<
$(NAME)-$(VERSION).gem: $(NAME).gemspec rdoc
gem build $<
lib/rdio/datatypes.rb: gen_types
chmod +x $<
./$< > $@
lib/rdio/api.rb: gen_api
chmod +x $<
./$< > $@
all: gem
gem: $(NAME)-$(VERSION).gem
push: $(NAME)-$(VERSION).gem
gem push $<
install: $(NAME)-$(VERSION).gem
sudo gem install $<
rdoc:
rdoc --title "Rd.io API" `find lib -name "*.rb"`
test:
ruby test/suite.rb
runtest: test/test_*.rb
@for f in $^; do\
echo --- $$f ---;\
ruby $$f;\
done
api: lib/rdio/api.rb
datatypes: lib/rdio/datatypes.rb
tests:
chmod +x $(NAME)
./$(NAME) test/logfile.txt
clean:
rm -f `find . -name "*~"` $(NAME).gemspec $(NAME)-*.gem
docclean:
rm -rf doc
allclean: docclean clean