Don't use hardcoded name for pylint
authorMichael Hanselmann <hansmi@google.com>
Thu, 14 Jan 2010 09:56:43 +0000 (10:56 +0100)
committerMichael Hanselmann <hansmi@google.com>
Thu, 14 Jan 2010 12:17:02 +0000 (13:17 +0100)
Look it up at configure time instead.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

Makefile.am
configure.ac

index d87864f..513d67b 100644 (file)
@@ -483,7 +483,8 @@ check-local:
 
 .PHONY: lint
 lint: ganeti
-       pylint $(LINT_OPTS) $(lint_python_code)
+       @test -n "$(PYLINT)" || { echo 'pylint' not found during configure; exit 1; }
+       $(PYLINT) $(LINT_OPTS) $(lint_python_code)
 
 # a dist hook rule for catching revision control directories
 distcheck-hook:
index 2a2ac0e..ae61c60 100644 (file)
@@ -153,6 +153,14 @@ then
   AC_MSG_WARN([dot (from the graphviz suite) not found, documentation rebuild not possible])
 fi
 
+# Check for pylint
+AC_ARG_VAR(PYLINT, [pylint path])
+AC_PATH_PROG(PYLINT, [pylint], [])
+if test -z "$PYLINT"
+then
+  AC_MSG_WARN([pylint not found, checking code will not be possible])
+fi
+
 # Check for socat
 AC_ARG_VAR(SOCAT, [socat path])
 AC_PATH_PROG(SOCAT, [socat], [])