Bug 572529 Make it even easier to build with pymake r=ted
authorNeil Rashbrook <neil@parkwaycc.co.uk>
Wed, 30 Jun 2010 12:45:21 +0100
changeset 46436 ea59b927d99f1be5aa963426287c324a06fb42cc
parent 46435 15521c4449a9807218a407c77fce5e41f355a5c3
child 46437 4498d202b84754625f2a5afad2bb37aeb05e2fb6
push idunknown
push userunknown
push dateunknown
reviewersted
bugs572529
milestone2.0b2pre
Bug 572529 Make it even easier to build with pymake r=ted
client.mk
--- a/client.mk
+++ b/client.mk
@@ -79,19 +79,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)
 
 ifeq (,$(strip $(AUTOCONF)))
 AUTOCONF=$(error Couldn't find autoconf 2.13)