mirror of
https://github.com/rhboot/gnu-efi
synced 2026-08-26 00:26:04 -04:00
Make: make "make DESTDIR=../foo install" work right.
This makes the normal DESTDIR= variable work on the command line, and makes relative paths always relative to the top-level directory. Signed-off-by: Peter Jones <pjones@redhat.com>
This commit is contained in:
parent
5c8b8170cd
commit
0874e84f35
1 changed files with 13 additions and 1 deletions
|
|
@ -47,7 +47,19 @@ ARCHES=aa64 arm ia32 ia64 mips64el x64
|
|||
# Where to install the package. GNU-EFI will create and access
|
||||
# lib and include under the root
|
||||
#
|
||||
INSTALLROOT := /
|
||||
DESTDIR ?= /
|
||||
ifeq ($(origin INSTALLROOT),undefined)
|
||||
INSTALLROOT = $(DESTDIR)
|
||||
endif
|
||||
|
||||
empty :=
|
||||
space := $(empty) $(empty)
|
||||
stripped = $(subst $(space),/,$(strip $(subst /,$(space),$(1))))
|
||||
unstripped = $(subst $(space),/,$(subst /,$(space),$(1)))
|
||||
is_absolute = $(subst $(call stripped,$(1)),$(empty),$(call unstripped,$(1)))
|
||||
|
||||
override INSTALLROOT:=$(if $(call is_absolute,$(INSTALLROOT)),,$(TOPDIR)/)$(INSTALLROOT)
|
||||
|
||||
PREFIX := /usr/local
|
||||
LIBDIR := $(PREFIX)/lib
|
||||
INSTALL := install
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue