Bug 592575 - Port bug 572529 to MailNews core. (make pymake work from client.mk). r+=Callek
authorEdmund Wong <ewong@pw-wspx.org>
Tue, 31 Aug 2010 20:44:00 -0400
changeset 6299 7565800b5864faae3f75a418bcd4600630b8e496
parent 6298 0fcd53f9120a049cbac74dcb20cb49ad6585da58
child 6300 cd6208fd054afea4295f0eb1d482844d822647b4
push idunknown
push userunknown
push dateunknown
bugs592575, 572529
Bug 592575 - Port bug 572529 to MailNews core. (make pymake work from client.mk). r+=Callek
client.mk
--- 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