yellow team mailing list archive
-
yellow team
-
Mailing list archive
-
Message #02036
Fix intermittent d3.v2.min.js Makefile error (issue 6954043)
Reviewers: mp+140560_code.launchpad.net,
Message:
Please take a look.
Description:
Fix intermittent d3.v2.min.js Makefile error
This file failed intermittently because the symlink was wrong. The
symlink was wrong because our use of PWD was fragile. This is a simple
fix.
https://code.launchpad.net/~gary/juju-gui/pwd/+merge/140560
(do not edit description out of merge proposal)
Please review this at https://codereview.appspot.com/6954043/
Affected files:
M Makefile
A [revision details]
Index: Makefile
=== modified file 'Makefile'
--- Makefile 2012-12-18 20:31:15 +0000
+++ Makefile 2012-12-18 22:18:29 +0000
@@ -118,12 +118,13 @@
DATE=$(shell date -u)
APPCACHE=build/juju-ui/assets/manifest.appcache
-# Some environments, notably sudo, do not populate the PWD environment
-# variable, which is used to set $(PWD); however, getting the current
-# directory from `pwd` can get expensive, so we set it once here.
-ifeq ($(PWD),)
- PWD=$(shell pwd)
-endif
+# Some environments, notably sudo, do not populate the default PWD
environment
+# variable, which is used to set $(PWD). Worse, in some situations, such
as
+# using make -C [directory], $(PWD) is set to a value we don't want: the
+# directory in which make was invoked, rather than the directory of this
file.
+# Therefore, we want to run the shell's pwd to get this Makefile's
directory.
+# As an optimization, we stash this value in the local PWD variable.
+PWD=$(shell pwd)
all: build
@echo "\nDebug and production environments built."
Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: bac@xxxxxxxxxxxxx-20121218211611-zvbqwr2je5xtr7jt
+New revision: gary.poster@xxxxxxxxxxxxx-20121218221829-wysgvayvq75yjrug
--
https://code.launchpad.net/~gary/juju-gui/pwd/+merge/140560
Your team Juju GUI Hackers is requested to review the proposed merge of lp:~gary/juju-gui/pwd into lp:juju-gui.
References