Bug 513032 - remove empty conditionals in our makefiles, r=ted

This commit is contained in:
Benjamin Smedberg 2009-08-27 10:48:18 -07:00
parent dbf75d51ad
commit 667f63d102
41 changed files with 20 additions and 105 deletions

View File

@ -48,8 +48,6 @@ LIBRARY_NAME = accessibility_html_s
LIBXUL_LIBRARY = 1
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
endif
CPPSRCS = \
nsHTMLAreaAccessible.cpp \

View File

@ -48,8 +48,6 @@ LIBRARY_NAME = accessibility_xforms_s
LIBXUL_LIBRARY = 1
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
endif
CPPSRCS = \
nsXFormsAccessible.cpp \

View File

@ -48,8 +48,6 @@ LIBRARY_NAME = accessibility_xul_s
LIBXUL_LIBRARY = 1
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
endif
CPPSRCS = \
nsXULAlertAccessible.cpp \

View File

@ -518,7 +518,7 @@ def parsestream(fd, filename):
raise SyntaxError("unmatched 'endif' directive",
d.getloc(offset))
condstack.pop()
condstack.pop().endloc = d.getloc(offset)
continue
if kword == 'else':
@ -529,14 +529,14 @@ def parsestream(fd, filename):
kword, offset = d.findtoken(offset, _conditionkeywordstokenlist, True)
if kword is None:
_ensureend(d, offset, "Unexpected data after 'else' directive.")
condstack[-1].addcondition(d.getloc(offset), parserdata.ElseCondition())
condstack[-1].addcondition(d.getloc(0), parserdata.ElseCondition())
else:
if kword not in _conditionkeywords:
raise SyntaxError("Unexpected condition after 'else' directive.",
d.getloc(offset))
c = _conditionkeywords[kword](d, offset)
condstack[-1].addcondition(d.getloc(offset), c)
condstack[-1].addcondition(d.getloc(0), c)
continue
if kword in _conditionkeywords:

View File

@ -335,10 +335,11 @@ class ConditionBlock(Statement):
self.addcondition(loc, condition)
def getloc(self):
return self._groups[0][0].loc
return self.loc
def addcondition(self, loc, condition):
assert isinstance(condition, Condition)
condition.loc = loc
if len(self._groups) and isinstance(self._groups[-1][0], ElseCondition):
raise parser.SyntaxError("Multiple else conditions for block starting at %s" % self.loc, loc)
@ -371,6 +372,12 @@ class ConditionBlock(Statement):
def __iter__(self):
return iter(self._groups)
def __len__(self):
return len(self._groups)
def __getitem__(self, i):
return self._groups[i]
class Include(Statement):
__slots__ = ('exp', 'required')

View File

@ -215,20 +215,12 @@ ifeq ($(first_match), $(MODULE))
_DEBUG_CFLAGS += $(MOZ_DEBUG_FLAGS)
_DEBUG_LDFLAGS += $(MOZ_DEBUG_LDFLAGS)
else
ifeq ($(first_match), ^$(MODULE))
# the user specified explicitly that this module
# should not be compiled with -g (nothing to do)
else
ifneq ($(first_match), ^$(MODULE))
ifeq ($(first_match), ALL_MODULES)
# the user didn't mention this module explicitly,
# but wanted all modules to be compiled with -g
_DEBUG_CFLAGS += $(MOZ_DEBUG_FLAGS)
_DEBUG_LDFLAGS += $(MOZ_DEBUG_LDFLAGS)
else
ifeq ($(first_match), ^ALL_MODULES)
# the user didn't mention this module explicitly,
# but wanted all modules to be compiled without -g (nothing to do)
endif
endif
endif
endif

View File

@ -1296,8 +1296,7 @@ ifdef EMBED_MANIFEST_AT
endif # EMBED_MANIFEST_AT
endif # MSVC with manifest tool
endif # WINNT && !GCC
ifeq ($(OS_ARCH),Darwin)
else # non-Darwin
ifneq ($(OS_ARCH),Darwin)
@rm -f $(SUB_SHLOBJS)
endif # Darwin
@rm -f foodummyfilefoo $(DELETE_AFTER_LINK)

View File

@ -47,8 +47,6 @@ LIBRARY_NAME = gkconbase_s
LIBXUL_LIBRARY = 1
ifdef ACCESSIBILITY
endif
EXPORTS = \
nsAtomListUtils.h \

View File

@ -47,8 +47,6 @@ LIBRARY_NAME = txbase_s
LIBXUL_LIBRARY = 1
ifndef MOZ_XSLT_STANDALONE
endif
CPPSRCS = txDouble.cpp \
txList.cpp \

View File

@ -47,9 +47,6 @@ LIBRARY_NAME = txxml_s
LIBXUL_LIBRARY = 1
ifndef MOZ_XSLT_STANDALONE
else
endif
CPPSRCS = \
txXMLUtils.cpp \

