зеркало из https://github.com/mozilla/pjs.git
Import a new rev of pymake which fixes, among other things, bug 576914
This commit is contained in:
Родитель
a50dcbc4c4
Коммит
eebece6702
|
@ -1,2 +1,2 @@
|
|||
repo: f5ab154deef2ffa97f1b2139589ae4a1962090a4
|
||||
node: 3476582628db128ad061c30cab1a74a0c5d14b9b
|
||||
node: 7ae0b4af32617677698f9de3ab76bcb154bbf085
|
||||
|
|
|
@ -1402,7 +1402,7 @@ class Makefile(object):
|
|||
Inform the makefile of a target which is a candidate for being the default target,
|
||||
if there isn't already a default target.
|
||||
"""
|
||||
if self.defaulttarget is None:
|
||||
if self.defaulttarget is None and t != '.PHONY':
|
||||
self.defaulttarget = t
|
||||
|
||||
def getpatternvariables(self, pattern):
|
||||
|
|
|
@ -284,7 +284,7 @@ def ifeq(d, offset):
|
|||
if token == '(':
|
||||
arg1, t, offset = parsemakesyntax(d, offset, (',',), itermakefilechars)
|
||||
if t is None:
|
||||
raise SyntaxError("Expected two arguments in conditional", d.getloc(offset))
|
||||
raise SyntaxError("Expected two arguments in conditional", d.getloc(d.lend))
|
||||
|
||||
arg1.rstrip()
|
||||
|
||||
|
@ -604,6 +604,9 @@ class ParseStackFrame(object):
|
|||
self.function = function
|
||||
self.loc = loc
|
||||
|
||||
def __str__(self):
|
||||
return "<state=%i expansion=%s tokenlist=%s openbrace=%s closebrace=%s>" % (self.parsestate, self.expansion, self.tokenlist, self.openbrace, self.closebrace)
|
||||
|
||||
_matchingbrace = {
|
||||
'(': ')',
|
||||
'{': '}',
|
||||
|
@ -689,7 +692,7 @@ def parsemakesyntax(d, offset, stopon, iterfunc):
|
|||
stacktop.expansion.appendstr(token)
|
||||
stacktop = ParseStackFrame(_PARSESTATE_PARENMATCH, stacktop,
|
||||
stacktop.expansion,
|
||||
(token, stacktop.closebrace),
|
||||
(token, stacktop.closebrace, '$'),
|
||||
openbrace=token, closebrace=stacktop.closebrace, loc=d.getloc(tokenoffset))
|
||||
elif parsestate == _PARSESTATE_PARENMATCH:
|
||||
assert token == stacktop.closebrace
|
||||
|
|
|
@ -3,6 +3,8 @@ test: VAR = value
|
|||
%.do:
|
||||
@echo TEST-FAIL: ran target "$@", should have run "all"
|
||||
|
||||
.PHONY: test
|
||||
|
||||
all:
|
||||
@echo TEST-PASS: the default target is all
|
||||
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
#T returncode: 2
|
||||
|
||||
ifeq ($(FOO,VAR))
|
||||
all:
|
||||
@echo TEST_FAIL
|
||||
endif
|
|
@ -1,5 +1,5 @@
|
|||
$(shell \
|
||||
if test ! -f include-dynamic.inc; then \
|
||||
if ! test -f include-dynamic.inc; then \
|
||||
echo "TESTVAR = oldval" > include-dynamic.inc; \
|
||||
sleep 2; \
|
||||
echo "TESTVAR = newval" > include-dynamic.inc.in; \
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Загрузка…
Ссылка в новой задаче