diff mbox

[01/53] pkg-rebar: remove redundant / in front of $($(PKG)_ERLANG_LIBDIR)

Message ID 20170412093928.1006-2-arnout@mind.be
State Changes Requested
Headers show

Commit Message

Arnout Vandecappelle April 12, 2017, 9:38 a.m. UTC
Sometimes $(1)/$($(PKG)_ERLANG_LIBDIR) is used, sometimes
$(1)$($(PKG)_ERLANG_LIBDIR). Make this consistent, without /, because
$($(PKG)_ERLANG_LIBDIR) already starts with a /.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 package/pkg-rebar.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Thomas Petazzoni April 12, 2017, 9:46 a.m. UTC | #1
Hello,

On Wed, 12 Apr 2017 11:38:35 +0200, Arnout Vandecappelle
(Essensium/Mind) wrote:

>  define install-erlang-directories
> -	$(INSTALL) -d $(1)/$($(PKG)_ERLANG_LIBDIR)
> +	$(INSTALL) -d $(1)$($(PKG)_ERLANG_LIBDIR)

This looks a bit weird to me. Wouldn't it make more sense to have
ERLANG_LIBDIR not start with a / ?

Thomas
Arnout Vandecappelle April 12, 2017, 10:55 a.m. UTC | #2
On 12-04-17 11:46, Thomas Petazzoni wrote:
> Hello,
> 
> On Wed, 12 Apr 2017 11:38:35 +0200, Arnout Vandecappelle
> (Essensium/Mind) wrote:
> 
>>  define install-erlang-directories
>> -	$(INSTALL) -d $(1)/$($(PKG)_ERLANG_LIBDIR)
>> +	$(INSTALL) -d $(1)$($(PKG)_ERLANG_LIBDIR)
> 
> This looks a bit weird to me. Wouldn't it make more sense to have
> ERLANG_LIBDIR not start with a / ?

 Well...

1. it doesn't look weird to me;

2. in one place, it was already like that;

3. if we change it, we should also change all instances of _ERLANG_LIBDIR in all
packages, including external trees.

 The last point isn't that important though since it still works even if the /
is there. And we don't have any in-tree package that sets _ERLANG_LIBDIR.

 Anyway, the patch is independent of the rest of the series (I should have left
it out, probably). So don't let it stop you :-)


 Regards,
 Arnout
diff mbox

Patch

diff --git a/package/pkg-rebar.mk b/package/pkg-rebar.mk
index 7605a64ade..ab41d3bb34 100644
--- a/package/pkg-rebar.mk
+++ b/package/pkg-rebar.mk
@@ -56,7 +56,7 @@  REBAR_TARGET_DEPS_ENV = \
 # expands package-related variables.
 #
 define install-erlang-directories
-	$(INSTALL) -d $(1)/$($(PKG)_ERLANG_LIBDIR)
+	$(INSTALL) -d $(1)$($(PKG)_ERLANG_LIBDIR)
 	for dir in bin ebin priv $(2); do                               \
 		if test -d $(@D)/$$dir; then                            \
 			cp -r $(@D)/$$dir $(1)$($(PKG)_ERLANG_LIBDIR);  \
@@ -90,7 +90,7 @@  endef
 #
 define install-rebar-deps
 	$(INSTALL) -d $(REBAR_$(2)_DEPS_DIR)
-	ln -f -s $(1)/$($(PKG)_ERLANG_LIBDIR) \
+	ln -f -s $(1)$($(PKG)_ERLANG_LIBDIR) \
 		$(REBAR_$(2)_DEPS_DIR)/$($(PKG)_ERLANG_APP)
 endef