Makefile and generate_deps now more robust.
This commit is contained in:
parent
ad796f87f1
commit
5481193791
3
Makefile
3
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) $@ < $<
|
||||
|
|
|
|||
|
|
@ -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")) ||
|
||||
|
|
|
|||
Loading…
Reference in New Issue