1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 03:27:44 +00:00

Allow choice of install program

This permits the use of, *e.g.*, `ginstall` or `uu-install`.
This commit is contained in:
Alexander Altman 2016-08-07 18:46:43 -07:00 committed by GitHub
parent 1880c46acd
commit 1543199b50

View file

@ -1,6 +1,7 @@
# Config options # Config options
PROFILE ?= debug PROFILE ?= debug
MULTICALL ?= n MULTICALL ?= n
INSTALL ?= install
ifneq (,$(filter install, $(MAKECMDGOALS))) ifneq (,$(filter install, $(MAKECMDGOALS)))
override PROFILE:=release override PROFILE:=release
endif endif
@ -242,7 +243,7 @@ endif
all: build all: build
do_install = install ${1} do_install = $(INSTALL) ${1}
use_default := 1 use_default := 1
$(foreach util,$(EXES),$(eval $(call BUILD_EXE,$(util)))) $(foreach util,$(EXES),$(eval $(call BUILD_EXE,$(util))))
@ -290,14 +291,14 @@ distclean: clean
install: build install: build
mkdir -p $(INSTALLDIR_BIN) mkdir -p $(INSTALLDIR_BIN)
ifeq (${MULTICALL}, y) ifeq (${MULTICALL}, y)
install $(BUILDDIR)/uutils $(INSTALLDIR_BIN)/$(PROG_PREFIX)uutils $(INSTALL) $(BUILDDIR)/uutils $(INSTALLDIR_BIN)/$(PROG_PREFIX)uutils
$(foreach prog, $(INSTALLEES), cd $(INSTALLDIR_BIN) && ln -fs $(PROG_PREFIX)uutils $(PROG_PREFIX)$(prog);) $(foreach prog, $(INSTALLEES), cd $(INSTALLDIR_BIN) && ln -fs $(PROG_PREFIX)uutils $(PROG_PREFIX)$(prog);)
else else
$(foreach prog, $(INSTALLEES), \ $(foreach prog, $(INSTALLEES), \
install $(PKG_BUILDDIR)/$(prog) $(INSTALLDIR_BIN)/$(PROG_PREFIX)$(prog);) $(INSTALL) $(PKG_BUILDDIR)/$(prog) $(INSTALLDIR_BIN)/$(PROG_PREFIX)$(prog);)
endif endif
mkdir -p $(INSTALLDIR_LIB) mkdir -p $(INSTALLDIR_LIB)
$(foreach lib, $(LIBS), install $(BUILDDIR)/$$lib $(INSTALLDIR_LIB)/$(lib);) $(foreach lib, $(LIBS), $(INSTALL) $(BUILDDIR)/$$lib $(INSTALLDIR_LIB)/$(lib);)
uninstall: uninstall:
ifeq (${MULTICALL}, y) ifeq (${MULTICALL}, y)