View File

@ -47,8 +47,6 @@ LIBRARY_NAME = txxpath_s
LIBXUL_LIBRARY = 1
ifndef MOZ_XSLT_STANDALONE
endif
CPPSRCS = \
txBooleanExpr.cpp \

View File

@ -47,9 +47,6 @@ LIBRARY_NAME = txxslt_s
LIBXUL_LIBRARY = 1
ifndef MOZ_XSLT_STANDALONE
else
endif
CPPSRCS = \
txNodeSorter.cpp \

View File

@ -47,8 +47,6 @@ LIBRARY_NAME = jsdomstorage_s
LIBXUL_LIBRARY = 1
ifdef MOZ_STORAGE
endif
CPPSRCS = \
nsDOMStorage.cpp \

View File

@ -62,8 +62,6 @@ DEFFILE = npmozax.def
GRE_MODULE = 1
ifdef XPC_IDISPATCH_SUPPORT
endif
XPIFILE = mozactivex.xpi
FORCE_SHARED_LIB = 1

View File

@ -50,8 +50,6 @@ FORCE_STATIC_LIB = 1
DEFINES += -DIMPL_XREAPI
ifdef ACCESSIBILITY
endif
CPPSRCS = \
gtkmozembed2.cpp \

View File

@ -50,8 +50,6 @@ GRE_MODULE = 1
LIBXUL_LIBRARY = 1
ifdef MOZ_PHOENIX
endif
EXPORTS = \
nsCTooltipTextProvider.h \

View File

