Skip to content
This repository
Browse code

Remove needless targets from Makefile

  • Loading branch information...
commit d6077b44d7506bfb1dc31c5f8085d38d9bbea18b 1 parent c738bf3
Andrew Thompson authored July 13, 2011

Showing 1 changed file with 7 additions and 91 deletions. Show diff stats Hide diff stats

  1. 98  Makefile
98  Makefile
@@ -3,7 +3,7 @@ RIAK_TAG	 = $(shell git describe --tags)
3 3
 REVISION	?= $(shell echo $(RIAK_TAG) | sed -e 's/^$(REPO)-//')
4 4
 PKG_VERSION	?= $(shell echo $(REVISION) | tr - .)
5 5
 
6  
-.PHONY: rel stagedevrel deps
  6
+.PHONY: rel stagedevrel deps test
7 7
 
8 8
 all: deps compile
9 9
 
@@ -16,69 +16,27 @@ deps:
16 16
 clean:
17 17
 	./rebar clean
18 18
 
19  
-distclean: clean devclean relclean ballclean
  19
+distclean: clean
20 20
 	./rebar delete-deps
21 21
 
22 22
 test:
23  
-	./rebar skip_deps=true eunit
24  
-
25  
-##
26  
-## Release targets
27  
-##
28  
-rel: deps
29  
-	./rebar compile generate
30  
-
31  
-relclean:
32  
-	rm -rf rel/riak
33  
-
34  
-##
35  
-## Developer targets
36  
-##
37  
-stagedevrel: dev1 dev2 dev3 dev4
38  
-	$(foreach dev,$^,\
39  
-	  $(foreach dep,$(wildcard deps/*), rm -rf dev/$(dev)/lib/$(shell basename $(dep))-* && ln -sf $(abspath $(dep)) dev/$(dev)/lib;))
40  
-
41  
-devrel: dev1 dev2 dev3 dev4
42  
-
43  
-dev1 dev2 dev3 dev4:
44  
-	mkdir -p dev
45  
-	(cd rel && ../rebar generate target_dir=../dev/$@ overlay_vars=vars/$@_vars.config)
46  
-
47  
-devclean: clean
48  
-	rm -rf dev
49  
-
50  
-stage : rel
51  
-	$(foreach dep,$(wildcard deps/*), rm -rf rel/riak/lib/$(shell basename $(dep))-* && ln -sf $(abspath $(dep)) rel/riak/lib;)
  23
+	./rebar eunit
52 24
 
53 25
 ##
54 26
 ## Doc targets
55 27
 ##
56 28
 docs:
57  
-	./rebar skip_deps=true doc
58  
-	@cp -R apps/luke/doc doc/luke
59  
-	@cp -R apps/riak_core/doc doc/riak_core
60  
-	@cp -R apps/riak_kv/doc doc/riak_kv
61  
-
62  
-orgs: orgs-doc orgs-README
63  
-
64  
-orgs-doc:
65  
-	@emacs -l orgbatch.el -batch --eval="(riak-export-doc-dir \"doc\" 'html)"
66  
-
67  
-orgs-README:
68  
-	@emacs -l orgbatch.el -batch --eval="(riak-export-doc-file \"README.org\" 'ascii)"
69  
-	@mv README.txt README
  29
+	./rebar doc
70 30
 
71 31
 APPS = kernel stdlib sasl erts ssl tools os_mon runtime_tools crypto inets \
72 32
 	xmerl webtool snmp public_key mnesia eunit syntax_tools compiler
73 33
 COMBO_PLT = $(HOME)/.riak_combo_dialyzer_plt
74 34
 
75 35
 check_plt: compile
76  
-	dialyzer --check_plt --plt $(COMBO_PLT) --apps $(APPS) \
77  
-		deps/*/ebin
  36
+	dialyzer --check_plt --plt $(COMBO_PLT) --apps $(APPS)
78 37
 
79 38
 build_plt: compile
80  
-	dialyzer --build_plt --output_plt $(COMBO_PLT) --apps $(APPS) \
81  
-		deps/*/ebin
  39
+	dialyzer --build_plt --output_plt $(COMBO_PLT) --apps $(APPS)
82 40
 
83 41
 dialyzer: compile
84 42
 	@echo
@@ -86,7 +44,7 @@ dialyzer: compile
86 44
 	@echo Use "'make build_plt'" to build PLT prior to using this target.
87 45
 	@echo
88 46
 	@sleep 1
89  
-	dialyzer -Wno_return --plt $(COMBO_PLT) deps/*/ebin | \
  47
+	dialyzer -Wno_return --plt $(COMBO_PLT) ebin | \
90 48
 	    fgrep -v -f ./dialyzer.ignore-warnings
91 49
 
92 50
 cleanplt:
@@ -97,45 +55,3 @@ cleanplt:
97 55
 	sleep 5
98 56
 	rm $(COMBO_PLT)
99 57
 
100  
-# Release tarball creation
101  
-# Generates a tarball that includes all the deps sources so no checkouts are necessary
102  
-archivegit = git archive --format=tar --prefix=$(1)/ HEAD | (cd $(2) && tar xf -)
103  
-archivehg = hg archive $(2)/$(1)
104  
-archive = if [ -d ".git" ]; then \
105  
-		$(call archivegit,$(1),$(2)); \
106  
-	    else \
107  
-		$(call archivehg,$(1),$(2)); \
108  
-	    fi
109  
-
110  
-buildtar = mkdir distdir && \
111  
-		 git clone . distdir/riak-clone && \
112  
-		 cd distdir/riak-clone && \
113  
-		 git checkout $(RIAK_TAG) && \
114  
-		 $(call archive,$(RIAK_TAG),..) && \
115  
-		 mkdir ../$(RIAK_TAG)/deps && \
116  
-		 make deps; \
117  
-		 for dep in deps/*; do \
118  
-                     cd $${dep} && \
119  
-                     $(call archive,$${dep},../../../$(RIAK_TAG)) && \
120  
-                     mkdir -p ../../../$(RIAK_TAG)/$${dep}/priv && \
121  
-                     git rev-list --max-count=1 HEAD > ../../../$(RIAK_TAG)/$${dep}/priv/git.vsn && \
122  
-                     cd ../..; done
123  
-
124  
-distdir:
125  
-	$(if $(RIAK_TAG), $(call buildtar), $(error "You can't generate a release tarball from a non-tagged revision. Run 'git checkout <tag>', then 'make dist'"))
126  
-
127  
-dist $(RIAK_TAG).tar.gz: distdir
128  
-	cd distdir; \
129  
-	tar czf ../$(RIAK_TAG).tar.gz $(RIAK_TAG)
130  
-
131  
-ballclean:
132  
-	rm -rf $(RIAK_TAG).tar.gz distdir
133  
-
134  
-package: dist
135  
-	$(MAKE) -C package package
136  
-
137  
-pkgclean:
138  
-	$(MAKE) -C package pkgclean
139  
-
140  
-.PHONY: package
141  
-export PKG_VERSION REPO REVISION RIAK_TAG

0 notes on commit d6077b4

Please sign in to comment.
Something went wrong with that request. Please try again.