summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerry Kuch <jerryk@vmware.com>2010-11-11 16:10:13 +0000
committerJerry Kuch <jerryk@vmware.com>2010-11-11 16:10:13 +0000
commita2945751a9b0369ec19db1c02acb46aa1fa655a6 (patch)
tree93b75553d9e5f313bce06b89d79191c6daec41d9
parentcd62807f46e69ee533422e29e9b2925a4cd2c9ff (diff)
downloadrabbitmq-server-bug23481.tar.gz
Makefile and generate_deps now more robust.bug23481
-rw-r--r--Makefile3
-rw-r--r--generate_deps6
2 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index af5157dc..e857224b 100644
--- a/Makefile
+++ b/Makefile
@@ -93,8 +93,7 @@ all: $(TARGETS)
$(DEPS_FILE): $(SOURCES) $(INCLUDES)
rm -f $@
- echo $(INCLUDES)
-# echo $(SOURCES) $(INCLUDES) | escript generate_deps $@ $(EBIN_DIR)
+ echo $(foreach FILE,$^,$(FILE):) | escript generate_deps $@ $(EBIN_DIR)
$(EBIN_DIR)/rabbit.app: $(EBIN_DIR)/rabbit_app.in $(BEAM_TARGETS) generate_app
escript generate_app $(EBIN_DIR) $@ < $<
diff --git a/generate_deps b/generate_deps
index 60916838..ddfca816 100644
--- a/generate_deps
+++ b/generate_deps
@@ -2,9 +2,11 @@
%% -*- erlang -*-
-mode(compile).
-%% We expect the list of Erlang source and header files to arrive on stdin
+%% We expect the list of Erlang source and header files to arrive on
+%% stdin, with the entries colon-separated.
main([TargetFile, EbinDir]) ->
- ErlsAndHrls = string:tokens(io:get_line(""), ":\n"),
+ ErlsAndHrls = [ string:strip(S,left) ||
+ S <- string:tokens(io:get_line(""), ":\n")],
ErlFiles = [F || F <- ErlsAndHrls, lists:suffix(".erl", F)],
Modules = sets:from_list(
[list_to_atom(filename:basename(FileName, ".erl")) ||