jw-pkg/make/ldlibpath.mk
Jan Lindemann 5459f98adc Define PATH and LD_LIBRARY_PATH with := rather than =
For performance reasons, define PATH and LD_LIBRARY_PATH with := instead of =
This is a risky commit as it might break testing due to missing libraries

Signed-off-by: Jan Lindemann <jan@janware.com>
2018-05-04 22:30:58 +00:00

17 lines
771 B
Makefile

# jan's utility modules
# (c) 2001-2005 jannet it services
# contact@jannet.de
# $Id$
LD_LIB_PATH_ENV := $(LD_LIBRARY_PATH)
EXE_SEARCH_PATH_ENV := $(PATH)
LD_LIB_PATH_LDFLAGS = $(shell echo $(BUILD_LDFLAGS) | $(SED) 's/^-[^L] *[^ ]*/ /g; s/[ ]-[^L] *[^ ]*/ /g; s/-L[ ]*\([^ ]*\)[ ]*/\1:/g')
ifeq ($(TARGET),mingw)
DLL_PATH = $(shell echo $(LD_LIBRARY_PATH) | $(SED) 's/:/;/g');$(CROSS_TOOL_DIR)/bin
endif
#export LD_LIBRARY_PATH=$(shell echo $(strip $(LD_LIB_PATH_LDFLAGS):$(LD_LIB_PATH):$(LD_LIB_PATH_ENV)) | $(SED) 's/ /:/g; s/::/:/g')
LD_LIBRARY_PATH := $(call proj_query, ldlibpath $(PROJECT) $(PREREQ_BUILD))
export LD_LIBRARY_PATH
export PATH := $(call proj_query, exepath $(PROJECT) $(PREREQ_BUILD)):$(EXE_SEARCH_PATH_ENV)