src/Makefile
changeset 3261 f3806842a096
parent 3253 a4cdd6047bbd
child 3321 52e8eec3014c
equal deleted inserted replaced
3260:5592df722091 3261:f3806842a096
    32 clean := TARGET = clean
    32 clean := TARGET = clean
    33 clobber := TARGET = clobber
    33 clobber := TARGET = clobber
    34 lint := TARGET = lint
    34 lint := TARGET = lint
    35 clint := TARGET = clint
    35 clint := TARGET = clint
    36 pylint := TARGET = pylint
    36 pylint := TARGET = pylint
       
    37 pep8 := TARGET = pep8
    37 test := TARGET = test
    38 test := TARGET = test
    38 test-verbose := TARGET = test-verbose
    39 test-verbose := TARGET = test-verbose
    39 test-generate := TARGET = test-generate
    40 test-generate := TARGET = test-generate
    40 
    41 
    41 #
    42 #
    44 # with the pkg modules in the root filesystem).
    45 # with the pkg modules in the root filesystem).
    45 #
    46 #
    46 PYLINT_VER_CMD = PYTHONPATH= /usr/bin/pkg info pkg:/developer/python/pylint | \
    47 PYLINT_VER_CMD = PYTHONPATH= /usr/bin/pkg info pkg:/developer/python/pylint | \
    47 	/usr/bin/grep Version | \
    48 	/usr/bin/grep Version | \
    48 	/usr/bin/awk -F: '{print $$2}' | /usr/bin/sed -e 's/ //g'
    49 	/usr/bin/awk -F: '{print $$2}' | /usr/bin/sed -e 's/ //g'
       
    50 
       
    51 PEP8 = /usr/bin/pep8
    49 
    52 
    50 SUBDIRS=zoneproxy
    53 SUBDIRS=zoneproxy
    51 
    54 
    52 all: $(SUBDIRS)
    55 all: $(SUBDIRS)
    53 	$(PYTHON27) setup.py build
    56 	$(PYTHON27) setup.py build
    77 
    80 
    78 pylint: install
    81 pylint: install
    79 	PYLINT_VER=$(PYLINT_VER_CMD:sh) $(PYTHON27) setup.py pylint
    82 	PYLINT_VER=$(PYLINT_VER_CMD:sh) $(PYTHON27) setup.py pylint
    80 	PYLINT_VER=$(PYLINT_VER_CMD:sh) $(PYTHON27) setup.py pylint_py3k
    83 	PYLINT_VER=$(PYLINT_VER_CMD:sh) $(PYTHON27) setup.py pylint_py3k
    81 
    84 
       
    85 pep8:
       
    86 	$(PEP8) --statistics --count `cat tests/pep8-whitelist.txt`
       
    87 
    82 #
    88 #
    83 # This rule propagates the current make target through all of the
    89 # This rule propagates the current make target through all of the
    84 # subdirectories in $SUBDIRS.
    90 # subdirectories in $SUBDIRS.
    85 #
    91 #
    86 $(SUBDIRS): FRC
    92 $(SUBDIRS): FRC
    87 	@cd $@; pwd; $(MAKE) $(TARGET)
    93 	@cd $@; pwd; $(MAKE) $(TARGET)
    88 
    94 
    89 # Use the bits we just built to create the packages.
    95 # Use the bits we just built to create the packages.
    90 packages: install pylint
    96 packages: install pylint pep8
    91 	@cd pkg; pwd; $(MAKE) $(TARGET) check \
    97 	@cd pkg; pwd; $(MAKE) $(TARGET) check \
    92 		PATH=$$(hg root)/proto/root_$$(uname -p)/usr/bin:$$PATH \
    98 		PATH=$$(hg root)/proto/root_$$(uname -p)/usr/bin:$$PATH \
    93 		PYTHONPATH=$$(hg root)/proto/root_$$(uname -p)/usr/lib/python2.7/vendor-packages
    99 		PYTHONPATH=$$(hg root)/proto/root_$$(uname -p)/usr/lib/python2.7/vendor-packages
    94 
   100 
    95 test:
   101 test: