1e2b1b9c0Schristos# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
2e2b1b9c0Schristos#
3*497bf0b8Schristos# SPDX-License-Identifier: MPL-2.0
4*497bf0b8Schristos#
5e2b1b9c0Schristos# This Source Code Form is subject to the terms of the Mozilla Public
6e2b1b9c0Schristos# License, v. 2.0.  If a copy of the MPL was not distributed with this
7*497bf0b8Schristos# file, you can obtain one at https://mozilla.org/MPL/2.0/.
8e2b1b9c0Schristos#
9e2b1b9c0Schristos# See the COPYRIGHT file distributed with this work for additional
10e2b1b9c0Schristos# information regarding copyright ownership.
11e2b1b9c0Schristos
12e2b1b9c0Schristossrcdir =	@srcdir@
13e2b1b9c0SchristosVPATH =		@srcdir@
14e2b1b9c0Schristostop_srcdir =	@top_srcdir@
15e2b1b9c0Schristos
16e2b1b9c0Schristos@BIND9_MAKE_INCLUDES@
17e2b1b9c0Schristos
18e2b1b9c0SchristosSUBDIRS	=	tests
19e2b1b9c0Schristos
20e2b1b9c0SchristosPYTHON	=	@PYTHON@
21e2b1b9c0Schristos
22e2b1b9c0SchristosPYSRCS =	__init__.py checkds.py coverage.py dnskey.py eventlist.py \
23e2b1b9c0Schristos		keydict.py keyevent.py keymgr.py keyseries.py keyzone.py \
24e2b1b9c0Schristos		policy.py rndc.py utils.py
25e2b1b9c0Schristos
26e2b1b9c0SchristosTARGETS =	parsetab.py
27e2b1b9c0Schristos
28e2b1b9c0Schristos@BIND9_MAKE_RULES@
29e2b1b9c0Schristos
30e2b1b9c0Schristos.SUFFIXES: .py .pyc
31e2b1b9c0Schristos.py.pyc:
32e2b1b9c0Schristos	$(PYTHON) -m compileall .
33e2b1b9c0Schristos
34e2b1b9c0Schristosparsetab.py: policy.py
35e2b1b9c0Schristos	$(PYTHON) policy.py parse /dev/null > /dev/null
36e2b1b9c0Schristos	PYTHONPATH=${srcdir} $(PYTHON) -m parsetab
37e2b1b9c0Schristos
38e2b1b9c0Schristoscheck test: subdirs
39e2b1b9c0Schristos
40e2b1b9c0Schristosclean distclean::
41e2b1b9c0Schristos	rm -f *.pyc parser.out parsetab.py
42e2b1b9c0Schristos	rm -rf __pycache__ build
43e2b1b9c0Schristos
44e2b1b9c0Schristosdistclean::
45e2b1b9c0Schristos	rm -rf ${PYSRCS}
46