File: unrebar.patch

package info (click to toggle)
rabbitmq-server 2.8.4-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 8,928 kB
  • sloc: erlang: 52,968; python: 2,846; xml: 1,987; sh: 816; makefile: 683; perl: 86; ruby: 63
file content (50 lines) | stat: -rw-r--r-- 1,286 bytes parent folder | download
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
diff -r 0c4b60ac68b4 Makefile
--- a/Makefile	Tue Jun 15 08:36:55 2010 -0400
+++ b/Makefile	Thu Sep 09 18:33:44 2010 +0100
@@ -1,23 +1,33 @@
 ERL          ?= erl
 APP          := webmachine
 
+EBIN_DIR=ebin
+SOURCE_DIR=src
+ERLC=erlc
+INCLUDE_DIR=include
+MOCHIWEB=../../../../rabbitmq-mochiweb/deps/mochiweb/mochiweb/
+ERLC_OPTS=-I include -pa $(MOCHIWEB)/ebin/ -o $(EBIN_DIR)
+INCLUDES=$(wildcard $(INCLUDE_DIR)/*.hrl)
+SOURCES=$(wildcard $(SOURCE_DIR)/*.erl)
+
+TARGETS=$(INCLUDE_DIR)/mochiweb/include/internal.hrl \
+	$(patsubst $(SOURCE_DIR)/%.erl, $(EBIN_DIR)/%.beam, $(SOURCES)) \
+	$(EBIN_DIR)/webmachine.app
+
 .PHONY: deps
 
-all: deps
-	@(./rebar compile)
+all: $(TARGETS)
 
-deps:
-	@(./rebar get-deps)
+$(EBIN_DIR)/%.beam: $(SOURCE_DIR)/%.erl
+	@mkdir -p $(EBIN_DIR)
+	$(ERLC) $(ERLC_OPTS) -pa $(EBIN_DIR) $<
+
+$(INCLUDE_DIR)/mochiweb/include/internal.hrl:
+	mkdir -p $(INCLUDE_DIR)/mochiweb/include
+	cp $(MOCHIWEB)/src/internal.hrl $(INCLUDE_DIR)/mochiweb/include
 
 clean:
-	@(./rebar clean)
+	rm -f $(EBIN_DIR)/*.beam
+	rm -rf $(INCLUDE_DIR)/mochiweb
 
 distclean: clean
-	@(./rebar delete-deps)
-
-edoc:
-	@$(ERL) -noshell -run edoc_run application '$(APP)' '"."' '[{preprocess, true},{includes, ["."]}]'
-
-test: all
-	scripts/run_tests.escript ebin | tee test.log
-