$OpenBSD: patch-Makefile_rules,v 1.7 2020/01/03 22:34:35 sthen Exp $

Index: Makefile.rules
--- Makefile.rules.orig
+++ Makefile.rules
@@ -320,7 +320,8 @@ installlocalbin: $(INSTALLBINPROGS)
 	@if test "$(INSTALLBINPROGS) $(INSTALLBINSCRIPTS)" != " "; then \
 		$(SHELL) $(top_srcdir)/mkinstalldirs $(INSTALL_PREFIX)$(bindir) ; \
 		it="$(INSTALLBINPROGS) $(INSTALLBINSCRIPTS)" ; \
-		$(INSTALL) $(INSTALLBINPROGS) $(INSTALLBINSCRIPTS) $(INSTALL_PREFIX)$(bindir) ; \
+		[ -n "$(INSTALLBINPROGS)" ] && $(INSTALL_PROGRAM) $(INSTALLBINPROGS) $(INSTALL_PREFIX)$(bindir) ; \
+		[ -n "$(INSTALLBINSCRIPTS)" ] && $(INSTALL_SCRIPT) $(INSTALLBINSCRIPTS) $(INSTALL_PREFIX)$(bindir) ; \
 		for i in $$it ; do   \
 			echo "installing $$i in $(INSTALL_PREFIX)$(bindir)"; \
 		done \
@@ -358,7 +359,7 @@ installlocalsbin: $(INSTALLSBINPROGS)
 	@if test "$(INSTALLSBINPROGS)" != ""; then \
 		it="$(INSTALLSBINPROGS)" ; \
 		$(SHELL) $(top_srcdir)/mkinstalldirs $(INSTALL_PREFIX)$(sbindir) ; \
-		$(INSTALL) $(INSTALLSBINPROGS) $(INSTALL_PREFIX)$(sbindir) ;  \
+		$(INSTALL_PROGRAM) $(INSTALLSBINPROGS) $(INSTALL_PREFIX)$(sbindir) ;  \
 		for i in $$it ; do   \
 			echo "installing $$i in $(INSTALL_PREFIX)$(sbindir)"; \
 		done \
