xpcom/idl-parser/Makefile.in
author Trevor Saunders <trev.saunders@gmail.com>
Fri, 02 Aug 2013 23:30:09 -0400
changeset 149570 e5ebdc689486217b525fa9eb40809a254b6d375f
parent 104557 162130598df094e19b044610902abecd403278d3
child 149571 60287a04a9eada2a40b9489d94b643a172a8608d
permissions -rw-r--r--
bug 900330 - part 1 rm xpcom/typelib/xpidl/ r=ted

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

DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@

include $(DEPTH)/config/autoconf.mk

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

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

SDK_BINARY_TARGET = export

ifndef MOZ_SYSTEM_PLY
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 = export
endif

include $(topsrcdir)/config/rules.mk

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

# generating xpidllex.py generates xpidlyacc.py too
xpidlyacc.py: xpidllex.py

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

GARBAGE += \
  xpidllex.py \
  xpidllex.pyc \
  xpidlyacc.py \
  xpidlyacc.pyc \
  xpidl_debug \
  $(NULL)