js/xpconnect/src/Makefile.in
author Mike Hommey <mh+mozilla@glandium.org>
Fri, 22 Nov 2013 08:16:18 +0900
changeset 156999 c30371a66429ff76a0af42baaa1afa172105db84
parent 156195 7161a2d28363197b76f4090900393cb19f201de4
child 157071 de482d38dc539cb60f4349e42604bf4bbf8a31b9
permissions -rw-r--r--
Bug 941450 - Add some GENERATED_FILES to moz.build. r=gps

#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

LOCAL_INCLUDES = \
		-I$(srcdir)/../wrappers \
		-I$(srcdir)/../loader \
		-I$(topsrcdir)/caps/include \
		-I$(topsrcdir)/content/base/src \
		-I$(topsrcdir)/content/base/public \
		-I$(topsrcdir)/content/events/src \
		-I$(topsrcdir)/content/html/content/src \
		-I$(topsrcdir)/content/html/document/src \
		-I$(topsrcdir)/content/svg/content/src \
		-I$(topsrcdir)/layout/style \
		-I$(topsrcdir)/layout/base \
		-I$(topsrcdir)/dom/base \
		-I$(topsrcdir)/xpcom/ds \
		-I$(topsrcdir)/js/ipc \
		$(NULL)

ifdef MOZ_B2G_BT
LOCAL_INCLUDES += \
    -I$(topsrcdir)/dom/bluetooth \
    $(NULL)
endif

EXTRA_MDDEPEND_FILES = dom_qsgen.pp dictionary_helper_gen.pp event_impl_gen.pp

INSTALL_TARGETS += extra_export_files
extra_export_files_FILES := \
  DictionaryHelpers.h \
  GeneratedEventClasses.h \
  GeneratedEvents.h \
  $(NULL)
extra_export_files_DEST = $(DIST)/include
extra_export_files_TARGET := export

# XPCShellImpl.cpp requires hardcoded vendor/profile/appname stuff on Windows
# This sucks, bug 921148 tracks this.
ifeq (windows,$(MOZ_WIDGET_TOOLKIT))
  ifdef MOZ_APP_PROFILE
    DEFINES += -DMOZ_APP_PROFILE='"$(MOZ_APP_PROFILE)"'
  else
    ifdef MOZ_APP_VENDOR
      DEFINES += -DMOZ_APP_VENDOR='"$(MOZ_APP_VENDOR)"'
    endif
    ifdef MOZ_APP_BASENAME
      DEFINES += -DMOZ_APP_BASENAME='"$(MOZ_APP_BASENAME)"'
    endif
    DEFINES += -DMOZ_APP_NAME='"$(MOZ_APP_NAME)"'
  endif
endif

include $(topsrcdir)/config/rules.mk

DEFINES += \
  -DJS_THREADSAFE \
  $(NULL)

ifdef MOZ_JSDEBUGGER
DEFINES += -DMOZ_JSDEBUGGER
endif

dom_quickstubs.h: dom_quickstubs.cpp

dom_quickstubs.cpp: $(srcdir)/dom_quickstubs.qsconf \
                    $(srcdir)/qsgen.py \
                    $(LIBXUL_DIST)/sdk/bin/header.py \
                    $(LIBXUL_DIST)/sdk/bin/xpidl.py
	$(PYTHON) $(topsrcdir)/config/pythonpath.py \
	  $(PLY_INCLUDE) \
	  -I$(LIBXUL_DIST)/sdk/bin \
	  $(srcdir)/qsgen.py \
	  --idlpath=$(DEPTH)/dist/idl \
	  --header-output dom_quickstubs.h \
	  --stub-output dom_quickstubs.cpp \
	  --makedepend-output $(MDDEPDIR)/dom_qsgen.pp \
	  $(ENABLE_TRACEABLE_FLAGS) \
	  $(srcdir)/dom_quickstubs.qsconf

DictionaryHelpers.h: DictionaryHelpers.cpp

DictionaryHelpers.cpp: $(srcdir)/dictionary_helper_gen.conf \
                       event_impl_gen.conf \
                       $(srcdir)/dictionary_helper_gen.py \
                       $(LIBXUL_DIST)/sdk/bin/header.py \
                       $(LIBXUL_DIST)/sdk/bin/xpidl.py
	$(PYTHON) $(topsrcdir)/config/pythonpath.py \
	  $(PLY_INCLUDE) \
	  -I$(LIBXUL_DIST)/sdk/bin \
	  $(srcdir)/dictionary_helper_gen.py \
	  -I $(DEPTH)/dist/idl \
	  --header-output DictionaryHelpers.h \
	  --stub-output DictionaryHelpers.cpp \
	  --makedepend-output $(MDDEPDIR)/dictionary_helper_gen.pp \
	  $(srcdir)/dictionary_helper_gen.conf \
	  event_impl_gen.conf

event_impl_gen.conf : $(srcdir)/event_impl_gen.conf.in
	$(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) $^ -o event_impl_gen.conf)

GeneratedEvents.h: $(srcdir)/dictionary_helper_gen.conf \
                   event_impl_gen.conf \
                   $(srcdir)/dictionary_helper_gen.py \
                   $(srcdir)/event_impl_gen.py \
                   $(LIBXUL_DIST)/sdk/bin/header.py \
                   $(LIBXUL_DIST)/sdk/bin/xpidl.py
	$(PYTHON) $(topsrcdir)/config/pythonpath.py \
	  $(PLY_INCLUDE) \
	  -I$(LIBXUL_DIST)/sdk/bin \
	  $(srcdir)/event_impl_gen.py \
	  -I $(DEPTH)/dist/idl \
	  --header-output GeneratedEvents.h \
	  event_impl_gen.conf

GeneratedEventClasses.h: GeneratedEvents.cpp

GeneratedEvents.cpp: DictionaryHelpers.h \
                     GeneratedEvents.h \
                     $(srcdir)/dictionary_helper_gen.conf \
                     event_impl_gen.conf \
                     $(srcdir)/dictionary_helper_gen.py \
                     $(srcdir)/event_impl_gen.py \
                     $(LIBXUL_DIST)/sdk/bin/header.py \
                     $(LIBXUL_DIST)/sdk/bin/xpidl.py
	$(PYTHON) $(topsrcdir)/config/pythonpath.py \
	  $(PLY_INCLUDE) \
	  -I$(LIBXUL_DIST)/sdk/bin \
	  $(srcdir)/event_impl_gen.py \
	  -I $(DEPTH)/dist/idl \
	  --class-declarations GeneratedEventClasses.h \
	  --stub-output GeneratedEvents.cpp \
	  --makedepend-output $(MDDEPDIR)/event_impl_gen.pp \
	  event_impl_gen.conf

GeneratedEvents-webidl: event_impl_gen.conf
	$(PYTHON) $(topsrcdir)/config/pythonpath.py \
	  $(PLY_INCLUDE) \
	  -I$(LIBXUL_DIST)/sdk/bin \
	  $(srcdir)/event_impl_gen.py \
	  -I $(DEPTH)/dist/idl \
	  --webidltarget=$(top_srcdir)/dom/webidl \
	  event_impl_gen.conf

GARBAGE += \
		event_impl_gen.conf \
		xpidl_debug \
		$(MDDEPDIR)/dom_qsgen.pp \
		$(MDDEPDIR)/dombindingsgen.pp \
		$(MDDEPDIR)/dictionary_helper_gen.pp \
		$(MDDEPDIR)/event_impl_gen.pp \
		$(wildcard $(topsrcdir)/other-licenses/ply/ply/*.pyc) \
		$(NULL)