summaryrefslogtreecommitdiff
path: root/qt-recordmydesktop/m4/pychecker.mk
blob: 1e1f72ae4502e2e05bf4c8ff474cc87aab108bd5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# include this snippet for the pychecker stuff
# Makefile.am needs to define
# PYCHECKER_WHITELIST
# and
# PYCHECKER_BLACKLIST

# we redirect stderr so we don't get messages like
# warning: couldn't find real module for class SSL.Error (module name: SSL)
# which can't be turned off in pychecker
pycheckersplit:
	@echo running pychecker on each file ...
	@for file in $(filter-out $(PYCHECKER_BLACKLIST),$(wildcard $(PYCHECKER_WHITELIST))); \
	do \
		PYTHONPATH=`pwd`					\
		pychecker -Q -F misc/pycheckerrc 			\
                `ls $(top_srcdir)/misc/setup.py 2> /dev/null`		\
                `ls $(top_srcdir)/misc/pycheckerhelp.py	2> /dev/null` 	\
		$$file			 				\
		> /dev/null 2>&1;					\
		if test $$? -ne 0; then 				\
			echo "Error on $$file";				\
			pychecker -Q -F misc/pycheckerrc		\
        		`ls $(top_srcdir)/misc/setup.py	2> /dev/null`	\
                	`ls $(top_srcdir)/misc/pycheckerhelp.py	2> /dev/null` 	\
			$$file;	break; fi; 				\
	done

pychecker:
	@echo running pychecker ...
	@PYTHONPATH=`pwd`					\
	pychecker -Q -F misc/pycheckerrc			\
        `ls $(top_srcdir)/misc/setup.py	2> /dev/null`		\
        `ls $(top_srcdir)/misc/pycheckerhelp.py	2> /dev/null` 	\
	$(filter-out $(PYCHECKER_BLACKLIST),$(wildcard $(PYCHECKER_WHITELIST)))\
		2> /dev/null || make pycheckerverbose

pycheckerverbose:
	@echo running pychecker ...
	PYTHONPATH=`pwd`					\
	pychecker -F misc/pycheckerrc				\
        `ls $(top_srcdir)/misc/setup.py	2> /dev/null`	\
        `ls $(top_srcdir)/misc/pycheckerhelp.py	2> /dev/null` 	\
	$(filter-out $(PYCHECKER_BLACKLIST),$(wildcard $(PYCHECKER_WHITELIST)))
© All Rights Reserved