Makefile.am 1.0 KB

123456789101112131415161718192021222324252627282930
  1. # This makefile is a hack to enable tests to run with one module generated
  2. # while the rest is just used. The generated file is created under build dir,
  3. # not the src dir, which means it is not found when these are different.
  4. #
  5. # We have a forwarder module in the src dir and build the real one in different
  6. # location. This is similar to what happens in log_messages/work. We can't
  7. # reuse the name `work`, since it would collide, so we use less generic name.
  8. nodist_python_PYTHON = proto_defs.py
  9. BUILT_SOURCES = proto_defs.py __init__.py
  10. noinst_SCRIPTS = __init__.py
  11. proto_defs.py: $(top_srcdir)/src/lib/cc/proto_defs.cc \
  12. $(top_srcdir)/src/lib/util/python/pythonize_constants.py
  13. $(PYTHON) $(top_srcdir)/src/lib/util/python/pythonize_constants.py \
  14. $(top_srcdir)/src/lib/cc/proto_defs.cc $@
  15. # We need to create an __init__.py, so it is recognized as module.
  16. # But it may be empty.
  17. __init__.py:
  18. touch $@
  19. pythondir = $(pyexecdir)/isc/cc
  20. CLEANDIRS = __pycache__
  21. CLEANFILES = proto_defs.py __init__.py
  22. clean-local:
  23. rm -rf $(CLEANDIRS)