blob: 99a8be233c5784c35ad1665f5f88963a55bd6afa (
plain) (
blame)
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
|
# $Id$
PYTHON = @PYTHON@
PYWRAP = @PYWRAP@
PYWRAP_CMD = @PYWRAP_CMD@
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
prefix = @prefix@
exec_prefix = @exec_prefix@
datarootdir = @datarootdir@
datadir = @datadir@
localstatedir = @localstatedir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
abs_top_srcdir = @abs_top_srcdir@
abs_top_builddir = @abs_top_builddir@
SETUP_PY = AC_CFLAGS='${CFLAGS}' AC_LDFLAGS='${LDFLAGS}' AC_LIBS='${LIBS}' AC_SBINDIR='${sbindir}' AC_SCRIPTS='${SCRIPTS}' ${PYTHON} setup.py
POW_SO = rpki/POW/_POW.so
SCRIPTS = rpki-sql-backup rpki-sql-setup rpki-start-servers irbe_cli irdbd myrpki pubd rootd rpkid
all: ${POW_SO} rpki/relaxng.py myrpki.rng ${SCRIPTS}
${POW_SO}: ext/POW.c setup.py
${SETUP_PY} build_ext --inplace
clean::
rm -f ${POW_SO}
rpki/relaxng.py: ../scripts/make-relaxng.py left-right-schema.rng up-down-schema.rng publication-schema.rng
${PYTHON} ../scripts/make-relaxng.py >$@.tmp
mv $@.tmp $@
left-right-schema.rng: left-right-schema.rnc
trang left-right-schema.rnc left-right-schema.rng
up-down-schema.rng: up-down-schema.rnc
trang up-down-schema.rnc up-down-schema.rng
publication-schema.rng: publication-schema.rnc
trang publication-schema.rnc publication-schema.rng
myrpki.rng: myrpki.rnc
trang myrpki.rnc myrpki.rng
clean::
find . -type f -name '*.py[co]' -delete
cd tests; $(MAKE) $@
rm -f ${SCRIPTS}
install:
${SETUP_PY} install
uninstall deinstall:
dir=`${PYTHON} -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib()'`; \
egg=`${PYTHON} setup.py --fullname`; \
rm -rfv $$dir/rpki $$dir/$$egg-*.egg-info; \
for i in ${SCRIPTS}; do rm -fv ${sbindir}/$$i; done
dont-run-trang:
touch *.rng
relaxng: left-right-schema.rng up-down-schema.rng publication-schema.rng
cd tests; $(MAKE) protocol-samples
xmllint --noout --relaxng left-right-schema.rng tests/left-right-protocol-samples/*.xml
xmllint --noout --relaxng up-down-schema.rng tests/up-down-protocol-samples/*.xml
xmllint --noout --relaxng publication-schema.rng tests/publication-protocol-samples/*.xml
unit-tests: all
PWD=`pwd`; for i in rpki/*.py; do echo "[$$i]"; PYTHONPATH=$$PWD ${PYWRAP_CMD} $$i; done
all-tests:: unit-tests
all-tests:: relaxng
test all-tests parse-test profile yamltest::
cd tests; $(MAKE) $@
tags: Makefile
find . -type f \( -name '*.py' -o -name '*.sql' -o -name '*.rnc' -o -name '*.py.in' \) ! -name relaxng.py ! -name __doc__.py | etags -
lint:
pylint --rcfile ../scripts/pylint.rc rpki/[a-z]*.py irbe_cli.py irdbd.py pubd.py rootd.py rpkid.py tests/smoketest.py tests/testpoke.py ../myrpki/myrpki.py ../myrpki/yamltest.py
# Documentation
doc/irdbd.dot: irdbd.sql
sh ../scripts/graphviz-sql.sh $? >$@
doc/pubd.dot: pubd.sql
sh ../scripts/graphviz-sql.sh $? >$@
doc/rpkid.dot: rpkid.sql
sh ../scripts/graphviz-sql.sh $? >$@
.SUFFIXES: .dot .png .pdf .eps
.dot.pdf:
dot -Tps2 $? | ps2pdf - $@
.dot.eps:
dot -o $@ -Teps $?
.dot.png:
dot -o $@ -Tpng $?
TEXT_DOCS = Installation Configuration Left-Right Publication MySQL-Setup MyRPKI
dot: doc/irdbd.dot doc/pubd.dot doc/rpkid.dot
eps: doc/irdbd.eps doc/pubd.eps doc/rpkid.eps doc/rpkid-bpki.eps doc/pubd-bpki.eps
png: doc/irdbd.png doc/pubd.png doc/rpkid.png doc/rpkid-bpki.png doc/pubd-bpki.png
docclean:
rm -rf doc/html doc/latex doc/xml
html: dot eps png
TZ='' doxygen
tgz: html
cd doc && tar -cf - html | gzip -9 >manual.tar.gz
text: html
for i in ${TEXT_DOCS}; do \
xsltproc --html doc/tweak-doc.xsl doc/html/$$i.html | \
html2text -rcfile doc/html2textrc -nobs -ascii | \
awk -f doc/tweak-doc.awk >doc/$$i; \
done 2>&1 | \
awk -f doc/suppress-html-parse-errors.awk 1>&2
pdf: doc/irdbd.pdf doc/pubd.pdf doc/rpkid.pdf doc/rpkid-bpki.pdf doc/pubd-bpki.pdf
pdf: html
cd doc/latex && TZ='' ${MAKE} && ln -f refman.pdf ../manual.pdf
docs: dot eps png html text tgz pdf
distclean: clean docclean
cd tests; ${MAKE} $@
rm -f TAGS rpki/__doc__.py Makefile
COMPILE_COMMON = AC_RPKI_CONFIG_DIR='${sysconfdir}' ${PYTHON} ${abs_top_srcdir}/buildtools/make-python-executable.py <$? >$@; chmod 555 $@
COMPILE_PYTHON = AC_PYTHON_INTERPRETER='${PYTHON}' ${COMPILE_COMMON}
COMPILE_PYWRAP = AC_PYTHON_INTERPRETER='${PYWRAP}' ${COMPILE_COMMON}
rpki-sql-backup: rpki-sql-backup.py
${COMPILE_PYTHON}
rpki-sql-setup: rpki-sql-setup.py
${COMPILE_PYTHON}
rpki-start-servers: rpki-start-servers.py
${COMPILE_PYTHON}
irbe_cli: irbe_cli.py
${COMPILE_PYWRAP}
irdbd: irdbd.py
${COMPILE_PYWRAP}
myrpki: myrpki.py
${COMPILE_PYWRAP}
pubd: pubd.py
${COMPILE_PYWRAP}
rootd: rootd.py
${COMPILE_PYWRAP}
rpkid: rpkid.py
${COMPILE_PYWRAP}
|