Bug 592575 - Port
bug 572529 to MailNews core. (make pymake work from client.mk). r+=Callek
--- a/client.mk
+++ b/client.mk
@@ -81,19 +81,21 @@ ifneq (1,$(words $(CWD)))
endif
ifeq "$(CWD)" "/"
CWD := /.
endif
ifndef TOPSRCDIR
ifeq (,$(wildcard client.mk))
-$(error Must run from the client.mk directory, or specify TOPSRCDIR)
+TOPSRCDIR := $(patsubst %/,%,$(dir $(MAKEFILE_LIST)))
+MOZ_OBJDIR = .
+else
+TOPSRCDIR := $(CWD)
endif
-TOPSRCDIR = $(CWD)
endif
# try to find autoconf 2.13 - discard errors from 'which'
# MacOS X 10.4 sends "no autoconf*" errors to stdout, discard those via grep
AUTOCONF ?= $(shell which autoconf-2.13 autoconf2.13 autoconf213 2>/dev/null | grep -v '^no autoconf' | head -1)
MKDIR := mkdir
SH := /bin/sh