+.PHONY: check-dirs
+check-dirs: $(BUILT_SOURCES)
+ @set -e; \
+ find . -type d \( \( -name . \) -o \( \
+ -name .git -o \
+ -name autom4te.cache \
+ \) -prune -o -print \) | { \
+ error=; \
+ while read dir; do \
+ case "$$dir" in \
+ $(strip $(patsubst %,(./%) ;;,$(DIRCHECK_EXCLUDE) $(DIRS))) \
+ *) error=1; echo "Directory $$dir not listed in Makefile" >&2 ;; \
+ esac; \
+ done; \
+ for dir in $(DIRS); do \
+ if ! test -d "$$dir"; then \
+ echo "Directory $$dir listed in DIRS does not exist" >&2; \
+ error=1; \
+ fi \
+ done; \
+ if test -n "$$error"; then exit 1; else exit 0; fi; \
+ }
+
+check-local: check-dirs
+ $(CHECK_PYTHON_CODE) $(check_python_code)
+
+.PHONY: lint
+lint: ganeti $(BUILT_SOURCES)
+ @test -n "$(PYLINT)" || { echo 'pylint' not found during configure; exit 1; }
+ $(PYLINT) $(LINT_OPTS) $(lint_python_code)
+
+# a dist hook rule for updating the vcs-version file; this is
+# hardcoded due to where it needs to build the file...
+dist-hook:
+ $(MAKE) regen-vcs-version && \
+ rm -f $(top_distdir)/vcs-version && \
+ cp -p $(srcdir)/vcs-version $(top_distdir)
+
+# a distcheck hook rule for catching revision control directories