diff options
author | Matthew Sackman <matthew@lshift.net> | 2010-03-21 19:05:15 +0000 |
---|---|---|
committer | Matthew Sackman <matthew@lshift.net> | 2010-03-21 19:05:15 +0000 |
commit | 89a56a4bc9dfeb872ffe381f70f75e59fc6deb90 (patch) | |
tree | 503458d17b805cc6121d9dcd455d4099654c7c25 /generate_deps | |
parent | 134c1ea18d4869b6943582f6bff8a6666e482f60 (diff) | |
download | rabbitmq-server-89a56a4bc9dfeb872ffe381f70f75e59fc6deb90.tar.gz |
Corrected build system:
a) Do not bother with the intermediate docs/.erl
b) Define USAGES_XML and USAGES_ERL correctly and incorporate with SOURCES
c) Declare the dependencies between the usage erls and usage xmls dynamically (define, call and eval are our friends here)
d) Correct use of automatic variables and take advantage of (a)
e) Given use of SOURCE_DIR, EBIN_DIR and such like, define and use DOC_DIR
f) Correct order in generate_deps to ensure the .erl is the *first* dep of the .beam. This means we can drop the .erl in the .erl => .beam automatic rule and rely on the deps file populating $< with the .erl
g) Tidy .hgignore
Diffstat (limited to 'generate_deps')
-rw-r--r-- | generate_deps | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/generate_deps b/generate_deps index e16624d2..29587b5a 100644 --- a/generate_deps +++ b/generate_deps @@ -23,10 +23,11 @@ main([IncludeDir, ErlDir, EbinDir, TargetFile]) -> ok; (Path, Dep, ok) -> Module = filename:basename(Path, ".erl"), - ok = file:write(Hdl, [EbinDir, "/", Module, ".beam:"]), + ok = file:write(Hdl, [EbinDir, "/", Module, ".beam: ", + Path]), ok = sets:fold(fun (E, ok) -> file:write(Hdl, [" ", E]) end, ok, Dep), - file:write(Hdl, [" ", ErlDir, "/", Module, ".erl\n"]) + file:write(Hdl, ["\n"]) end, ok, Deps), ok = file:write(Hdl, [TargetFile, ": ", escript:script_name(), "\n"]), ok = file:sync(Hdl), |