# -*- makefile -*- if HAVE_PYTHON nodist_nbblib_PYTHON += src/nbblib/package.py CLEANFILES += src/nbblib/package.py nbblib_PYTHON += src/nbblib/__init__.py nbblib_PYTHON += src/nbblib/bs.py nbblib_PYTHON += src/nbblib/commands.py nbblib_PYTHON += src/nbblib/main.py nbblib_PYTHON += src/nbblib/plugins.py nbblib_PYTHON += src/nbblib/progutils.py nbblib_PYTHON += src/nbblib/vcs.py # Put all python source files, whether changed or verbatim, # into builddir, such that we can run tests in builddir. all-local: all-local-nbblib all-local-nbblib: @for f in $(nbblib_PYTHON); do \ if test -f "$(top_builddir)/$$f" && test "$(top_srcdir)/$$f" -ot "$(top_builddir)/$$f"; then :; else \ echo "INFO: Updating $$f in $(top_builddir) from $(top_srcdir)"; \ cp -f "$(top_srcdir)/$$f" "$(top_builddir)/$$f"; \ fi; \ done bin_SCRIPTS += src/nbb CLEANFILES += src/nbb # We cannot create src/nbb from src/nbb.in in configure.ac/config.status. # pythondir is defined as ${something}foobar, and that needs expansion. EXTRA_DIST += src/nbb.in src/nbb: src/nbb.in $(nodist_nbblib_PYTHON) $(nbblib_PYTHON) Makefile $(SED) \ -e 's&[@]pythondir@&$(pythondir)&g' \ -e 's&[@]PYTHON@&$(PYTHON)&g' \ -e 's&[@]PACKAGE_VERSION@&$(PACKAGE_VERSION)&g' \ < $(srcdir)/src/nbb.in > src/nbb.new @if test "x$$($(GREP) '@[a-zA-Z0-9_]\{1,\}@' src/nbb.new)" = "x"; then :; \ else \ echo "FATAL: Unsubstituted markers remain in src/nbb.new."; \ $(GREP) '@[a-zA-Z0-9_]\{1,\}@' src/nbb.new; \ exit 1; \ fi @if test -f src/nbb && cmp src/nbb.new src/nbb; \ then rm -f src/nbb.new; \ else mv -f src/nbb.new src/nbb; echo "INFO: Updating src/nbb"; fi @chmod +x src/nbb endif clean-local: clean-local-nbblib clean-local-nbblib: rm -f src/nbblib/*.pyc @top_srcdir="$$(cd "$(top_srcdir)" > /dev/null 2>&1 && pwd)"; \ top_builddir="$$(cd "$(top_builddir)" > /dev/null 2>&1 && pwd)"; \ if test "x$${top_srcdir}" = "x$${top_builddir}"; then :; else \ for f in $(nbblib_PYTHON); do \ echo rm -f "$(top_builddir)/$$f"; \ rm -f "$(top_builddir)/$$f"; \ done; \ fi # End of Makefile-files.