forked from dragonresearch/rpki.net
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
226 lines (178 loc) · 8.46 KB
/
Makefile.in
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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
# $Id$
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@ @POW_LDFLAGS@
LIBS = @LIBS@
PYTHON = @PYTHON@
INSTALL = @INSTALL@ -m 555
TRANG = @TRANG@
SUDO = @SUDO@
prefix = @prefix@
exec_prefix = @exec_prefix@
datarootdir = @datarootdir@
datadir = @datadir@
localstatedir = @localstatedir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
sysconfdir = @sysconfdir@
abs_builddir = @abs_builddir@
abs_top_srcdir = @abs_top_srcdir@
abs_top_builddir= @abs_top_builddir@
srcdir = @srcdir@
OPENSSL_TARGET = @OPENSSL_TARGET@
RP_TARGET = @RP_TARGET@
CA_TARGET = @CA_TARGET@
WSGI_DAEMON_PROCESS = @WSGI_DAEMON_PROCESS@
WSGI_PROCESS_GROUP = @WSGI_PROCESS_GROUP@
RCYNIC_DIR = @RCYNIC_DIR@
RPKI_USER = @RPKI_USER@
RPKI_GROUP = @RPKI_GROUP@
RCYNIC_HTML_DIR = @RCYNIC_HTML_DIR@
RRDTOOL = @RRDTOOL@
APACHE_VERSION = @APACHE_VERSION@
WSGI_PYTHON_EGG_CACHE_DIR = @WSGI_PYTHON_EGG_CACHE_DIR@
WSGI_PYTHON_EGG_CACHE_USER = @WSGI_PYTHON_EGG_CACHE_USER@
SETUP_PY_INSTALL_LAYOUT = @SETUP_PY_INSTALL_LAYOUT@
SETUP_PY_ROOT = `${PYTHON} -c 'import sys; print "--root " + sys.argv[1] if sys.argv[1] else ""' '${DESTDIR}'`
POW_SO = rpki/POW/_POW.so
RNGS = schemas/relaxng/left-right.rng \
schemas/relaxng/up-down.rng \
schemas/relaxng/publication.rng \
schemas/relaxng/publication-control.rng \
schemas/relaxng/myrpki.rng \
schemas/relaxng/router-certificate.rng \
schemas/relaxng/rrdp.rng \
schemas/relaxng/oob-setup.rng
default: all
all: VERSION rpki/autoconf.py setup_autoconf.py
clean:
rm -rf build dist autom4te.cache rpki/autoconf.py setup_autoconf.py setup_autoconf.pyc
test: all
distclean: clean
rm -f Makefile config.log config.status
uninstall: deinstall
all: ${OPENSSL_TARGET}-all rpki-all ${RP_TARGET}-all ${CA_TARGET}-all
clean: ${OPENSSL_TARGET}-clean rpki-clean ${RP_TARGET}-clean ${CA_TARGET}-clean
test: ${OPENSSL_TARGET}-test rpki-test ${RP_TARGET}-test ${CA_TARGET}-test
distclean: ${OPENSSL_TARGET}-distclean rpki-distclean ${RP_TARGET}-distclean ${CA_TARGET}-distclean
install: rpki-install ${RP_TARGET}-install ${CA_TARGET}-install
deinstall: rpki-deinstall ${RP_TARGET}-deinstall ${CA_TARGET}-deinstall
openssl-all: ; cd openssl; ${MAKE} all
openssl-clean: ; cd openssl; ${MAKE} clean
openssl-test: ; cd openssl; ${MAKE} test
openssl-distclean: ; cd openssl; ${MAKE} distclean
rp-all: ; cd rp; ${MAKE} all
rp-clean: ; cd rp; ${MAKE} clean
rp-test: ; cd rp; ${MAKE} test
rp-distclean: ; cd rp; ${MAKE} distclean
rp-install: ; cd rp; ${MAKE} install
rp-deinstall: ; cd rp; ${MAKE} deinstall
ca-all: ; cd ca; ${MAKE} all
ca-clean: ; cd ca; ${MAKE} clean
ca-test: ; cd ca; ${MAKE} test
ca-distclean: ; cd ca; ${MAKE} distclean
ca-install: ; cd ca; ${MAKE} install
ca-deinstall: ; cd ca; ${MAKE} deinstall
noop-all noop-clean noop-test noop-distclean noop-install noop-deinstall:
@true
rpki-all: \
setup_autoconf.py \
${RNGS} \
${abs_top_srcdir}/h/rpki/sk_manifest.h \
${abs_top_srcdir}/h/rpki/sk_roa.h \
${abs_top_srcdir}/rpki/relaxng.py \
${POW_SO} \
build/stamp
rpki-clean:
rm -rf build dist ${POW_SO} h/rpki/*.h.tmp rpki/*.py.tmp
find . -type f -name '*.py[co]' -delete
rpki-test: all
@echo Running unit tests
PWD=`pwd`; for i in rpki/*.py; do echo "[$$i]"; PYTHONPATH=$$PWD ${PYTHON} $$i; done
rpki-distclean:
rm -f installed
rpki-install:
${PYTHON} setup.py install ${SETUP_PY_ROOT} ${SETUP_PY_INSTALL_LAYOUT} --record installed
rpki-deinstall:
xargs rm -fv <installed
VERSION: .FORCE
${PYTHON} buildtools/make-version.py
rpki/autoconf.py: Makefile
@echo 'Generating $@'; \
(echo '# Automatically generated. DO NOT EDIT.'; \
echo ; \
echo 'bindir = "${bindir}"'; \
echo 'datarootdir = "${datarootdir}"'; \
echo 'localstatedir = "${localstatedir}"'; \
echo 'sbindir = "${sbindir}"'; \
echo 'sharedstatedir = "${sharedstatedir}"'; \
echo 'sysconfdir = "${sysconfdir}"'; \
echo 'libexecdir = "${libexecdir}"'; \
echo ; \
echo 'WSGI_DAEMON_PROCESS = "${WSGI_DAEMON_PROCESS}"'; \
echo 'WSGI_PROCESS_GROUP = "${WSGI_PROCESS_GROUP}"'; \
echo 'RCYNIC_DIR = "${RCYNIC_DIR}"'; \
echo 'RPKI_USER = "${RPKI_USER}"'; \
echo 'RPKI_GROUP = "${RPKI_GROUP}"'; \
echo 'RCYNIC_HTML_DIR = "${RCYNIC_HTML_DIR}"'; \
echo 'RRDTOOL = "${RRDTOOL}"'; \
echo 'APACHE_VERSION = "${APACHE_VERSION}"'; \
echo 'WSGI_PYTHON_EGG_CACHE_DIR = "${WSGI_PYTHON_EGG_CACHE_DIR}"'; \
echo 'WSGI_PYTHON_EGG_CACHE_USER = "${WSGI_PYTHON_EGG_CACHE_USER}"'; \
echo 'SUDO = "${SUDO}"'; \
) > $@
setup_autoconf.py: rpki/autoconf.py
@echo 'Generating $@'; \
(cat rpki/autoconf.py; \
echo ; \
echo 'CFLAGS = """${CFLAGS}"""'; \
echo 'LDFLAGS = """${LDFLAGS}"""'; \
echo 'LIBS = """${LIBS}"""'; \
echo 'RP_TARGET = """${RP_TARGET}"""'; \
echo 'CA_TARGET = """${CA_TARGET}"""'; \
) > $@
.FORCE:
${POW_SO}: .FORCE setup_autoconf.py
${PYTHON} setup.py build_ext --inplace
build/stamp: .FORCE setup_autoconf.py
${PYTHON} setup.py build
touch $@
${abs_top_srcdir}/h/rpki/sk_manifest.h: ${abs_top_srcdir}/h/rpki/manifest.h
${PYTHON} buildtools/defstack.py h/rpki/manifest.h >$@.tmp
mv $@.tmp $@
${abs_top_srcdir}/h/rpki/sk_roa.h: ${abs_top_srcdir}/h/rpki/roa.h
${PYTHON} buildtools/defstack.py h/rpki/roa.h >$@.tmp
mv $@.tmp $@
${abs_top_srcdir}/rpki/relaxng.py: buildtools/make-relaxng.py ${RNGS}
cd schemas/relaxng; ${PYTHON} ${abs_top_srcdir}/buildtools/make-relaxng.py *.rng >$@.tmp
mv $@.tmp $@
schemas/relaxng/left-right.rng: schemas/relaxng/left-right.rnc
${TRANG} schemas/relaxng/left-right.rnc schemas/relaxng/left-right.rng
schemas/relaxng/up-down.rng: schemas/relaxng/up-down.rnc
${TRANG} schemas/relaxng/up-down.rnc schemas/relaxng/up-down.rng
schemas/relaxng/publication.rng: schemas/relaxng/publication.rnc
${TRANG} schemas/relaxng/publication.rnc schemas/relaxng/publication.rng
schemas/relaxng/publication-control.rng: schemas/relaxng/publication-control.rnc
${TRANG} schemas/relaxng/publication-control.rnc schemas/relaxng/publication-control.rng
schemas/relaxng/myrpki.rng: schemas/relaxng/myrpki.rnc
${TRANG} schemas/relaxng/myrpki.rnc schemas/relaxng/myrpki.rng
schemas/relaxng/router-certificate.rng: schemas/relaxng/router-certificate.rnc
${TRANG} schemas/relaxng/router-certificate.rnc schemas/relaxng/router-certificate.rng
schemas/relaxng/rrdp.rng: schemas/relaxng/rrdp.rnc
${TRANG} schemas/relaxng/rrdp.rnc schemas/relaxng/rrdp.rng
schemas/relaxng/oob-setup.rng: schemas/relaxng/oob-setup.rnc
${TRANG} schemas/relaxng/oob-setup.rnc schemas/relaxng/oob-setup.rng
# Eg: PYLINT_FLAGS='--disable=W0311'
lint: .FORCE
pylint --rcfile ${abs_top_srcdir}/buildtools/pylint.rc ${PYLINT_FLAGS} rpki `find rp ca -type f -perm -1 ! -name '*~' -print | xargs grep -El '^#!.+python'`
tags: Makefile .FORCE
{ find rpki rp ca schemas -type f \( -name '*.[ch]' -o -name '*.py' -o -name '*.sql' -o -name '*.rnc' \) ! -name relaxng.py -print; find rp ca -type f -perm -1 ! -name '*~' -print | xargs grep -El '^#!.+python'; } | etags -
makemigrations:
PYTHONPATH=. RPKI_CONF=makemigrations.conf.$$$$ TEMP_DB=makemigrations.db.$$$$; export PYTHONPATH RPKI_CONF TEMP_DB; trap "rm -f $$RPKI_CONF $$TEMP_DB" 0; \
${PYTHON} rp/config/rpki-confgen --read-xml rp/config/rpki-confgen.xml --autoconf --set myrpki::shared_sql_engine=sqlite3 \
--set myrpki::rpkid_sql_database=$$TEMP_DB --set myrpki::irdbd_sql_database=$$TEMP_DB --set myrpki::pubd_sql_database=$$TEMP_DB \
--pwgen myrpki::shared_sql_password --pwgen web_portal::secret-key --write-conf $$RPKI_CONF; \
for i in rpkid pubd irdb rcynic; do django-admin makemigrations --settings rpki.django_settings.$$i; done
.FORCE: