Skip to content

Commit

Permalink
An interesting but useless feature for now.
Browse files Browse the repository at this point in the history
darcs-hash:20061201004702-de23e-d1f035a5aab22ec8effcc78edd25e75bc7d81fe7.gz
  • Loading branch information
pupeno committed Dec 1, 2006
1 parent 67dff55 commit 79c2b7a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
22 changes: 21 additions & 1 deletion erlang.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,27 @@ def generate(env):
env["ERLC"] = env.Detect("erlc") or "erlc"
env["ERL"] = env.Detect("erl") or "erl"

bugReport = "Please report it to Pupeno <pupeno@pupeno.com> (http://pupeno.com)."
# The following might be useful, but it is actually needed before the environment is built, so, it is useless.
# Find the Erlang root.
#command = "erl -noshell -s erlangscanner erlang_dir -s init stop"
#sp = subprocess.Popen(command,
# shell = True,
# stdin = None,
# stdout = subprocess.PIPE,
# stderr = subprocess.PIPE)
#sp.wait()
#if sp.returncode != 0:
# print("Warning: Failed to find Erlang's root directory, falling back to a default.")
# print("If you have a correct Erlang installation (and it seems likely if you reached this point) and you are not compiling SCons Erlang itself righ now, this is likely to be a bug. %s" % bugReport)
# print("Command: %s." % command)
# print("Return code: %s." % sp.returncode)
# print("Output: \n%s\n" % sp.stdout.read().strip())
# print("Error: \n%s\n" % sp.stderr.read().strip())
# env["ERLROOTDIR"] = "/usr/local/lib/erlang"
#else:
# env["ERLROOTDIR"] = sp.stdout.read()
#
#env["ERLLIBDIR"] = "$ERLROOTDIR/lib"

##################################################
##### Erlang Builder methods and definitions #####
Expand Down
8 changes: 6 additions & 2 deletions src/erlangscanner.erl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
%% @copyright 2006 José Pablo Ezequiel "Pupeno" Fernández Silva

-module(erlangscanner).
-export([app_needed_by_rel/1, mod_needed_by_app/1]).
-export([app_needed_by_rel/1, mod_needed_by_app/1, erlang_dir/0]).

app_needed_by_rel([File]) ->
{ok, {_,_,_,Applications}} = file:script(File),
Expand All @@ -39,7 +39,11 @@ module_names([_|MetaData]) ->
module_names(MetaData).




erlang_dir() ->
io:fwrite("~s~n", [code:root_dir()]).


print_list([]) ->
ok;
print_list([Name|Modules]) ->
Expand Down

0 comments on commit 79c2b7a

Please sign in to comment.