Skip to contentSkip to conversation

Makefile.target: use $(INSTALL_PROG) for installing, not $(INSTALL)

PATCH In review Michael Tokarev 2 participants 2 messages May 8, 2014 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Makefile.target: use $(INSTALL_PROG) for installing, not $(INSTALL)

$(INSTALL_PROG) is evaluated to libtool if using libtool, while $(INSTALL) is not. Use $(INSTALL_PROG) so that libtool is used with target too when necessary. This allows, for example, to link qemu with shared libcacard.

--
This is done on top of previous patch (using $(STRIP)), but it can be used by its own.

---
 Makefile.target |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile.target +1 -1
index 8de8b12..3b75ade 100644
@@ -194,7 +194,7 @@ endif
 
 install: all
 ifneq ($(PROGS),)
-	$(INSTALL) -m 755 $(PROGS) "$(DESTDIR)$(bindir)"
+	$(INSTALL_PROG) $(PROGS) "$(DESTDIR)$(bindir)"
 ifneq ($(STRIP),)
 	$(STRIP) $(PROGS:%="$(DESTDIR)$(bindir)/%")
 endif
Signature · 1 line
1.7.10.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Michael Tokarev

$(INSTALL_PROG) is evaluated to libtool if using libtool, while $(INSTALL) is not. Use $(INSTALL_PROG) so that libtool is used with target too when necessary. This allows, for example, to link qemu with shared libcacard.

Quoted 23 lines

--
This is done on top of previous patch (using $(STRIP)), but it can be used by its own.

---
 Makefile.target |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile.target +1 -1
index 8de8b12..3b75ade 100644
@@ -194,7 +194,7 @@ endif
 
 install: all
 ifneq ($(PROGS),)
-	$(INSTALL) -m 755 $(PROGS) "$(DESTDIR)$(bindir)"
+	$(INSTALL_PROG) $(PROGS) "$(DESTDIR)$(bindir)"
 ifneq ($(STRIP),)
 	$(STRIP) $(PROGS:%="$(DESTDIR)$(bindir)/%")
 endif
Signature · 1 line
1.7.10.4