forked from netfarm/archiver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
59 lines (46 loc) · 1.75 KB
/
Makefile
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
VERSION=$(shell python -c 'import archiver ; print archiver.__version__')
PYTHON_VERSION=$(shell python -c 'import sys ; print sys.version[:3]')
DIST=archiver-$(VERSION).tar.gz
SUBDIRS=sql postfix
CONTRIB=$(wildcard sql/*.sql) $(wildcard postfix/*.cf)
BACKENDS=$(wildcard backend_*.py)
MODULES=$(BACKENDS) archiver.py PyLogAnalyzer.py archiver_svc.py mtplib.py compress.py mblookup.py
CONFS=archiver.conf archiver-win32.ini .pycheckrc
TOOLS=setup_all.py __init__.py init.d NetfarmArchiver.nsi nma.ico
DOCS=copyright.txt TODO structure.txt
ALL=Makefile $(MODULES) $(DOCS) $(TOOLS) $(CONFS) $(CONTRIB)
DISTDIR=dist/archiver-$(VERSION)
all: $(DIST)
compile:
python /usr/lib/python$(PYTHON_VERSION)/compileall.py .
clean:
rm -f *~ *.pyc *.pyo *.flc *.bak $(DIST) dist
cleandoc:
rm -fr doc api *.log
distclean: clean cleandoc
pycheck:
pychecker backend_*.py archiver.py mtplib.py || true
epydoc-html:
@echo Creating html Documentation
epydoc --html -o api -n "Netfarm Mail Archiver" \
--css green --private-css blue --ignore-param-mismatch \
$(MODULES)
epydoc-pdf:
@echo Creating pdf Documentation
epydoc --pdf -o api -n "Netfarm Mail Archiver" --ignore-param-mismatch \
$(MODULES)
epycheck:
@echo epycheck...
epydoc --check --ignore-param-mismatch $(MODULES) >epy.log 2>&1
epydoc: epydoc-html epydoc-pdf
docs: epydoc
dist: $(DIST)
$(DIST): $(ALL)
@rm -fr dist
@mkdir -p $(DISTDIR)
@for dir in $(SUBDIRS); do echo Creating $(DISTDIR)/$$dir ; install -m755 -d $(DISTDIR)/$$dir; done
@for file in $(ALL); do echo Installing $(DISTDIR)/$$file ; install -m644 $$file $(DISTDIR)/$$file; done
@chmod 755 $(DISTDIR)/{archiver,setup_all}.py
@chmod 755 $(DISTDIR)/init.d
@( cd dist && tar czf ../$(DIST) archiver-$(VERSION) )
@echo Cleaning up dist && rm -fr dist