Tarantool development patches archive
 help / color / mirror / Atom feed
From: Leonid Vasiliev <lvasiliev@tarantool.org>
To: v.shpilevoy@tarantool.org
Cc: tarantool-patches@dev.tarantool.org
Subject: [Tarantool-patches] [PATCH v3 1/2] Add the chdir option for make
Date: Thu,  9 Apr 2020 09:33:32 +0300	[thread overview]
Message-ID: <8e8db7f255a855c585245c288414ceb097576e07.1586412430.git.lvasiliev@tarantool.org> (raw)
In-Reply-To: <cover.1586412430.git.lvasiliev@tarantool.org>
In-Reply-To: <cover.1586412430.git.lvasiliev@tarantool.org>

Flag --chdir for make command (with help) has been added.
It's add possibility to specify a source directory of the rock when make.
---
 src/luarocks/cmd/make.lua | 8 ++++++++
 src/luarocks/util.lua     | 1 +
 2 files changed, 9 insertions(+)

diff --git a/src/luarocks/cmd/make.lua b/src/luarocks/cmd/make.lua
index 4d81386..015b01d 100644
--- a/src/luarocks/cmd/make.lua
+++ b/src/luarocks/cmd/make.lua
@@ -59,6 +59,8 @@ only dependencies of the rockspec (see `luarocks help install`).
 --sign              To be used with --pack-binary-rock. Also produce
                     a signature file for the generated .rock file.
 
+--chdir=<path>      Specify a source directory of the rock.
+
 ]]
 
 --- Driver function for "make" command.
@@ -68,6 +70,12 @@ only dependencies of the rockspec (see `luarocks help install`).
 function make.command(flags, rockspec_filename)
    assert(type(rockspec_filename) == "string" or not rockspec_filename)
    
+   if flags["chdir"] then
+      local ok, err = fs.change_dir(flags["chdir"])
+      if not ok then
+         return nil, err
+      end
+   end
    if not rockspec_filename then
       local err
       rockspec_filename, err = util.get_default_rockspec()
diff --git a/src/luarocks/util.lua b/src/luarocks/util.lua
index abf6d90..8ccda27 100644
--- a/src/luarocks/util.lua
+++ b/src/luarocks/util.lua
@@ -92,6 +92,7 @@ local supported_flags = {
    ["binary"] = true,
    ["branch"] = "<branch-name>",
    ["build-deps"] = true,
+   ["chdir"] = "<path>",
    ["debug"] = true,
    ["deps"] = true,
    ["deps-mode"] = "<mode>",
-- 
2.7.4

  reply	other threads:[~2020-04-09  6:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-09  6:33 [Tarantool-patches] [PATCH v3 0/2] Adapt luarocks for tarantoolctl Leonid Vasiliev
2020-04-09  6:33 ` Leonid Vasiliev [this message]
2020-04-09  6:33 ` [Tarantool-patches] [PATCH v3 2/2] Delete flags which can't be used with tarantoolctl rocks Leonid Vasiliev
2020-04-13 11:59   ` lvasiliev
2020-04-13 12:16     ` Yaroslav Dynnikov
2020-04-10  0:00 ` [Tarantool-patches] [PATCH v3 0/2] Adapt luarocks for tarantoolctl Vladislav Shpilevoy
2020-04-10  8:41   ` lvasiliev
2020-04-10 17:02   ` Yaroslav Dynnikov
2020-04-10 18:37     ` lvasiliev
2020-04-11 14:23     ` Vladislav Shpilevoy
2020-04-12 17:25       ` lvasiliev
2020-04-12 18:30         ` Yaroslav Dynnikov
2020-04-12 19:52           ` Vladislav Shpilevoy
2020-04-13  7:44           ` lvasiliev
2020-04-13 11:07 ` lvasiliev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8e8db7f255a855c585245c288414ceb097576e07.1586412430.git.lvasiliev@tarantool.org \
    --to=lvasiliev@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v3 1/2] Add the chdir option for make' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox