Skip to contentSkip to conversation

mmc-utils: use upstream provided install target

PATCH New Baruch Siach 2 participants 2 messages Sep 4, 2017 – Sep 6, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmc-utils: use upstream provided install target

Cc S?bastien Szymanski <[email protected]>
---
 package/mmc-utils/mmc-utils.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/mmc-utils/mmc-utils.mk +1 -1
index 0b9a6d14193d..7292c029f5a2 100644
@@ -13,7 +13,7 @@ define MMC_UTILS_BUILD_CMDS
 endef
 
 define MMC_UTILS_INSTALL_TARGET_CMDS
-	$(INSTALL) -D -m 0755 $(@D)/mmc $(TARGET_DIR)/usr/bin/mmc
+	prefix=$(TARGET_DIR) $(MAKE) -C $(@D) install
 endef
 
 $(eval $(generic-package))
Signature · 1 line
2.14.1
#1 lore raw

PATCH 1/1 mmc-utils: use upstream provided install target

Hello,

package/mmc-utils/mmc-utils.mk define MMC_UTILS_BUILD_CMDS · line 17

Quoted 4 lines · Baruch Siach

define MMC_UTILS_INSTALL_TARGET_CMDS

package/mmc-utils/mmc-utils.mk +1 -1
-	$(INSTALL) -D -m 0755 $(@D)/mmc $(TARGET_DIR)/usr/bin/mmc
+	prefix=$(TARGET_DIR) $(MAKE) -C $(@D) install
 endef

This is not entirely correct, for a few reasons: first, your patch introduces a difference as the "mmc" program is now installed in /bin/mmc and not /usr/bin/mmc, which isn't nice.

Also, it mis-uses prefix, as DESTDIR should be used. The correct use is prefix=/usr (to override the default of /usr/local) and DESTDIR=$(TARGET_DIR).

Best regards,

Thomas Petazzoni

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com