You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ro...@apache.org on 2023/01/03 16:09:36 UTC

[couchdb-rebar] 01/01: Move rebar.app out of ebin

This is an automated email from the ASF dual-hosted git repository.

ronny pushed a commit to branch move-rebar.app
in repository https://gitbox.apache.org/repos/asf/couchdb-rebar.git

commit c2b2f905d4f2f78042a4437aeaab19c24c2492bd
Author: Ronny Berndt <ro...@apache.org>
AuthorDate: Tue Jan 3 17:05:02 2023 +0100

    Move rebar.app out of ebin
    
    Calling 'make clean' from CouchDB wipes all ebin-directories in the source tree.
    Afterwards it is not possible to build rebar again.
    Modifying the bootstrap script and moving 'rebar.app' one directory-level up.
---
 bootstrap                   | 6 ++++--
 ebin/rebar.app => rebar.app | 0
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/bootstrap b/bootstrap
index d65ccee..7dbcc27 100755
--- a/bootstrap
+++ b/bootstrap
@@ -48,6 +48,8 @@ main(Args) ->
                           true -> {d, namespaced_types};
                           false -> undefined
                       end,
+    %% Ensure, that the ebin folder exists after "make clean"
+    filelib:ensure_dir("ebin/"),
 
     %% Compile all src/*.erl to ebin
     %% To not accidentally try to compile files like Mac OS X resource forks,
@@ -67,11 +69,11 @@ main(Args) ->
     end,
 
     %% Make sure file:consult can parse the .app file
-    case file:consult("ebin/rebar.app") of
+    case file:consult("rebar.app") of
         {ok, _} ->
             ok;
         {error, Reason} ->
-            io:format("Invalid syntax in ebin/rebar.app: ~p\n", [Reason]),
+            io:format("Invalid syntax in rebar.app: ~p\n", [Reason]),
             halt(1)
     end,
 
diff --git a/ebin/rebar.app b/rebar.app
similarity index 100%
rename from ebin/rebar.app
rename to rebar.app