@ -36,11 +36,11 @@
# ***** END LICENSE BLOCK *****
ifneq (extensions,$(MOZ_BUILD_APP))
$(error This file shouldn't be included without --enable-application=extensions
$(error This file shouldn't be included without --enable-application=extensions)
endif
ifndef MOZ_EXTENSIONS
$(error You forgot to set --enable-extensions
$(error You forgot to set --enable-extensions)
endif
TIERS += app

View File

@ -64,8 +64,7 @@ endif
# Build MMX code either with VC or with gcc-on-x86
ifdef _MSC_VER
ifeq (86,$(findstring 86,$(OS_TEST)))
ifeq (64,$(findstring 64,$(OS_TEST)))
else
ifneq (64,$(findstring 64,$(OS_TEST)))
USE_MMX=1
USE_SSE2=1
MMX_CFLAGS=

View File

@ -64,8 +64,6 @@ CPPSRCS = \
nsScriptableRegion.cpp \
$(NULL)
ifeq (,$(filter windows,$(MOZ_WIDGET_TOOLKIT)))
endif
EXTRA_DSO_LDOPTS = \
$(MOZ_UNICHARUTIL_LIBS) \

View File

@ -54,8 +54,6 @@ GRE_MODULE = 1
LIBXUL_LIBRARY = 1
ifeq (,$(filter windows,$(MOZ_WIDGET_TOOLKIT)))
endif
CPPSRCS = \
nsThebesDeviceContext.cpp \

View File

@ -69,8 +69,7 @@ CPPSRCS = \
nsScriptableUConv.cpp \
$(NULL)
ifdef MOZ_USE_NATIVE_UCONV
else
ifndef MOZ_USE_NATIVE_UCONV
CPPSRCS += \
nsISO88591ToUnicode.cpp \
nsCP1252ToUnicode.cpp \

View File

@ -54,8 +54,6 @@ endif
# REQUIRES = java js
ifndef JSD_STANDALONE
endif
EXTRA_DSO_LDOPTS += \
$(MOZ_COMPONENT_LIBS) \

View File

@ -215,20 +215,12 @@ ifeq ($(first_match), $(MODULE))
_DEBUG_CFLAGS += $(MOZ_DEBUG_FLAGS)
_DEBUG_LDFLAGS += $(MOZ_DEBUG_LDFLAGS)
else
ifeq ($(first_match), ^$(MODULE))
# the user specified explicitly that this module
# should not be compiled with -g (nothing to do)
else
ifneq ($(first_match), ^$(MODULE))
ifeq ($(first_match), ALL_MODULES)
# the user didn't mention this module explicitly,
# but wanted all modules to be compiled with -g
_DEBUG_CFLAGS += $(MOZ_DEBUG_FLAGS)
_DEBUG_LDFLAGS += $(MOZ_DEBUG_LDFLAGS)
else
ifeq ($(first_match), ^ALL_MODULES)
# the user didn't mention this module explicitly,
# but wanted all modules to be compiled without -g (nothing to do)
endif
endif
endif
endif

View File

@ -1296,8 +1296,7 @@ ifdef EMBED_MANIFEST_AT
endif # EMBED_MANIFEST_AT
endif # MSVC with manifest tool
endif # WINNT && !GCC
ifeq ($(OS_ARCH),Darwin)
else # non-Darwin
ifneq ($(OS_ARCH),Darwin)
@rm -f $(SUB_SHLOBJS)
endif # Darwin
@rm -f foodummyfilefoo $(DELETE_AFTER_LINK)

View File

@ -53,8 +53,6 @@ LIBRARY_NAME = gkbase_s
LIBXUL_LIBRARY = 1
ifdef ACCESSIBILITY
endif
XPIDLSRCS = \
nsIStyleSheetService.idl \

View File

@ -53,8 +53,6 @@ LIBRARY_NAME = gkforms_s
LIBXUL_LIBRARY = 1
ifdef ACCESSIBILITY
endif
EXPORTS = \
nsIListControlFrame.h \

View File

@ -50,8 +50,6 @@ LIBRARY_NAME = gkgeneric_s
LIBXUL_LIBRARY = 1
ifdef ACCESSIBILITY
endif
EXPORTS = \
nsQueryFrame.h \

View File

@ -47,8 +47,6 @@ LIBRARY_NAME = inspector_s
LIBXUL_LIBRARY = 1
ifdef ACCESSIBILITY
endif
CPPSRCS= \
inDeepTreeWalker.cpp \

View File

@ -47,8 +47,6 @@ LIBRARY_NAME = gktable_s
LIBXUL_LIBRARY = 1
ifdef ACCESSIBILITY
endif
EXPORTS = \
nsITableCellLayout.h \

View File

@ -47,8 +47,6 @@ LIBRARY_NAME = gkxulbase_s
LIBXUL_LIBRARY = 1
ifdef MOZ_ENABLE_CANVAS
endif
ifdef MOZ_XUL
PARALLEL_DIRS = tree/public tree/src grid

View File

@ -76,8 +76,7 @@ CSRCS = \
ifeq ($(findstring 86,$(OS_TEST)), 86)
ifeq ($(OS_ARCH),WINNT)
ifeq (64,$(findstring 64,$(OS_TEST)))
else
ifneq (64,$(findstring 64,$(OS_TEST)))
VPATH += $(srcdir)/dec/x86_vc
CSRCS += \

View File

@ -52,8 +52,6 @@ GRE_MODULE = 1
LIBXUL_LIBRARY = 1
ifneq (,$(filter gtk2,$(MOZ_WIDGET_TOOLKIT)))
endif
CPPSRCS = \
nsNPAPIPlugin.cpp \

View File

@ -56,8 +56,6 @@ DEFINES += -DALERTS_SERVICE
endif
ifdef ALERTS_SERVICE
endif
EXPORTS = nsToolkitCompsCID.h

View File

@ -46,8 +46,5 @@ include $(DEPTH)/config/autoconf.mk
DIRS = global
#DIRS += mozapps
ifdef MOZ_HELP_VIEWER
#DIRS += help
endif
include $(topsrcdir)/config/rules.mk

View File

@ -48,14 +48,8 @@ LIBRARY_NAME = xulapp_s
LIBXUL_LIBRARY = 1
ifdef MOZ_JPROF
endif
ifdef NS_TRACE_MALLOC
endif
ifdef MOZ_CRASHREPORTER
endif
FORCE_STATIC_LIB = 1

View File

@ -72,8 +72,6 @@ MODULE = exthandler
LIBRARY_NAME = exthandler_s
LIBXUL_LIBRARY = 1
ifdef MOZ_PHOENIX
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)

View File

@ -52,8 +52,6 @@ GRE_MODULE = 1
LIBXUL_LIBRARY = 1
ifdef ACCESSIBILITY
endif
EXPORTS = \
mozView.h \

View File

@ -53,8 +53,6 @@ LIBXUL_LIBRARY = 1
NATIVE_THEME_SUPPORT = 1
ifdef MOZ_X11
endif
CSRCS = \
mozcontainer.c \
@ -107,8 +105,6 @@ CPPSRCS += nsClipboard.cpp \
endif
# build our subdirs, too
ifdef ACCESSIBILITY
endif
SHARED_LIBRARY_LIBS = ../xpwidgets/libxpwidgets_s.a

View File

@ -64,8 +64,6 @@ GRE_MODULE = 1
MOZILLA_INTERNAL_API = 1
ifdef NS_TRACE_MALLOC
endif
CSRCS = \
$(XPCOM_GLUE_SRC_LCSRCS) \

View File

@ -52,8 +52,6 @@ LIBRARY_NAME = xpcomglue_s
DIST_INSTALL = 1
ifdef NS_TRACE_MALLOC
endif
LOCAL_INCLUDES = \
-I$(srcdir)/../build \

View File

@ -48,8 +48,6 @@ FORCE_STATIC_LIB = 1
LIBXUL_LIBRARY = 1
MODULE_NAME = nsBrowserModule
ifneq (,$(MOZ_PHOENIX)$(MOZ_XULRUNNER))
endif
CPPSRCS = \
nsBrowserInstance.cpp \