config/makefiles/xpidl/Makefile.in

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/config/makefiles/xpidl/Makefile.in	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,70 @@
     1.4 +# This Source Code Form is subject to the terms of the Mozilla Public
     1.5 +# License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
     1.7 +
     1.8 +STANDALONE_MAKEFILE := 1
     1.9 +
    1.10 +include $(topsrcdir)/config/rules.mk
    1.11 +
    1.12 +# Building XPIDLs effectively consists of two steps:
    1.13 +#
    1.14 +#   1) Staging all .idl files to a common directory.
    1.15 +#   2) Doing everything with the .idl files.
    1.16 +#
    1.17 +# Each .idl file is processed into a .h file and typelib information.
    1.18 +# The .h file shares the same stem as the input file and is installed
    1.19 +# in the common headers include directory.
    1.20 +#
    1.21 +# XPIDL files are logically grouped together by modules. The typelib
    1.22 +# information for all XPIDLs in the same module is linked together into
    1.23 +# an .xpt file having the name of the module.
    1.24 +#
    1.25 +# As an optimization to reduce overall CPU usage, we process all .idl
    1.26 +# belonging to a module with a single command invocation. This prevents
    1.27 +# redundant parsing of .idl files and significantly reduces CPU cycles.
    1.28 +#
    1.29 +# Future improvement: Headers are currently written to a local directory then
    1.30 +# installed in the distribution directory. It is preferable to write headers
    1.31 +# directly into the distribution directory. However, PGO builds remove the dist
    1.32 +# directory via rm -rf (with no regards to manifests). Since the cost of
    1.33 +# processing XPIDL files is not trivial, it is preferrable to cache the headers
    1.34 +# and reinstall them rather than regenerate them. Ideally the dist pruning is
    1.35 +# performed with manifests. At that time we can write headers directly to the
    1.36 +# dist directory.
    1.37 +
    1.38 +# For dependency files.
    1.39 +idl_deps_dir := .deps
    1.40 +
    1.41 +# Where we put our final, linked .xpt files.
    1.42 +idl_xpt_dir := xpt
    1.43 +
    1.44 +dist_idl_dir := $(DIST)/idl
    1.45 +dist_include_dir := $(DIST)/include
    1.46 +process_py := $(topsrcdir)/python/mozbuild/mozbuild/action/xpidl-process.py
    1.47 +
    1.48 +# TODO we should use py_action, but that would require extra directories to be
    1.49 +# in the virtualenv.
    1.50 +idlprocess := $(PYTHON_PATH) $(PLY_INCLUDE) -I$(IDL_PARSER_DIR) -I$(IDL_PARSER_CACHE_DIR) \
    1.51 +    $(process_py) --cache-dir $(IDL_PARSER_CACHE_DIR) $(dist_idl_dir) \
    1.52 +        $(dist_include_dir) $(idl_xpt_dir) $(idl_deps_dir)
    1.53 +
    1.54 +ifdef LIBXUL_SDK
    1.55 +idlprocess += -I$(LIBXUL_SDK)/idl
    1.56 +endif
    1.57 +
    1.58 +xpidl_modules := @xpidl_modules@
    1.59 +
    1.60 +@xpidl_rules@
    1.61 +
    1.62 +linked_xpt_files := $(addprefix $(idl_xpt_dir)/,$(addsuffix .xpt,$(xpidl_modules)))
    1.63 +depends_files := $(foreach root,$(xpidl_modules),$(idl_deps_dir)/$(root).pp)
    1.64 +
    1.65 +GARBAGE += $(linked_xpt_files) $(depends_files)
    1.66 +
    1.67 +xpidl:: $(linked_xpt_files)
    1.68 +
    1.69 +$(linked_xpt_files): $(process_py) $(call mkdir_deps,$(idl_deps_dir) $(dist_include_dir) $(idl_xpt_dir))
    1.70 +
    1.71 +$(call include_deps,$(depends_files))
    1.72 +
    1.73 +.PHONY: xpidl

mercurial