From: Wolfgang Rosenauer Subject: fixes for build --with-system-nspr References: https://bugzilla.mozilla.org/show_bug.cgi?id=296819 https://bugzilla.mozilla.org/show_bug.cgi?id=290923 https://bugzilla.mozilla.org/show_bug.cgi?id=288647 Index: security/coreconf/location.mk =================================================================== --- security/coreconf/location.mk.orig +++ security/coreconf/location.mk @@ -61,6 +61,8 @@ endif DIST = $(SOURCE_PREFIX)/$(PLATFORM) +NSPR_LIBDIR = $(DIST)/lib + ifdef BUILD_DEBUG_GC DEFINES += -DDEBUG_GC endif Index: security/manager/Makefile.in =================================================================== --- security/manager/Makefile.in.orig +++ security/manager/Makefile.in @@ -114,13 +114,25 @@ FREEBL_64INT_CHK = libfreebl_64int_3.chk FREEBL_64FPU_LIB = libfreebl_64fpu_3$(DLL_SUFFIX) FREEBL_64FPU_CHK = libfreebl_64fpu_3.chk endif - + +# Hmm, hope this is ok. +ABS_DIST := $(shell cd $(DIST) && pwd) +ifeq ($(OS_ARCH),WINNT) +ABS_DIST := $(shell cygpath -w $(ABS_DIST) | sed -e 's|\\\\|/|g') +endif +NSPR_LIBDIR = $(firstword $(filter -L%,$(NSPR_LIBS))) +ifneq (,$(strip $(NSPR_LIBDIR))) +NSPR_LIBDIR := $(subst -L,,$(subst -L$(DIST),-L$(ABS_DIST),$(NSPR_LIBDIR))) +else +NSPR_LIBDIR = $(ABS_DIST)/lib +endif # NSS makefiles are not safe for parallel execution. DEFAULT_GMAKE_FLAGS = MAKE="$(MAKE) -j1" -j1 DEFAULT_GMAKE_FLAGS += CC="$(CC)" -DEFAULT_GMAKE_FLAGS += MOZILLA_INCLUDES="-I$(MOZ_BUILD_ROOT)/dist/include/nspr -I$(MOZ_BUILD_ROOT)/dist/include/dbm" -DEFAULT_GMAKE_FLAGS += SOURCE_MD_DIR=$(MOZ_BUILD_ROOT)/dist -DEFAULT_GMAKE_FLAGS += DIST=$(MOZ_BUILD_ROOT)/dist +DEFAULT_GMAKE_FLAGS += MOZILLA_INCLUDES="$(subst -I$(DIST),-I$(ABS_DIST),$(NSPR_CFLAGS) -I$(DIST)/include/dbm)" +DEFAULT_GMAKE_FLAGS += SOURCE_MD_DIR=$(ABS_DIST) +DEFAULT_GMAKE_FLAGS += DIST=$(ABS_DIST) +DEFAULT_GMAKE_FLAGS += NSPR_LIBDIR=$(NSPR_LIBDIR) DEFAULT_GMAKE_FLAGS += MOZILLA_CLIENT=1 DEFAULT_GMAKE_FLAGS += NO_MDUPDATE=1 ABS_topsrcdir := $(shell cd $(topsrcdir); pwd)