Skip to content

Commit

Permalink
Bug 1415335 - Move spaces in path check to configure; r=nalexander
Browse files Browse the repository at this point in the history
Checks like this are what configure is for.

In addition to moving the check, we also validate topobjdir as well.

MozReview-Commit-ID: 9sVNQJsAnjO

--HG--
extra : rebase_source : 688961fffca5922c7186c0d39182de7220f7dbe3
extra : source : d9a4ea9bc34a1e0c710469fc0a556ed624ea387b
  • Loading branch information
indygreg committed Oct 30, 2017
1 parent 033eb6d commit 6ff5d57
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
15 changes: 15 additions & 0 deletions build/moz.configure/init.configure
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,21 @@ def check_build_environment(help, dist):
if help:
return result

# This limitation has mostly to do with GNU make. Since make can't represent
# variables with spaces without correct quoting and many paths are used
# without proper quoting, using paths with spaces commonly results in
# targets or dependencies being treated as multiple paths. This, of course,
# undermines the ability for make to perform up-to-date checks and makes
# the build system not work very efficiently. In theory, a non-make build
# backend will make this limitation go away. But there is likely a long tail
# of things that will need fixing due to e.g. lack of proper path quoting.
if len(topsrcdir.split()) > 1:
die('Source directory cannot be located in a path with spaces: %s' %
topsrcdir)
if len(topobjdir.split()) > 1:
die('Object directory cannot be located in a path with spaces: %s' %
topobjdir)

if topsrcdir == topobjdir:
die(' ***\n'
' * Building directly in the main source directory is not allowed.\n'
Expand Down
3 changes: 0 additions & 3 deletions client.mk
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ endif


CWD := $(CURDIR)
ifneq (1,$(words $(CWD)))
$(error The mozilla directory cannot be located in a path with spaces.)
endif

ifeq "$(CWD)" "/"
CWD := /.
Expand Down

0 comments on commit 6ff5d57

Please sign in to comment.