User:Gszorc/Build frontend shootout: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
mNo edit summary
Line 11: Line 11:
===Makefile===
===Makefile===


This is what things would look like in a Makefile.in today in mozilla-central.
This is what things would look like in a Makefile.in today in mozilla-central. This example is abbreviated from dom/base/Makefile.in.


<code><pre>
<code><pre>
Line 18: Line 18:
srcdir := @srcdir@
srcdir := @srcdir@
VPATH := @srcdir@
VPATH := @srcdir@
FAIL_ON_WARNINGS := 1


include $(DEPTH)/config/autoconf.mk
include $(DEPTH)/config/autoconf.mk


CPPSRCS := \
MODULE = dom
   foo.cpp \
LIBRARY_NAME = jsdombase_s
   bar.cpp \
LIBXUL_LIBRARY = 1
FORCE_STATIC_LIB = 1
 
DIRS = \
  test \
   $(NULL)
 
EXTRA_PP_COMPONENTS = \
  ConsoleAPI.js \
  ConsoleAPI.manifest \
   $(NULL)
 
EXTRA_JS_MODULES = ConsoleAPIStorage.jsm \
   $(NULL)
   $(NULL)


CXXFLAGS += -DFOO=1
EXTRA_JS_MODULES += \
  DOMRequestHelper.jsm \
  IndexedDBHelper.jsm \
  ObjectWrapper.jsm \
  $(NULL)


ifneq (,WIN32)
XPIDLSRCS = \
CPPSRCS += win32.cpp
  nsIDOMDOMError.idl \
  nsIDOMDOMRequest.idl \
  nsIEntropyCollector.idl \
  nsIScriptChannel.idl \
  $(NULL)
 
EXPORTS = \
  nsDOMCID.h \
  nsDOMClassInfoClasses.h \
  nsDOMClassInfoID.h \
  nsDOMJSUtils.h \
  $(NULL)
 
EXPORTS_NAMESPACES = mozilla/dom
EXPORTS_mozilla/dom = \
  DOMError.h \
  DOMRequest.h \
  StructuredCloneTags.h \
  ScreenOrientation.h \
  $(NULL)
 
CPPSRCS =               \
  nsBarProps.cpp        \
  nsDOMException.cpp \
  nsDOMWindowUtils.cpp \
  nsJSEnvironment.cpp \
  $(NULL)
 
include $(topsrcdir)/dom/dom-config.mk
 
ifdef MOZ_JSDEBUGGER
DEFINES += -DMOZ_JSDEBUGGER
endif
endif
ifdef MOZ_B2G_RIL
DEFINES += -DMOZ_B2G_RIL
endif
include $(topsrcdir)/config/config.mk
include $(topsrcdir)/ipc/chromium/chromium-config.mk


include $(topsrcdir)/config/rules.mk
include $(topsrcdir)/config/rules.mk
LOCAL_INCLUDES += \
  -I$(topsrcdir)/js/xpconnect/src \
  -I$(topsrcdir)/js/xpconnect/wrappers \
  -I$(topsrcdir)/xpcom/ds \
  $(NULL)
ifdef MOZ_X11
CXXFLAGS += $(TK_CFLAGS)
LDFLAGS += $(TK_LIBS)
endif
XPIDL_FLAGS += \
  -I$(topsrcdir)/dom/interfaces/events \
  $(NULL)
</pre></code>
</pre></code>


Line 40: Line 110:


<code><pre>
<code><pre>
CPP_SOURCES = ['foo.cpp', 'bar.cpp']
FAIL_ON_WARNINGS = True
CPP_FLAGS = ['-DFOO=1']
 
MODULE = {
    'name': 'dom',
    'library_name': 'jsdombase_s',
    'libxul': True,
    'static': True,
}


if ENV.WIN32:
DIRS = ['test']
     CPP_SOURCES += ['win32.cpp']
 
EXTRA_PP_COMPONENTS = [
    'ConsoleAPI.js',
    'ConsoleAPI.manifest'
]
 
EXTRA_JS_MODULES = ['ConsoleAPIStorage.jsm']
 
EXTRA_JS_MODULES = [
    'DOMRequestHelper.jsm',
    'IndexedDBHelper.jsm',
    'ObjectWrapper.jsm',
]
 
XPIDLSRCS = [
    'nsIDOMDOMError.idl',
    'nsIDOMDOMRequest.idl',
    'nsIEntropyCollector.idl',
    'nsIScriptChannel.idl',
]
 
EXPORTS['__main__'] = [
    'nsDOMCID.h',
    'nsDOMClassInfoClasses.h',
    'nsDOMClassInfoID.h',
    'nsDOMJSUtils.h',
]
 
EXPORTS['mozilla/dom'] = [
    'DOMError.h,
    'DOMRequest.h,
    'StructuredCloneTags.h',
    'ScreenOrientation.h',
]
 
CPPSRCS = [
    'nsBarProps.cpp',
    'nsDOMException.cpp',
    'nsDOMWindowUtils.cpp',
    'nsJSEnvironment.cpp',
]
 
if not ENV.MOZ_JSDEBUGGER:
     DEFINES += ['MOZ_JSDEBUGGER']
 
if not ENV.MOZ_B2G_RIL:
    DEFINES += ['MOZ_B2G_RIL']
 
LOCAL_SRCDIR_INCLUDES = [
    'js/xpconnect/src',
    'js/xpconnect/wrappers',
    'xpcom/ds',
]
 
if ENV.MOZ_X11:
    CXXFLAGS += ENV.TK_CFLAGS
    LDFLAGS += ENV.TK_LIBS
 
XPIDL_SRCDIR_INCLUDES = ['dom/interfaces/events']
</pre></code>
</pre></code>


Line 52: Line 186:


<code><pre>
<code><pre>
CPP_SOURCES('foo.cpp', 'bar.cpp')
TODO
CPP_FLAGS('-DFOO=1')
 
if ENV.WIN32:
    CPP_SOURCES('win32.cpp')
</pre></code>
</pre></code>


canmove, Confirmed users
409

edits

Navigation menu