summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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")) ||