xpcom/idl-parser/Makefile.in
author Nicholas Cameron <ncameron@mozilla.com>
Tue, 22 Oct 2013 14:14:41 +0200
changeset 225286 d9d1983edb5c790457a6d2f2d7cdb1bb810430f4
parent 147377 f18eae7c3b27f23a9199f3534d2072066aea95e9
permissions -rw-r--r--
Bug 914847 - Mini-flush for animations. r=dbaron, a=1.3+

#
# 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/.

PARSER_SRCS = \
  header.py \
  typelib.py \
  xpidl.py \
  $(NULL)

SDK_BINARY = \
  $(PARSER_SRCS) \
  $(IDL_PARSER_CACHE_DIR)/xpidllex.py \
  $(IDL_PARSER_CACHE_DIR)/xpidlyacc.py \
  $(NULL)

SDK_BINARY_TARGET = xpidl-parser

PLY_FILES = \
  $(topsrcdir)/other-licenses/ply/ply/__init__.py \
  $(topsrcdir)/other-licenses/ply/ply/lex.py \
  $(topsrcdir)/other-licenses/ply/ply/yacc.py \
  $(NULL)

PLY_DEST = $(SDK_BIN_DIR)/ply
INSTALL_TARGETS += PLY
PLY_TARGET = xpidl-parser

include $(topsrcdir)/config/rules.mk

# Generate the PLY lexer and parser.
$(IDL_PARSER_CACHE_DIR)/xpidllex.py: $(PARSER_SRCS) $(PLY_FILES)
	$(PYTHON_PATH) \
	  $(PLY_INCLUDE) \
	  $(srcdir)/header.py --cachedir=$(IDL_PARSER_CACHE_DIR) --regen

# generating xpidllex.py generates xpidlyacc.py too
$(IDL_PARSER_CACHE_DIR)/xpidlyacc.py: $(IDL_PARSER_CACHE_DIR)/xpidllex.py

check::
	$(PYTHON_PATH) \
	  $(PLY_INCLUDE) \
	  -I. \
	  $(srcdir)/runtests.py

garbage_files := \
  xpidllex.py \
  xpidllex.pyc \
  xpidlyacc.py \
  xpidlyacc.pyc \
  xpidl_debug \
  $(NULL)

GARBAGE += $(addprefix $(IDL_PARSER_CACHE_DIR)/,$(garbage_files))