man: Cleanup XML files
[people/ms/network.git] / Makefile.am
CommitLineData
5ca9dc30
MT
1###############################################################################
2# #
3# IPFire.org - A linux based firewall #
4# Copyright (C) 2012-2013 IPFire Network Development Team #
5# #
6# This program is free software: you can redistribute it and/or modify #
7# it under the terms of the GNU General Public License as published by #
8# the Free Software Foundation, either version 3 of the License, or #
9# (at your option) any later version. #
10# #
11# This program is distributed in the hope that it will be useful, #
12# but WITHOUT ANY WARRANTY; without even the implied warranty of #
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14# GNU General Public License for more details. #
15# #
16# You should have received a copy of the GNU General Public License #
17# along with this program. If not, see <http://www.gnu.org/licenses/>. #
18# #
19###############################################################################
20
21ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
22AM_MAKEFLAGS = --no-print-directory
23AUTOMAKE_OPTIONS = color-tests
24
25# remove target it the command fails
26.DELETE_ON_ERROR:
27
28# keep itermediate files
29.SECONDARY:
30
f166708b 31configdir = $(sysconfdir)/network
bae37360 32bashcompletiondir= $(datadir)/bash-completion/completions
5ca9dc30 33libexecdir = $(prefix)/lib
01f2b2e4 34pkgconfigdir = $(libdir)/pkgconfig
5ca9dc30 35pppdir = $(sysconfdir)/ppp
5e84cd41 36systemconfigdir = $(datadir)/network
5ca9dc30
MT
37sysctldir = $(prefix)/lib/sysctl.d
38tmpfilesdir = $(prefix)/lib/tmpfiles.d
39udevrulesdir = $(udevdir)/rules.d
40
41networkdir = $(libexecdir)/network
42helpersdir = $(networkdir)/helpers
43
44macrosdir = $(libexecdir)/firewall/macros
45
46hooksdir = $(networkdir)/hooks
7d2cb6d3 47hooks_configsdir = $(hooksdir)/configs
5ca9dc30
MT
48hooks_portsdir = $(hooksdir)/ports
49hooks_zonesdir = $(hooksdir)/zones
50
de3cecef
MT
51triggersdir = $(networkdir)/triggers
52
9c9d0585 53logdir = $(localestatedir)/log/network
e145b2f3 54utildir = $(networkdir)
9c9d0585 55
5ca9dc30
MT
56CLEANFILES =
57DISTCLEANFILES =
58EXTRA_DIST =
59INSTALL_DIRS =
60INSTALL_EXEC_HOOKS =
61UNINSTALL_EXEC_HOOKS =
62noinst_DATA =
63
01f2b2e4
MT
64AM_CPPFLAGS = \
65 $(OUR_CPPFLAGS) \
66 -include $(top_builddir)/config.h \
67 -I${top_srcdir}/src/libnetwork
68
69AM_CFLAGS = \
70 $(OUR_CFLAGS) \
71 -fvisibility=hidden \
72 -ffunction-sections \
73 -fdata-sections
74
75AM_LDFLAGS = \
76 $(OUR_LDFLAGS) \
77 -Wl,--gc-sections \
78 -Wl,--as-needed
e708653f 79
5ca9dc30
MT
80DISTCHECK_CONFIGURE_FLAGS = \
81 --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) \
82 --with-udevdir=$$dc_install_base/$(udevdir)
83
84install-directories-hook:
85 $(MKDIR_P) $(addprefix $(DESTDIR),$(INSTALL_DIRS))
86
87INSTALL_EXEC_HOOKS += \
88 install-directories-hook
89
90# ------------------------------------------------------------------------------
91
8f591cfc
MT
92AM_V_ASCIIDOC = $(AM_V_ASCIIDOC_$(V))
93AM_V_ASCIIDOC_ = $(AM_V_ASCIIDOC_$(AM_DEFAULT_VERBOSITY))
94AM_V_ASCIIDOC_0 = @echo " ASCIIDOC" $@;
95
c4966dd6
MT
96AM_V_DOWNLOAD = $(AM_V_DOWNLOAD_$(V))
97AM_V_DOWNLOAD_ = $(AM_V_DOWNLOAD_$(AM_DEFAULT_VERBOSITY))
98AM_V_DOWNLOAD_0 = @echo " LOAD " $@;
99
1908d2b3
MT
100AM_V_NITSI = $(AM_V_NITSI_$(V))
101AM_V_NITSI_ = $(AM_V_NITSI_$(AM_DEFAULT_VERBOSITY))
102AM_V_NITSI_0 = @echo " NITSI " $@;
103
5ca9dc30
MT
104AM_V_XSLT = $(AM_V_XSLT_$(V))
105AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
106AM_V_XSLT_0 = @echo " XSLT " $@;
107
108# ------------------------------------------------------------------------------
109
110dist_doc_DATA = \
1337eee2 111 README \
dd46582c 112 docs/CODING_STYLE \
1337eee2 113 docs/COPYING
5ca9dc30
MT
114
115dist_sbin_SCRIPTS = \
116 src/dhclient-script \
117 src/firewall-config \
118 src/firewall4 \
119 src/firewall6 \
120 src/network
121
a62e991a 122network_DATA = \
5ca9dc30
MT
123 src/functions/functions
124
125CLEANFILES += \
126 src/functions/functions
127
128EXTRA_DIST += \
129 src/functions/functions.in
130
a62e991a 131dist_network_DATA = \
5ca9dc30
MT
132 src/functions/functions.at \
133 src/functions/functions.auth \
6a1b0fb1 134 src/functions/functions.bird \
5ca9dc30
MT
135 src/functions/functions.bonding \
136 src/functions/functions.bridge \
137 src/functions/functions.cli \
138 src/functions/functions.cli.firewall \
139 src/functions/functions.colors \
140 src/functions/functions.config \
141 src/functions/functions.conntrack \
142 src/functions/functions.constants \
143 src/functions/functions.constants-firewall \
144 src/functions/functions.db \
5ccc7299 145 src/functions/functions.description \
5ca9dc30
MT
146 src/functions/functions.device \
147 src/functions/functions.dhclient \
148 src/functions/functions.dhcpd \
149 src/functions/functions.distro \
150 src/functions/functions.dns \
151 src/functions/functions.dummy \
e524986c 152 src/functions/functions.editor \
5ca9dc30
MT
153 src/functions/functions.firewall \
154 src/functions/functions.firewall-policy \
155 src/functions/functions.firewall-zones \
156 src/functions/functions.he \
157 src/functions/functions.hook \
158 src/functions/functions.hostapd \
b8026986 159 src/functions/functions.hotplug \
5ca9dc30 160 src/functions/functions.http \
de72bd91 161 src/functions/functions.interrupts \
5ca9dc30 162 src/functions/functions.ip \
be844b7b 163 src/functions/functions.ipsec \
4e78b7ad 164 src/functions/functions.ipsec-pool \
5ca9dc30
MT
165 src/functions/functions.iptables \
166 src/functions/functions.ip-tunnel \
167 src/functions/functions.ipv4 \
168 src/functions/functions.ipv6 \
208f7452 169 src/functions/functions.leds \
5ca9dc30
MT
170 src/functions/functions.list \
171 src/functions/functions.lock \
172 src/functions/functions.logging \
173 src/functions/functions.macros \
5ca9dc30 174 src/functions/functions.modem \
3608f641 175 src/functions/functions.offloading \
5ca9dc30
MT
176 src/functions/functions.phy \
177 src/functions/functions.ports \
178 src/functions/functions.ppp \
179 src/functions/functions.pppoe-server \
5ca9dc30
MT
180 src/functions/functions.route \
181 src/functions/functions.routing \
182 src/functions/functions.serial \
183 src/functions/functions.service \
e9df08ad 184 src/functions/functions.settings \
5ca9dc30 185 src/functions/functions.stp \
5ca9dc30 186 src/functions/functions.sysctl \
de72bd91 187 src/functions/functions.system \
de3cecef 188 src/functions/functions.triggers \
5ca9dc30
MT
189 src/functions/functions.usb \
190 src/functions/functions.util \
191 src/functions/functions.vlan \
2da98f56 192 src/functions/functions.vpn \
3eae7bed 193 src/functions/functions.vpn-security-policies \
5ca9dc30 194 src/functions/functions.wireless \
81bf9898 195 src/functions/functions.wireless-mesh \
49958b8c 196 src/functions/functions.wireless-networks \
5ca9dc30
MT
197 src/functions/functions.wpa_supplicant \
198 src/functions/functions.zone \
5ca9dc30
MT
199 src/header-config \
200 src/header-port \
f9217f83 201 src/header-zone
5ca9dc30 202
b719b3f7 203dist_network_SCRIPTS = \
f9217f83
MT
204 src/dhclient-helper \
205 src/ppp/dialer \
206 src/ppp/pppoe-server
b719b3f7 207
5ca9dc30 208dist_helpers_SCRIPTS = \
5ca9dc30
MT
209 src/helpers/dhcpd-config-helper \
210 src/helpers/firewall-kernel-init \
211 src/helpers/hostapd-config-helper \
67baa452 212 src/helpers/ipsec-updown \
5ca9dc30 213 src/helpers/pppd-angel \
02807ad2 214 src/helpers/wpa_supplicant
5ca9dc30 215
13a6e69f
MT
216bin_PROGRAMS = \
217 src/inetcalc
218
219src_inetcalc_SOURCES = \
220 src/inetcalc.c
221
01f2b2e4
MT
222src_inetcalc_LDADD = \
223 src/libnetwork.la
224
7d2cb6d3 225dist_hooks_configs_SCRIPTS = \
9353a4e4 226 src/hooks/configs/dhcp \
b73e9d43 227 src/hooks/configs/ipv6-auto \
46a28dcd
MT
228 src/hooks/configs/pppoe-server \
229 src/hooks/configs/static
7d2cb6d3 230
5ca9dc30 231dist_hooks_ports_SCRIPTS = \
5ca9dc30
MT
232 src/hooks/ports/bonding \
233 src/hooks/ports/dummy \
234 src/hooks/ports/ethernet \
8032884d 235 src/hooks/ports/ip-tunnel \
5ca9dc30 236 src/hooks/ports/vlan \
727248f0
MT
237 src/hooks/ports/wireless-ap \
238 src/hooks/ports/wireless-mesh
5ca9dc30
MT
239
240dist_hooks_zones_SCRIPTS = \
5ca9dc30 241 src/hooks/zones/bridge \
85de251d 242 src/hooks/zones/ip-tunnel \
5ca9dc30
MT
243 src/hooks/zones/modem \
244 src/hooks/zones/pppoe \
5ca9dc30
MT
245 src/hooks/zones/wireless
246
f166708b
MT
247INSTALL_DIRS += \
248 $(configdir) \
249 $(configdir)/ports \
250 $(configdir)/vpn \
251 $(configdir)/vpn/ipsec/connections \
252 $(configdir)/vpn/security-policies \
253 $(configdir)/wireless \
254 $(configdir)/wireless/networks \
255 $(configdir)/zones
256
5ca9dc30
MT
257# ------------------------------------------------------------------------------
258
01f2b2e4
MT
259LIBNETWORK_CURRENT=0
260LIBNETWORK_REVISION=0
261LIBNETWORK_AGE=0
262
263pkginclude_HEADERS = \
248629ae 264 src/libnetwork/network/interface.h \
6f4814db 265 src/libnetwork/network/libnetwork.h \
9cb2f0c0
MT
266 src/libnetwork/network/logging.h \
267 src/libnetwork/network/phy.h
01f2b2e4
MT
268
269lib_LTLIBRARIES = \
270 src/libnetwork.la
271
272src_libnetwork_la_SOURCES = \
248629ae 273 src/libnetwork/interface.c \
01f2b2e4 274 src/libnetwork/libnetwork-private.h \
9cb2f0c0
MT
275 src/libnetwork/libnetwork.c \
276 src/libnetwork/phy.c
01f2b2e4 277
db0a2d76
MT
278src_libnetwork_la_LIBADD = \
279 $(LIBNL_LIBS)
280
6f4814db
MT
281src_libnetwork_la_CPPFLAGS = \
282 $(AM_CPPFLAGS) \
db0a2d76 283 $(LIBNL_CPPFLAGS) \
6f4814db
MT
284 -D_GNU_SOURCE \
285 -DNETWORK_PRIVATE
286
db0a2d76
MT
287src_libnetwork_la_CFLAGS = \
288 $(AM_CFLAGS) \
289 $(LIBNL_CFLAGS)
290
01f2b2e4
MT
291src_libnetwork_la_LDFLAGS = \
292 $(AM_LDFLAGS) \
293 -version-info $(LIBNETWORK_CURRENT):$(LIBNETWORK_REVISION):$(LIBNETWORK_AGE) \
294 -Wl,--version-script=$(top_srcdir)/src/libnetwork/libnetwork.sym
295
296src_libnetwork_la_DEPENDENCIES = \
297 src/libnetwork/libnetwork.sym
298
299EXTRA_DIST += \
300 src/libnetwork/libnetwork.sym
301
302# ------------------------------------------------------------------------------
e145b2f3
MT
303
304util_PROGRAMS = \
394cff53 305 src/utils/network-phy-list-channels \
2e4e3c88 306 src/utils/network-phy-list-ciphers \
b2323e58
MT
307 src/utils/network-phy-list-ht-caps \
308 src/utils/network-phy-list-vht-caps
e145b2f3 309
394cff53
MT
310src_utils_network_phy_list_channels_SOURCES = \
311 src/utils/network-phy-list-channels.c
312
313src_utils_network_phy_list_channels_LDADD = \
314 src/libnetwork.la
315
2e4e3c88
MT
316src_utils_network_phy_list_ciphers_SOURCES = \
317 src/utils/network-phy-list-ciphers.c
318
319src_utils_network_phy_list_ciphers_LDADD = \
320 src/libnetwork.la
321
e145b2f3
MT
322src_utils_network_phy_list_ht_caps_SOURCES = \
323 src/utils/network-phy-list-ht-caps.c
324
325src_utils_network_phy_list_ht_caps_LDADD = \
326 src/libnetwork.la
327
b2323e58
MT
328src_utils_network_phy_list_vht_caps_SOURCES = \
329 src/utils/network-phy-list-vht-caps.c
330
331src_utils_network_phy_list_vht_caps_LDADD = \
332 src/libnetwork.la
333
e145b2f3 334# ------------------------------------------------------------------------------
01f2b2e4 335
5ca9dc30
MT
336ppp_SCRIPTS = \
337 src/ppp/ip-updown
338
339CLEANFILES += \
340 src/ppp/ip-updown
341
342EXTRA_DIST += \
343 src/ppp/ip-updown.in
344
345INSTALL_DIRS += \
9c9d0585
SS
346 $(pppdir) \
347 $(logdir)
5ca9dc30
MT
348
349ppp-install-hook:
350 ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-pre-up
351 ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-up
352 ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-down
353 ln -svf ip-updown $(DESTDIR)$(pppdir)/ipv6-up
354 ln -svf ip-updown $(DESTDIR)$(pppdir)/ipv6-down
355
356ppp-uninstall-hook:
357 rm -f $(DESTDIR)$(pppdir)/ip-{down,pre-up,up}
358 rm -f $(DESTDIR)$(pppdir)/ipv6-{down,up}
359
360INSTALL_EXEC_HOOKS += ppp-install-hook
361UNINSTALL_EXEC_HOOKS += ppp-uninstall-hook
362
363# ------------------------------------------------------------------------------
364
365if HAVE_SYSTEMD
366systemdsystemunit_DATA = \
367 src/systemd/firewall4.service \
368 src/systemd/firewall6.service \
369 src/systemd/firewall-init.service \
370 src/systemd/network-init.service \
371 src/systemd/network@.service
372
373CLEANFILES += \
374 $(systemdsystemunit_DATA)
375
376INSTALL_DIRS += \
377 $(systemdsystemunitdir)
378endif
379
380EXTRA_DIST += \
381 src/systemd/firewall4.service.in \
382 src/systemd/firewall6.service.in \
383 src/systemd/firewall-init.service.in \
384 src/systemd/network-init.service.in \
385 src/systemd/network@.service.in
386
387# ------------------------------------------------------------------------------
388
5e84cd41
MT
389systemconfig_vpndir = $(systemconfigdir)/vpn
390
391dist_systemconfig_vpn_security_policies_DATA = \
56d5efa7 392 config/vpn/security-policies/performance \
5e84cd41
MT
393 config/vpn/security-policies/system
394
395systemconfig_vpn_security_policiesdir = $(systemconfig_vpndir)/security-policies
396
397# ------------------------------------------------------------------------------
398
5ca9dc30
MT
399dist_sysctl_DATA = \
400 src/sysctl/network.conf
401
402# ------------------------------------------------------------------------------
403
bae37360
MT
404dist_bashcompletion_SCRIPTS = \
405 src/bash-completion/network
406
407# ------------------------------------------------------------------------------
408
5ca9dc30 409dist_tmpfiles_DATA = \
f9dac5a0 410 src/tmpfiles/network.conf
5ca9dc30
MT
411
412# ------------------------------------------------------------------------------
413
414if HAVE_UDEV
415dist_udev_SCRIPTS = \
416 src/udev/network-hotplug \
417 src/udev/network-hotplug-rename \
418 src/udev/network-hotplug-serial
419
420dist_udevrules_DATA = \
421 src/udev/rules.d/50-serial-whitelist.rules \
422 src/udev/rules.d/60-net.rules
423
424INSTALL_DIRS += \
425 $(udevdir) \
426 $(udevrulesdir)
427endif
428
429# ------------------------------------------------------------------------------
430
01f2b2e4 431pkgconfig_DATA = \
5ca9dc30
MT
432 src/network.pc
433
434CLEANFILES += \
01f2b2e4 435 $(pkgconfig_DATA)
5ca9dc30
MT
436
437EXTRA_DIST += \
438 src/network.pc.in
439
440# ------------------------------------------------------------------------------
441
442dist_macros_DATA = \
443 src/macros/DHCP \
444 src/macros/HTTP \
445 src/macros/HTTPS \
446 src/macros/WWW
447
448# ------------------------------------------------------------------------------
449
ec3fe5b7 450INSTALL_DIRS += \
de3cecef
MT
451 $(triggersdir)
452
453# ------------------------------------------------------------------------------
454
5ca9dc30 455MANPAGES = \
2b0ff832 456 man/firewall-settings.8 \
5ca9dc30 457 man/network.8 \
5ca9dc30 458 man/network-device.8 \
427f5ae2 459 man/network-dhcp.8 \
5ca9dc30 460 man/network-dns-server.8 \
de72bd91 461 man/network-performance-tuning.8 \
7a302fa7 462 man/network-port.8 \
94eab754 463 man/network-quick-start.8 \
5ca9dc30 464 man/network-route.8 \
e023191b 465 man/network-route-static.8 \
2b0ff832 466 man/network-settings.8 \
bec94f95
MT
467 man/network-vpn.8 \
468 man/network-vpn-security-policies.8 \
5ca9dc30 469 man/network-zone.8 \
5ca9dc30
MT
470 man/network-zone-bridge.8 \
471 man/network-zone-config-pppoe-server.8 \
bd767a3e 472 man/network-zone-ip-tunnel.8 \
7a302fa7 473 man/network-zone-modem.8 \
2fb7ae4d
MT
474 man/network-zone-pppoe.8 \
475 man/network-zone-wireless.8
5ca9dc30 476
8f591cfc 477MANPAGES_TXT = $(patsubst %.8,%.txt,$(MANPAGES))
d746901b
MT
478MANPAGES_HTML = $(patsubst %.txt,%.html,$(MANPAGES_TXT))
479MANPAGES_XML = $(patsubst %.txt,%.xml,$(MANPAGES_TXT))
5ca9dc30
MT
480
481.PHONY: man
482man: $(MANPAGES) $(MANPAGES_HTML)
483
484man_MANS = \
485 $(MANPAGES)
486
487noinst_DATA += \
d746901b
MT
488 $(MANPAGES_HTML) \
489 $(MANPAGES_XML)
5ca9dc30
MT
490
491CLEANFILES += \
492 $(man_MANS) \
d746901b
MT
493 $(MANPAGES_HTML) \
494 $(MANPAGES_XML)
5ca9dc30
MT
495
496EXTRA_DIST += \
a7d2fef7 497 $(MANPAGES_TXT)
5ca9dc30
MT
498
499XSLTPROC_FLAGS = \
500 --nonet \
501 --stringparam man.output.quietly 1 \
502 --stringparam funcsynopsis.style ansi \
503 --stringparam man.th.extra1.suppress 1 \
504 --stringparam man.authors.section.enabled 1 \
505 --stringparam man.copyright.section.enabled 1
506
507XSLTPROC_COMMAND_MAN = \
508 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
509 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
510
baf429f1
MT
511man/%.xml: man/%.txt man/asciidoc.conf
512 $(AM_V_ASCIIDOC)$(ASCIIDOC) \
513 -f man/asciidoc.conf \
514 -d manpage -b docbook -o $@ $<
8f591cfc 515
5ca9dc30
MT
516man/%.8: man/%.xml
517 $(XSLTPROC_COMMAND_MAN)
518
baf429f1
MT
519man/%.html: man/%.txt man/asciidoc.conf
520 $(AM_V_ASCIIDOC)$(ASCIIDOC) \
521 -f man/asciidoc.conf \
522 -b html5 -a icons -a theme=flask -o $@ $<
5ca9dc30
MT
523
524# ------------------------------------------------------------------------------
525
526substitutions = \
527 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
528 '|PACKAGE_URL=$(PACKAGE_URL)|' \
529 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
a35f416c 530 '|builddir=$(abs_builddir)|' \
5ca9dc30
MT
531 '|prefix=$(prefix)|' \
532 '|exec_prefix=$(exec_prefix)|' \
533 '|sbindir=$(sbindir)|' \
c6525a63 534 '|networkdir=$(networkdir)|' \
96275aa1 535 '|helpersdir=$(helpersdir)|' \
c4966dd6
MT
536 '|utildir=$(utildir)|' \
537 '|VIRTUAL_ENVIRONMENT_IMAGES_DIR=$(VIRTUAL_ENVIRONMENT_IMAGES_DIR)|'
5ca9dc30
MT
538
539SED_PROCESS = \
540 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
541 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
542 < $< > $@
543
3431f712 544%: %.in Makefile
5ca9dc30
MT
545 $(SED_PROCESS)
546
547INSTALL_DIRS += \
548 $(sbindir)
549
550install-exec-hook: $(INSTALL_EXEC_HOOKS)
551
552uninstall-hook: $(UNINSTALL_EXEC_HOOKS)
553
554# - testsuite ------------------------------------------------------------------
555
556TESTS_ENVIRONMENT = \
071d3416 557 LD_LIBRARY_PATH=$(top_builddir)/src/.libs:$(LD_LIBRARY_PATH) \
8744a476
MT
558 PATH=$(top_builddir)/src:$(PATH) \
559 functions=$(abs_builddir)/src/functions/functions \
560 networkdir=$(abs_srcdir)/src/functions \
561 testdir=$(top_srcdir)/test
562
563dist_check_DATA = \
ee86c73f
MT
564 test/constants.sh \
565 test/test-functions
5ca9dc30
MT
566
567dist_check_SCRIPTS = \
8744a476 568 $(TESTS)
5ca9dc30
MT
569
570TESTS = \
bb8304ec 571 test/load-library \
bb8304ec 572 test/functions/ip/ip_detect_protocol \
bb8304ec 573 test/functions/ip/ip_get_prefix \
8b0958b2 574 test/functions/ip/ip_net_is_valid \
b7fd8067 575 test/functions/ip/ip_is_valid \
b862734c 576 test/functions/ip/ip_network_is_subnet_of \
b7fd8067
MT
577 test/functions/ip/ip_prefix_is_valid \
578 test/functions/ip/ip_protocol_is_supported \
579 test/functions/ip/ip_split_prefix
1908d2b3
MT
580
581# - NITSI tests ----------------------------------------------------------------
582
232d01c8 583# Files for the virtual environment
c4966dd6 584VIRTUAL_ENVIRONMENT_FILES = \
232d01c8
MT
585 test/nitsi/virtual-environment/basic/machines/alice/machine.xml \
586 test/nitsi/virtual-environment/basic/machines/alice/snapshot.xml \
587 test/nitsi/virtual-environment/basic/machines/bob/machine.xml \
588 test/nitsi/virtual-environment/basic/machines/bob/snapshot.xml \
589 test/nitsi/virtual-environment/basic/network/network1/network.xml \
590 test/nitsi/virtual-environment/basic/network/network2/network.xml \
591 test/nitsi/virtual-environment/basic/network/network3/network.xml \
592 test/nitsi/virtual-environment/basic/network/network4/network.xml \
232d01c8
MT
593 test/nitsi/virtual-environment/basic/settings
594
c4966dd6
MT
595EXTRA_DIST += \
596 test/nitsi/virtual-environment/basic/machines/alice/machine.xml.in \
597 test/nitsi/virtual-environment/basic/machines/alice/snapshot.xml.in \
598 test/nitsi/virtual-environment/basic/machines/bob/machine.xml.in \
43d82e80
JS
599 test/nitsi/virtual-environment/basic/machines/bob/snapshot.xml.in \
600 test/nitsi/virtual-environment/basic/settings.in
c4966dd6
MT
601
602CLEANFILES += \
603 test/nitsi/virtual-environment/basic/machines/alice/machine.xml \
604 test/nitsi/virtual-environment/basic/machines/alice/snapshot.xml \
605 test/nitsi/virtual-environment/basic/machines/bob/machine.xml \
43d82e80
JS
606 test/nitsi/virtual-environment/basic/machines/bob/snapshot.xml \
607 test/nitsi/virtual-environment/basic/settings
c4966dd6
MT
608
609# Virtual Machine Images
610VIRTUAL_ENVIRONMENT_IMAGES = \
611 $(VIRTUAL_ENVIRONMENT_IMAGES_DIR)/ipfire-alice-2.qcow2 \
612 $(VIRTUAL_ENVIRONMENT_IMAGES_DIR)/ipfire-bob.qcow2
613
614DISTCLEANFILES += \
615 $(VIRTUAL_ENVIRONMENT_IMAGES)
616
617VIRTUAL_ENVIRONMENT_IMAGES_DIR = $(abs_builddir)/test/nitsi/virtual-environment/.images
618VIRTUAL_ENVIRONMENT_IMAGES_DOWNLOAD_URL = \
619 https://people.ipfire.org/~jschlag/nitsi-ipfire/virtual-environment/basic/
620
60dbefba 621NITSI_INCLUDE_RECIPES = \
fb99a6c7 622 test/nitsi/include/setup
60dbefba
JS
623
624EXTRA_DIST += \
fb99a6c7 625 test/nitsi/include/setup.in
60dbefba
JS
626
627CLEANFILES += \
fb99a6c7 628 test/nitsi/include/setup
60dbefba 629
1908d2b3 630NITSI_TESTS = \
4c769bb2 631 test/nitsi/test/make-check \
ae7a79da 632 test/nitsi/test/phase1 \
7808dbf2 633 test/nitsi/test/pppoe \
07c82cd3 634 test/nitsi/test/raw-device-get-by-mac \
9c8ff8de 635 test/nitsi/test/zone-new-bridge \
283ad5b0 636 test/nitsi/test/zone-port-attach-bridge \
8c929286
MT
637 test/nitsi/test/zone/ip-tunnel/gre6 \
638 test/nitsi/test/zone/ip-tunnel/gre4 \
60b6dd44
JS
639 test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv4 \
640 test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv6 \
641 test/nitsi/test/vpn/ipsec/n2n/vti/ipv6-via-ipv4 \
642 test/nitsi/test/vpn/ipsec/n2n/vti/ipv6-via-ipv6 \
643 test/nitsi/test/vpn/ipsec/n2n/vti/ipv64-via-ipv4 \
644 test/nitsi/test/vpn/ipsec/n2n/vti/ipv64-via-ipv6 \
87ad62bc 645 test/nitsi/test/port-vlan
1908d2b3
MT
646
647EXTRA_DIST += \
91ee6559 648 test/nitsi/test/settings.in \
a35f416c 649 test/nitsi/test/make-check/recipe.in \
07c82cd3
JS
650 test/nitsi/test/make-check/settings.in \
651 test/nitsi/test/raw-device-get-by-mac/recipe \
652 test/nitsi/test/raw-device-get-by-mac/settings.in \
653 test/nitsi/test/zone-new-bridge/recipe \
9c8ff8de
JS
654 test/nitsi/test/zone-new-bridge/settings.in \
655 test/nitsi/test/zone-port-attach-bridge/recipe \
283ad5b0 656 test/nitsi/test/zone-port-attach-bridge/settings.in \
8c929286
MT
657 test/nitsi/test/zone/ip-tunnel/gre6/recipe \
658 test/nitsi/test/zone/ip-tunnel/gre6/settings \
659 test/nitsi/test/zone/ip-tunnel/gre4/recipe \
660 test/nitsi/test/zone/ip-tunnel/gre4/settings \
60b6dd44
JS
661 test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv4/recipe \
662 test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv4/settings \
663 test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv6/recipe \
664 test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv6/settings \
665 test/nitsi/test/vpn/ipsec/n2n/vti/ipv6-via-ipv4/recipe \
666 test/nitsi/test/vpn/ipsec/n2n/vti/ipv6-via-ipv4/settings \
667 test/nitsi/test/vpn/ipsec/n2n/vti/ipv6-via-ipv6/recipe \
668 test/nitsi/test/vpn/ipsec/n2n/vti/ipv6-via-ipv6/settings \
669 test/nitsi/test/vpn/ipsec/n2n/vti/ipv64-via-ipv4/recipe \
670 test/nitsi/test/vpn/ipsec/n2n/vti/ipv64-via-ipv4/settings \
671 test/nitsi/test/vpn/ipsec/n2n/vti/ipv64-via-ipv6/recipe \
672 test/nitsi/test/vpn/ipsec/n2n/vti/ipv64-via-ipv6/settings \
673 test/nitsi/test/port-vlan/recipe \
674 test/nitsi/test/port-vlan/settings
a35f416c
MT
675
676CLEANFILES += \
91ee6559 677 test/nitsi/test/settings \
a35f416c 678 test/nitsi/test/make-check/recipe \
4c769bb2 679 test/nitsi/test/make-check/settings \
07c82cd3 680 test/nitsi/test/raw-device-get-by-mac/settings \
9c8ff8de 681 test/nitsi/test/zone-new-bridge/settings \
9b01a925 682 test/nitsi/test/zone-port-attach-bridge/settings
1908d2b3
MT
683
684NITSI_ENVIRONMENT =
685
686.PHONY: $(NITSI_TESTS)
59281a53 687$(NITSI_TESTS): % : dist %/recipe %/settings test/nitsi/test/settings $(VIRTUAL_ENVIRONMENT_FILES) $(VIRTUAL_ENVIRONMENT_IMAGES) $(NITSI_INCLUDE_RECIPES)
91ee6559 688 $(AM_V_NITSI) $(NITSI_ENVIRONMENT) $(NITSI) --log-level error run-test -d $@ \
e3e44ab6 689 --default-settings $(abs_builddir)/test/nitsi/test/settings --interactive-error-handling
1908d2b3
MT
690
691.PHONY: nitsi
59281a53 692nitsi: $(NITSI_TESTS)
c4966dd6
MT
693
694# Downloads a virtual image file and extracts it
695$(VIRTUAL_ENVIRONMENT_IMAGES):
696 $(AM_V_DOWNLOAD)$(MKDIR_P) $(dir $@) && \
697 $(WGET) -qO - $(VIRTUAL_ENVIRONMENT_IMAGES_DOWNLOAD_URL)/$(notdir $@).xz | xz -qd > $@