Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit 667f63d

Browse files
committed
Bug 513032 - remove empty conditionals in our makefiles, r=ted
1 parent dbf75d5 commit 667f63d

41 files changed

Lines changed: 20 additions & 105 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

accessible/src/html/Makefile.in

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ LIBRARY_NAME = accessibility_html_s
4848
LIBXUL_LIBRARY = 1
4949

5050

51-
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
52-
endif
5351

5452
CPPSRCS = \
5553
nsHTMLAreaAccessible.cpp \

accessible/src/xforms/Makefile.in

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ LIBRARY_NAME = accessibility_xforms_s
4848
LIBXUL_LIBRARY = 1
4949

5050

51-
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
52-
endif
5351

5452
CPPSRCS = \
5553
nsXFormsAccessible.cpp \

accessible/src/xul/Makefile.in

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ LIBRARY_NAME = accessibility_xul_s
4848
LIBXUL_LIBRARY = 1
4949

5050

51-
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
52-
endif
5351

5452
CPPSRCS = \
5553
nsXULAlertAccessible.cpp \

build/pymake/pymake/parser.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ def parsestream(fd, filename):
518518
raise SyntaxError("unmatched 'endif' directive",
519519
d.getloc(offset))
520520

521-
condstack.pop()
521+
condstack.pop().endloc = d.getloc(offset)
522522
continue
523523

524524
if kword == 'else':
@@ -529,14 +529,14 @@ def parsestream(fd, filename):
529529
kword, offset = d.findtoken(offset, _conditionkeywordstokenlist, True)
530530
if kword is None:
531531
_ensureend(d, offset, "Unexpected data after 'else' directive.")
532-
condstack[-1].addcondition(d.getloc(offset), parserdata.ElseCondition())
532+
condstack[-1].addcondition(d.getloc(0), parserdata.ElseCondition())
533533
else:
534534
if kword not in _conditionkeywords:
535535
raise SyntaxError("Unexpected condition after 'else' directive.",
536536
d.getloc(offset))
537537

538538
c = _conditionkeywords[kword](d, offset)
539-
condstack[-1].addcondition(d.getloc(offset), c)
539+
condstack[-1].addcondition(d.getloc(0), c)
540540
continue
541541

542542
if kword in _conditionkeywords:

build/pymake/pymake/parserdata.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,10 +335,11 @@ def __init__(self, loc, condition):
335335
self.addcondition(loc, condition)
336336

337337
def getloc(self):
338-
return self._groups[0][0].loc
338+
return self.loc
339339

340340
def addcondition(self, loc, condition):
341341
assert isinstance(condition, Condition)
342+
condition.loc = loc
342343

343344
if len(self._groups) and isinstance(self._groups[-1][0], ElseCondition):
344345
raise parser.SyntaxError("Multiple else conditions for block starting at %s" % self.loc, loc)
@@ -371,6 +372,12 @@ def dump(self, fd, indent):
371372
def __iter__(self):
372373
return iter(self._groups)
373374

375+
def __len__(self):
376+
return len(self._groups)
377+
378+
def __getitem__(self, i):
379+
return self._groups[i]
380+
374381
class Include(Statement):
375382
__slots__ = ('exp', 'required')
376383

config/config.mk

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -215,20 +215,12 @@ ifeq ($(first_match), $(MODULE))
215215
_DEBUG_CFLAGS += $(MOZ_DEBUG_FLAGS)
216216
_DEBUG_LDFLAGS += $(MOZ_DEBUG_LDFLAGS)
217217
else
218-
ifeq ($(first_match), ^$(MODULE))
219-
# the user specified explicitly that this module
220-
# should not be compiled with -g (nothing to do)
221-
else
218+
ifneq ($(first_match), ^$(MODULE))
222219
ifeq ($(first_match), ALL_MODULES)
223220
# the user didn't mention this module explicitly,
224221
# but wanted all modules to be compiled with -g
225222
_DEBUG_CFLAGS += $(MOZ_DEBUG_FLAGS)
226223
_DEBUG_LDFLAGS += $(MOZ_DEBUG_LDFLAGS)
227-
else
228-
ifeq ($(first_match), ^ALL_MODULES)
229-
# the user didn't mention this module explicitly,
230-
# but wanted all modules to be compiled without -g (nothing to do)
231-
endif
232224
endif
233225
endif
234226
endif

config/rules.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,8 +1296,7 @@ ifdef EMBED_MANIFEST_AT
12961296
endif # EMBED_MANIFEST_AT
12971297
endif # MSVC with manifest tool
12981298
endif # WINNT && !GCC
1299-
ifeq ($(OS_ARCH),Darwin)
1300-
else # non-Darwin
1299+
ifneq ($(OS_ARCH),Darwin)
13011300
@rm -f $(SUB_SHLOBJS)
13021301
endif # Darwin
13031302
@rm -f foodummyfilefoo $(DELETE_AFTER_LINK)

content/base/src/Makefile.in

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ LIBRARY_NAME = gkconbase_s
4747
LIBXUL_LIBRARY = 1
4848

4949

50-
ifdef ACCESSIBILITY
51-
endif
5250

5351
EXPORTS = \
5452
nsAtomListUtils.h \

content/xslt/src/base/Makefile.in

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ LIBRARY_NAME = txbase_s
4747
LIBXUL_LIBRARY = 1
4848

4949

50-
ifndef MOZ_XSLT_STANDALONE
51-
endif
5250

5351
CPPSRCS = txDouble.cpp \
5452
txList.cpp \

content/xslt/src/xml/Makefile.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ LIBRARY_NAME = txxml_s
4747
LIBXUL_LIBRARY = 1
4848

4949

50-
ifndef MOZ_XSLT_STANDALONE
51-
else
52-
endif
5350

5451
CPPSRCS = \
5552
txXMLUtils.cpp \

0 commit comments

Comments
 (0)