aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/Kbuild.install7
-rw-r--r--usr/gzip/Kbuild3
-rw-r--r--usr/utils/Kbuild5
3 files changed, 12 insertions, 3 deletions
diff --git a/scripts/Kbuild.install b/scripts/Kbuild.install
index 0788637f8bd33..df02159bf8be0 100644
--- a/scripts/Kbuild.install
+++ b/scripts/Kbuild.install
@@ -27,6 +27,10 @@ quiet_cmd_install = INSTALL $(install-y)
cmd_install = $(install-bin) $(install-y) \
$(INSTALLROOT)$(INSTALLDIR)/$(KLIBCCROSS)bin
+# Link install command
+quiet_cmd_install_links = LN $(install-link-y)
+ cmd_install_links = $(foreach l, $(install-link-y), ln -f $(INSTALLROOT)$(INSTALLDIR)/$(KLIBCCROSS)bin/$(word 2,$(subst =,$(space),$(l))) $(INSTALLROOT)$(INSTALLDIR)/$(KLIBCCROSS)bin/$(word 1,$(subst =,$(space),$(l))) &&) true
+
ifeq ($(KLIBC_INSTALL),1)
# First part - we are descending..
@@ -69,6 +73,9 @@ ifneq ($(install-y),)
else
@:
endif
+ifneq ($(install-link-y),)
+ $(call cmd,install_links)
+endif
# Descending
PHONY += $(subdir-)
diff --git a/usr/gzip/Kbuild b/usr/gzip/Kbuild
index 9bbf0a4715092..52c57d01d0238 100644
--- a/usr/gzip/Kbuild
+++ b/usr/gzip/Kbuild
@@ -22,4 +22,5 @@ $(obj)/gunzip $(obj)/zcat: $(obj)/gzip
targets := gzip gzip.g gunzip zcat
# Targets to install
-install-y := gzip gunzip zcat
+install-y := gzip
+install-link-y := gunzip=gzip zcat=gzip
diff --git a/usr/utils/Kbuild b/usr/utils/Kbuild
index 002342f769401..a389c2a761d7b 100644
--- a/usr/utils/Kbuild
+++ b/usr/utils/Kbuild
@@ -79,7 +79,8 @@ clean-dirs := static shared
# install the shared binaries by preference
ifdef KLIBCSHAREDFLAGS
-install-y := $(shared-y) shared/reboot shared/poweroff
+install-y := $(shared-y)
else
-install-y := $(static-y) static/reboot static/poweroff
+install-y := $(static-y)
endif
+install-link-y := reboot=halt poweroff=halt