Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ TOYBOX_SRC := $(TOYBOX_ROOT)/toybox-$(TOYBOX_VER)
#------------------------------------------------------------------------
OS ?= $(shell uname -s)

# Windows does not allow symlink by default
ifeq ($(OS),Windows_NT)
LN ?= ln -v
endif
LN ?= ln -svf

ifdef SELINUX_ENABLED
override SELINUX_ENABLED := 0
# Now check if we should enable it (only on non-Windows)
Expand Down Expand Up @@ -481,22 +487,19 @@ ifneq ($(OS),Windows_NT)
endif
ifeq (${MULTICALL}, y)
$(INSTALL) -m 755 $(BUILDDIR)/coreutils $(INSTALLDIR_BIN)/$(PROG_PREFIX)coreutils
$(foreach prog, $(filter-out coreutils, $(INSTALLEES)), \
cd $(INSTALLDIR_BIN) && ln -fs $(PROG_PREFIX)coreutils $(PROG_PREFIX)$(prog) $(newline) \
)
$(foreach prog, $(HASHSUM_PROGS), \
cd $(INSTALLDIR_BIN) && ln -fs $(PROG_PREFIX)coreutils $(PROG_PREFIX)$(prog) $(newline) \
$(foreach prog, $(HASHSUM_PROGS) $(filter-out coreutils, $(INSTALLEES)), \
cd $(INSTALLDIR_BIN) && $(LN) $(PROG_PREFIX)coreutils $(PROG_PREFIX)$(prog) $(newline) \
)
$(if $(findstring test,$(INSTALLEES)), cd $(INSTALLDIR_BIN) && ln -fs $(PROG_PREFIX)coreutils $(PROG_PREFIX)[)
else
$(foreach prog, $(INSTALLEES), \
$(INSTALL) -m 755 $(BUILDDIR)/$(prog) $(INSTALLDIR_BIN)/$(PROG_PREFIX)$(prog) $(newline) \
)
$(foreach prog, $(HASHSUM_PROGS), \
cd $(INSTALLDIR_BIN) && ln -fs $(PROG_PREFIX)hashsum $(PROG_PREFIX)$(prog) $(newline) \
cd $(INSTALLDIR_BIN) && $(LN) $(PROG_PREFIX)hashsum $(PROG_PREFIX)$(prog) $(newline) \
)
$(if $(findstring test,$(INSTALLEES)), $(INSTALL) -m 755 $(BUILDDIR)/test $(INSTALLDIR_BIN)/$(PROG_PREFIX)[)
endif
# symlink test if we have
$(shell cd $(INSTALLDIR_BIN) && $(LN) $(shell readlink $(PROG_PREFIX)test) $(PROG_PREFIX)[ || true)

uninstall:
ifneq ($(OS),Windows_NT)
Expand Down
Loading