Statistics
| Branch: | Tag: | Revision:

mininet / Makefile @ d54cde46

History | View | Annotate | Download (1.08 KB)

1
MININET = mininet/*.py
2
TEST = mininet/test/*.py
3
EXAMPLES = examples/*.py
4
MN = bin/mn
5
BIN = $(MN)
6
PYSRC = $(MININET) $(TEST) $(EXAMPLES) $(BIN)
7
MNEXEC = mnexec
8
MANPAGE = mn.1
9
P8IGN = E251,E201,E302,E202
10
BINDIR = /usr/bin
11
MANDIR = /usr/share/man/man1
12

    
13
all: codecheck test
14

    
15
clean:
16
	rm -rf build dist *.egg-info *.pyc $(MNEXEC) $(MANPAGE)
17

    
18
codecheck: $(PYSRC)
19
	-echo "Running code check"
20
	pyflakes $(PYSRC)
21
	pylint --rcfile=.pylint $(PYSRC)
22
	pep8 --repeat --ignore=$(P8IGN) $(PYSRC)
23

    
24
errcheck: $(PYSRC)
25
	-echo "Running check for errors only"
26
	pyflakes $(PYSRC)
27
	pylint -E --rcfile=.pylint $(PYSRC)
28

    
29
test: $(MININET) $(TEST)
30
	-echo "Running tests"
31
	mininet/test/test_nets.py
32

    
33
install: $(MNEXEC) $(MANPAGE)
34
	install $(MNEXEC) $(BINDIR)
35
	install $(MANPAGE) $(MANDIR)
36
	python setup.py install
37

    
38
develop: $(MNEXEC) $(MANPAGE)
39
	# Perhaps we should link these as well
40
	install $(MNEXEC) $(BINDIR)
41
	install $(MANPAGE) $(MANDIR)
42
	python setup.py develop
43

    
44
man: $(MANPAGE)
45

    
46
$(MANPAGE): $(MN)
47
	PYTHONPATH=. help2man -N -n "create a Mininet network." \
48
    --no-discard-stderr $(MN) \
49
    -o $@
50

    
51
doc: man
52
	doxygen doxygen.cfg
53