defs.mk: Add PRISTINE_MAKE

make carries MAKEFLAGS, PATH, LD_LIBRARY_PATH and umask from the environment to
sub-makes, which sometimes is undesirable. So, instead of make -C,
$(PRISTINE_MAKE) -C will start a sub-make with a minimal environment consisting
of MINIMAL_UMASK, MINIMAL_PATH, MINIMAL_LD_LIBRARY_PATH and MINIMAL_MAKEFLAGS

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2019-11-19 13:11:51 +00:00
commit 2a0694a497

View file

@ -79,6 +79,22 @@ ifndef PRINTF
PRINTF := $(shell $(WHICH) printf)
endif
ifndef MINIMAL_MAKEFLAGS
MINIMAL_MAKEFLAGS :=
endif
ifndef MINIMAL_PATH
MINIMAL_PATH := /usr/sbin:/usr/bin:/sbin:/bin
endif
ifndef MINIMAL_LD_LIBRARY_PATH
MINIMAL_LD_LIBRARY_PATH :=
endif
ifndef MINIMAL_UMASK
MINIMAL_UMASK := 0002
endif
ifndef PRISTINE_MAKE
PRISTINE_MAKE := umask $(MINIMAL_UMASK) && MAKEFLAGS=$(MINIMAL_MAKEFLAGS) LD_LIBRARY_PATH=$(MINIMAL_LD_LIBRARY_PATH) PATH=$(MINIMAL_PATH) $(MAKE)
endif
PKG_SH_EXE := /bin/bash $(JWB_SCRIPT_DIR)/pkg.sh
LOG_INSTALL_SH := $(PKG_SH_EXE) log-install
UPDATE_REPO_SH := /opt/packager-server/bin/packager-server schedule-rebuild