libselinux: use $(TARGET_MAKE_ENV) when calling $(MAKE)

Signed-off-by: Gustavo Zacarias <gustavo.zacarias@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
Gustavo Zacarias 2016-10-28 10:18:22 -03:00 committed by Thomas Petazzoni
parent f3f9a860c0
commit dba1ebe551

View File

@ -23,15 +23,18 @@ LIBSELINUX_MAKE_OPTS = \
define LIBSELINUX_BUILD_CMDS
# DESTDIR is needed during the compile to compute library and
# header paths.
$(MAKE) -C $(@D) $(LIBSELINUX_MAKE_OPTS) DESTDIR=$(STAGING_DIR) all
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
$(LIBSELINUX_MAKE_OPTS) DESTDIR=$(STAGING_DIR) all
endef
define LIBSELINUX_INSTALL_STAGING_CMDS
$(MAKE) -C $(@D) $(LIBSELINUX_MAKE_OPTS) DESTDIR=$(STAGING_DIR) install
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
$(LIBSELINUX_MAKE_OPTS) DESTDIR=$(STAGING_DIR) install
endef
define LIBSELINUX_INSTALL_TARGET_CMDS
$(MAKE) -C $(@D) $(LIBSELINUX_MAKE_OPTS) DESTDIR=$(TARGET_DIR) install
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
$(LIBSELINUX_MAKE_OPTS) DESTDIR=$(TARGET_DIR) install
# Create the selinuxfs mount point
if [ ! -d "$(TARGET_DIR)/selinux" ]; then mkdir $(TARGET_DIR)/selinux; fi
if ! grep -q "selinuxfs" $(TARGET_DIR)/etc/fstab; then \