diff mbox

[uclibc-ng-devel] 'install' breaks on macos

Message ID 052d4940-cd40-e267-7587-a49114bb281e@att.net
State Accepted
Headers show

Commit Message

Alexey Neyman March 1, 2017, 6:44 p.m. UTC
Hi,

On macos, install does not have a -D option; need to use separate 
'do_mkdir' and 'install'.

Patch attached.

Regards,
Alexey.

Comments

Waldemar Brodkorb March 2, 2017, 5:52 p.m. UTC | #1
Hi Alexey,
Alexey Neyman wrote,

> Hi,
> 
> On macos, install does not have a -D option; need to use separate 'do_mkdir'
> and 'install'.
> 
> Patch attached.

Applied and pushed,
 thanks
  Waldemar
diff mbox

Patch

From 4a71a5757fea5c8d64da4ef3cc83e2b5498a23d9 Mon Sep 17 00:00:00 2001
From: Alexey Neyman <stilor@att.net>
Date: Wed, 1 Mar 2017 10:39:33 -0800
Subject: [PATCH] Fix build on macos

... where install does not have a -D option.

Signed-off-by: Alexey Neyman <stilor@att.net>
---
 utils/Makefile.in | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/utils/Makefile.in b/utils/Makefile.in
index 5378973..461e953 100644
--- a/utils/Makefile.in
+++ b/utils/Makefile.in
@@ -117,15 +117,22 @@  $(hostutils_OBJ): $(utils_OUT)/%.host : $(utils_DIR)/%.c
 install-y += utils_install
 
 # This installs both utils and hostutils, so doesn't depend on either.
+$(PREFIX)$(DEVEL_PREFIX)bin $(PREFIX)$(RUNTIME_PREFIX)sbin:
+	$(do_mkdir)
+
+utils_install: $(PREFIX)$(DEVEL_PREFIX)bin
+ifeq ($(HAVE_SHARED),y)
+utils_install: $(PREFIX)$(RUNTIME_PREFIX)sbin
+endif
 
 utils_install: $(addsuffix $(DOTHOST), $(utils_OBJ) $(utils_LOCALE_OBJ))
-	$(Q)$(INSTALL) -D -m 755 $(utils_OUT)/getconf$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/getconf
+	$(Q)$(INSTALL) -m 755 $(utils_OUT)/getconf$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/getconf
 ifeq ($(HAVE_SHARED),y)
-	$(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldd$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/ldd
-	$(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldconfig$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig
+	$(Q)$(INSTALL) -m 755 $(utils_OUT)/ldd$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/ldd
+	$(Q)$(INSTALL) -m 755 $(utils_OUT)/ldconfig$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig
 endif
 ifeq ($(UCLIBC_HAS_LOCALE),y)
-	$(Q)$(INSTALL) -D -m 755 $(utils_OUT)/iconv$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/iconv
+	$(Q)$(INSTALL) -m 755 $(utils_OUT)/iconv$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/iconv
 	$(Q)$(INSTALL) -m 755 $(utils_OUT)/locale$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/locale
 endif
 
-- 
2.9.3