man: Convert network-performance-tuning(8) to asciidoc
[people/ms/network.git] / Makefile.am
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
21 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
22 AM_MAKEFLAGS = --no-print-directory
23 AUTOMAKE_OPTIONS = color-tests
24
25 # remove target it the command fails
26 .DELETE_ON_ERROR:
27
28 # keep itermediate files
29 .SECONDARY:
30
31 configdir        = $(sysconfdir)/network
32 bashcompletiondir= $(datadir)/bash-completion/completions
33 libexecdir       = $(prefix)/lib
34 pkgconfigdir     = $(libdir)/pkgconfig
35 pppdir           = $(sysconfdir)/ppp
36 systemconfigdir  = $(datadir)/network
37 sysctldir        = $(prefix)/lib/sysctl.d
38 tmpfilesdir      = $(prefix)/lib/tmpfiles.d
39 udevrulesdir     = $(udevdir)/rules.d
40
41 networkdir       = $(libexecdir)/network
42 helpersdir       = $(networkdir)/helpers
43
44 macrosdir        = $(libexecdir)/firewall/macros
45
46 hooksdir         = $(networkdir)/hooks
47 hooks_configsdir = $(hooksdir)/configs
48 hooks_portsdir   = $(hooksdir)/ports
49 hooks_zonesdir   = $(hooksdir)/zones
50
51 triggersdir      = $(networkdir)/triggers
52
53 logdir           = $(localestatedir)/log/network
54 utildir          = $(networkdir)
55
56 CLEANFILES =
57 DISTCLEANFILES =
58 EXTRA_DIST =
59 INSTALL_DIRS =
60 INSTALL_EXEC_HOOKS =
61 UNINSTALL_EXEC_HOOKS =
62 noinst_DATA =
63
64 AM_CPPFLAGS = \
65         $(OUR_CPPFLAGS) \
66         -include $(top_builddir)/config.h \
67         -I${top_srcdir}/src/libnetwork
68
69 AM_CFLAGS = \
70         $(OUR_CFLAGS) \
71         -fvisibility=hidden \
72         -ffunction-sections \
73         -fdata-sections
74
75 AM_LDFLAGS = \
76         $(OUR_LDFLAGS) \
77         -Wl,--gc-sections \
78         -Wl,--as-needed
79
80 DISTCHECK_CONFIGURE_FLAGS = \
81         --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) \
82         --with-udevdir=$$dc_install_base/$(udevdir)
83
84 install-directories-hook:
85         $(MKDIR_P) $(addprefix $(DESTDIR),$(INSTALL_DIRS))
86
87 INSTALL_EXEC_HOOKS += \
88         install-directories-hook
89
90 # ------------------------------------------------------------------------------
91
92 AM_V_ASCIIDOC   = $(AM_V_ASCIIDOC_$(V))
93 AM_V_ASCIIDOC_  = $(AM_V_ASCIIDOC_$(AM_DEFAULT_VERBOSITY))
94 AM_V_ASCIIDOC_0 = @echo "  ASCIIDOC" $@;
95
96 AM_V_DOWNLOAD   = $(AM_V_DOWNLOAD_$(V))
97 AM_V_DOWNLOAD_  = $(AM_V_DOWNLOAD_$(AM_DEFAULT_VERBOSITY))
98 AM_V_DOWNLOAD_0 = @echo "  LOAD    " $@;
99
100 AM_V_NITSI   = $(AM_V_NITSI_$(V))
101 AM_V_NITSI_  = $(AM_V_NITSI_$(AM_DEFAULT_VERBOSITY))
102 AM_V_NITSI_0 = @echo "  NITSI   " $@;
103
104 AM_V_XSLT   = $(AM_V_XSLT_$(V))
105 AM_V_XSLT_  = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
106 AM_V_XSLT_0 = @echo "  XSLT    " $@;
107
108 # ------------------------------------------------------------------------------
109
110 dist_doc_DATA = \
111         README \
112         docs/CODING_STYLE \
113         docs/COPYING
114
115 dist_sbin_SCRIPTS = \
116         src/dhclient-script \
117         src/firewall-config \
118         src/firewall4 \
119         src/firewall6 \
120         src/network
121
122 network_DATA = \
123         src/functions/functions
124
125 CLEANFILES += \
126         src/functions/functions
127
128 EXTRA_DIST += \
129         src/functions/functions.in
130
131 dist_network_DATA = \
132         src/functions/functions.at \
133         src/functions/functions.auth \
134         src/functions/functions.bird \
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 \
145         src/functions/functions.description \
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 \
152         src/functions/functions.editor \
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 \
159         src/functions/functions.hotplug \
160         src/functions/functions.http \
161         src/functions/functions.interrupts \
162         src/functions/functions.ip \
163         src/functions/functions.ipsec \
164         src/functions/functions.ipsec-pool \
165         src/functions/functions.iptables \
166         src/functions/functions.ip-tunnel \
167         src/functions/functions.ipv4 \
168         src/functions/functions.ipv6 \
169         src/functions/functions.leds \
170         src/functions/functions.list \
171         src/functions/functions.lock \
172         src/functions/functions.logging \
173         src/functions/functions.macros \
174         src/functions/functions.modem \
175         src/functions/functions.offloading \
176         src/functions/functions.phy \
177         src/functions/functions.ports \
178         src/functions/functions.ppp \
179         src/functions/functions.pppoe-server \
180         src/functions/functions.route \
181         src/functions/functions.routing \
182         src/functions/functions.serial \
183         src/functions/functions.service \
184         src/functions/functions.settings \
185         src/functions/functions.stp \
186         src/functions/functions.sysctl \
187         src/functions/functions.system \
188         src/functions/functions.triggers \
189         src/functions/functions.usb \
190         src/functions/functions.util \
191         src/functions/functions.vlan \
192         src/functions/functions.vpn \
193         src/functions/functions.vpn-security-policies \
194         src/functions/functions.wireless \
195         src/functions/functions.wireless-mesh \
196         src/functions/functions.wireless-networks \
197         src/functions/functions.wpa_supplicant \
198         src/functions/functions.zone \
199         src/header-config \
200         src/header-port \
201         src/header-zone
202
203 dist_network_SCRIPTS = \
204         src/dhclient-helper \
205         src/ppp/dialer \
206         src/ppp/pppoe-server
207
208 dist_helpers_SCRIPTS = \
209         src/helpers/dhcpd-config-helper \
210         src/helpers/firewall-kernel-init \
211         src/helpers/hostapd-config-helper \
212         src/helpers/ipsec-updown \
213         src/helpers/pppd-angel \
214         src/helpers/wpa_supplicant
215
216 bin_PROGRAMS = \
217         src/inetcalc
218
219 src_inetcalc_SOURCES = \
220         src/inetcalc.c
221
222 src_inetcalc_LDADD = \
223         src/libnetwork.la
224
225 dist_hooks_configs_SCRIPTS = \
226         src/hooks/configs/dhcp \
227         src/hooks/configs/ipv6-auto \
228         src/hooks/configs/pppoe-server \
229         src/hooks/configs/static
230
231 dist_hooks_ports_SCRIPTS = \
232         src/hooks/ports/bonding \
233         src/hooks/ports/dummy \
234         src/hooks/ports/ethernet \
235         src/hooks/ports/ip-tunnel \
236         src/hooks/ports/vlan \
237         src/hooks/ports/wireless-ap \
238         src/hooks/ports/wireless-mesh
239
240 dist_hooks_zones_SCRIPTS = \
241         src/hooks/zones/bridge \
242         src/hooks/zones/ip-tunnel \
243         src/hooks/zones/modem \
244         src/hooks/zones/pppoe \
245         src/hooks/zones/wireless
246
247 INSTALL_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
257 # ------------------------------------------------------------------------------
258
259 LIBNETWORK_CURRENT=0
260 LIBNETWORK_REVISION=0
261 LIBNETWORK_AGE=0
262
263 pkginclude_HEADERS = \
264         src/libnetwork/network/interface.h \
265         src/libnetwork/network/libnetwork.h \
266         src/libnetwork/network/logging.h \
267         src/libnetwork/network/phy.h
268
269 lib_LTLIBRARIES = \
270         src/libnetwork.la
271
272 src_libnetwork_la_SOURCES = \
273         src/libnetwork/interface.c \
274         src/libnetwork/libnetwork-private.h \
275         src/libnetwork/libnetwork.c \
276         src/libnetwork/phy.c
277
278 src_libnetwork_la_LIBADD = \
279         $(LIBNL_LIBS)
280
281 src_libnetwork_la_CPPFLAGS = \
282         $(AM_CPPFLAGS) \
283         $(LIBNL_CPPFLAGS) \
284         -D_GNU_SOURCE \
285         -DNETWORK_PRIVATE
286
287 src_libnetwork_la_CFLAGS = \
288         $(AM_CFLAGS) \
289         $(LIBNL_CFLAGS)
290
291 src_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
296 src_libnetwork_la_DEPENDENCIES = \
297         src/libnetwork/libnetwork.sym
298
299 EXTRA_DIST += \
300         src/libnetwork/libnetwork.sym
301
302 # ------------------------------------------------------------------------------
303
304 util_PROGRAMS = \
305         src/utils/network-phy-list-channels \
306         src/utils/network-phy-list-ciphers \
307         src/utils/network-phy-list-ht-caps \
308         src/utils/network-phy-list-vht-caps
309
310 src_utils_network_phy_list_channels_SOURCES = \
311         src/utils/network-phy-list-channels.c
312
313 src_utils_network_phy_list_channels_LDADD = \
314         src/libnetwork.la
315
316 src_utils_network_phy_list_ciphers_SOURCES = \
317         src/utils/network-phy-list-ciphers.c
318
319 src_utils_network_phy_list_ciphers_LDADD = \
320         src/libnetwork.la
321
322 src_utils_network_phy_list_ht_caps_SOURCES = \
323         src/utils/network-phy-list-ht-caps.c
324
325 src_utils_network_phy_list_ht_caps_LDADD = \
326         src/libnetwork.la
327
328 src_utils_network_phy_list_vht_caps_SOURCES = \
329         src/utils/network-phy-list-vht-caps.c
330
331 src_utils_network_phy_list_vht_caps_LDADD = \
332         src/libnetwork.la
333
334 # ------------------------------------------------------------------------------
335
336 ppp_SCRIPTS = \
337         src/ppp/ip-updown
338
339 CLEANFILES += \
340         src/ppp/ip-updown
341
342 EXTRA_DIST += \
343         src/ppp/ip-updown.in
344
345 INSTALL_DIRS += \
346         $(pppdir) \
347         $(logdir)
348
349 ppp-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
356 ppp-uninstall-hook:
357         rm -f $(DESTDIR)$(pppdir)/ip-{down,pre-up,up}
358         rm -f $(DESTDIR)$(pppdir)/ipv6-{down,up}
359
360 INSTALL_EXEC_HOOKS += ppp-install-hook
361 UNINSTALL_EXEC_HOOKS += ppp-uninstall-hook
362
363 # ------------------------------------------------------------------------------
364
365 if HAVE_SYSTEMD
366 systemdsystemunit_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
373 CLEANFILES += \
374         $(systemdsystemunit_DATA)
375
376 INSTALL_DIRS += \
377         $(systemdsystemunitdir)
378 endif
379
380 EXTRA_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
389 systemconfig_vpndir = $(systemconfigdir)/vpn
390
391 dist_systemconfig_vpn_security_policies_DATA = \
392         config/vpn/security-policies/performance \
393         config/vpn/security-policies/system
394
395 systemconfig_vpn_security_policiesdir = $(systemconfig_vpndir)/security-policies
396
397 # ------------------------------------------------------------------------------
398
399 dist_sysctl_DATA = \
400         src/sysctl/network.conf
401
402 # ------------------------------------------------------------------------------
403
404 dist_bashcompletion_SCRIPTS = \
405         src/bash-completion/network
406
407 # ------------------------------------------------------------------------------
408
409 dist_tmpfiles_DATA = \
410         src/tmpfiles/network.conf
411
412 # ------------------------------------------------------------------------------
413
414 if HAVE_UDEV
415 dist_udev_SCRIPTS = \
416         src/udev/network-hotplug \
417         src/udev/network-hotplug-rename \
418         src/udev/network-hotplug-serial
419
420 dist_udevrules_DATA = \
421         src/udev/rules.d/50-serial-whitelist.rules \
422         src/udev/rules.d/60-net.rules
423
424 INSTALL_DIRS += \
425         $(udevdir) \
426         $(udevrulesdir)
427 endif
428
429 # ------------------------------------------------------------------------------
430
431 pkgconfig_DATA = \
432         src/network.pc
433
434 CLEANFILES += \
435         $(pkgconfig_DATA)
436
437 EXTRA_DIST += \
438         src/network.pc.in
439
440 # ------------------------------------------------------------------------------
441
442 dist_macros_DATA = \
443         src/macros/DHCP \
444         src/macros/HTTP \
445         src/macros/HTTPS \
446         src/macros/WWW
447
448 # ------------------------------------------------------------------------------
449
450 INSTALL_DIRS += \
451         $(triggersdir)
452
453 # ------------------------------------------------------------------------------
454
455 MANPAGES = \
456         man/firewall-settings.8 \
457         man/network.8 \
458         man/network-color.8 \
459         man/network-device.8 \
460         man/network-dhcp.8 \
461         man/network-dns-server.8 \
462         man/network-performance-tuning.8 \
463         man/network-port.8 \
464         man/network-quick-start.8 \
465         man/network-route.8 \
466         man/network-route-static.8 \
467         man/network-settings.8 \
468         man/network-vpn.8 \
469         man/network-vpn-security-policies.8 \
470         man/network-zone.8 \
471         man/network-zone-bridge.8 \
472         man/network-zone-config-pppoe-server.8 \
473         man/network-zone-ip-tunnel.8 \
474         man/network-zone-modem.8 \
475         man/network-zone-pppoe.8 \
476         man/network-zone-wireless.8
477
478 MANPAGES_TXT  = $(patsubst %.8,%.txt,$(MANPAGES))
479 MANPAGES_HTML = $(patsubst %.txt,%.html,$(MANPAGES))
480
481 .PHONY: man
482 man: $(MANPAGES) $(MANPAGES_HTML)
483
484 man_MANS = \
485         $(MANPAGES)
486
487 noinst_DATA += \
488         $(MANPAGES_HTML)
489
490 CLEANFILES += \
491         $(man_MANS) \
492         $(MANPAGES_HTML)
493
494 EXTRA_DIST += \
495         $(MANPAGES_TXT)
496
497 XSLTPROC_FLAGS = \
498         --nonet \
499         --stringparam man.output.quietly 1 \
500         --stringparam funcsynopsis.style ansi \
501         --stringparam man.th.extra1.suppress 1 \
502         --stringparam man.authors.section.enabled 1 \
503         --stringparam man.copyright.section.enabled 1
504
505 XSLTPROC_COMMAND_MAN = \
506         $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
507                 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
508
509 man/%.xml: man/%.txt man/asciidoc.conf
510         $(AM_V_ASCIIDOC)$(ASCIIDOC) \
511                 -f man/asciidoc.conf \
512                 -d manpage -b docbook -o $@ $<
513
514 man/%.8: man/%.xml
515         $(XSLTPROC_COMMAND_MAN)
516
517 man/%.html: man/%.txt man/asciidoc.conf
518         $(AM_V_ASCIIDOC)$(ASCIIDOC) \
519                 -f man/asciidoc.conf \
520                 -b html5 -a icons -a theme=flask -o $@ $<
521
522 # ------------------------------------------------------------------------------
523
524 substitutions = \
525         '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
526         '|PACKAGE_URL=$(PACKAGE_URL)|' \
527         '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
528         '|builddir=$(abs_builddir)|' \
529         '|prefix=$(prefix)|' \
530         '|exec_prefix=$(exec_prefix)|' \
531         '|sbindir=$(sbindir)|' \
532         '|networkdir=$(networkdir)|' \
533         '|helpersdir=$(helpersdir)|' \
534         '|utildir=$(utildir)|' \
535         '|VIRTUAL_ENVIRONMENT_IMAGES_DIR=$(VIRTUAL_ENVIRONMENT_IMAGES_DIR)|'
536
537 SED_PROCESS = \
538         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
539         $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
540                 < $< > $@
541
542 %: %.in Makefile
543         $(SED_PROCESS)
544
545 INSTALL_DIRS += \
546         $(sbindir)
547
548 install-exec-hook: $(INSTALL_EXEC_HOOKS)
549
550 uninstall-hook: $(UNINSTALL_EXEC_HOOKS)
551
552 # - testsuite ------------------------------------------------------------------
553
554 TESTS_ENVIRONMENT = \
555         LD_LIBRARY_PATH=$(top_builddir)/src/.libs:$(LD_LIBRARY_PATH) \
556         PATH=$(top_builddir)/src:$(PATH) \
557         functions=$(abs_builddir)/src/functions/functions \
558         networkdir=$(abs_srcdir)/src/functions \
559         testdir=$(top_srcdir)/test
560
561 dist_check_DATA = \
562         test/constants.sh \
563         test/test-functions
564
565 dist_check_SCRIPTS = \
566         $(TESTS)
567
568 TESTS = \
569         test/load-library \
570         test/functions/ip/ip_detect_protocol \
571         test/functions/ip/ip_get_prefix \
572         test/functions/ip/ip_net_is_valid \
573         test/functions/ip/ip_is_valid \
574         test/functions/ip/ip_network_is_subnet_of \
575         test/functions/ip/ip_prefix_is_valid \
576         test/functions/ip/ip_protocol_is_supported \
577         test/functions/ip/ip_split_prefix
578
579 # - NITSI tests ----------------------------------------------------------------
580
581 # Files for the virtual environment
582 VIRTUAL_ENVIRONMENT_FILES = \
583         test/nitsi/virtual-environment/basic/machines/alice/machine.xml \
584         test/nitsi/virtual-environment/basic/machines/alice/snapshot.xml \
585         test/nitsi/virtual-environment/basic/machines/bob/machine.xml \
586         test/nitsi/virtual-environment/basic/machines/bob/snapshot.xml \
587         test/nitsi/virtual-environment/basic/network/network1/network.xml \
588         test/nitsi/virtual-environment/basic/network/network2/network.xml \
589         test/nitsi/virtual-environment/basic/network/network3/network.xml \
590         test/nitsi/virtual-environment/basic/network/network4/network.xml \
591         test/nitsi/virtual-environment/basic/settings
592
593 EXTRA_DIST += \
594         test/nitsi/virtual-environment/basic/machines/alice/machine.xml.in \
595         test/nitsi/virtual-environment/basic/machines/alice/snapshot.xml.in \
596         test/nitsi/virtual-environment/basic/machines/bob/machine.xml.in \
597         test/nitsi/virtual-environment/basic/machines/bob/snapshot.xml.in \
598         test/nitsi/virtual-environment/basic/settings.in
599
600 CLEANFILES += \
601         test/nitsi/virtual-environment/basic/machines/alice/machine.xml \
602         test/nitsi/virtual-environment/basic/machines/alice/snapshot.xml \
603         test/nitsi/virtual-environment/basic/machines/bob/machine.xml \
604         test/nitsi/virtual-environment/basic/machines/bob/snapshot.xml \
605         test/nitsi/virtual-environment/basic/settings
606
607 # Virtual Machine Images
608 VIRTUAL_ENVIRONMENT_IMAGES = \
609         $(VIRTUAL_ENVIRONMENT_IMAGES_DIR)/ipfire-alice-2.qcow2 \
610         $(VIRTUAL_ENVIRONMENT_IMAGES_DIR)/ipfire-bob.qcow2
611
612 DISTCLEANFILES += \
613         $(VIRTUAL_ENVIRONMENT_IMAGES)
614
615 VIRTUAL_ENVIRONMENT_IMAGES_DIR = $(abs_builddir)/test/nitsi/virtual-environment/.images
616 VIRTUAL_ENVIRONMENT_IMAGES_DOWNLOAD_URL = \
617         https://people.ipfire.org/~jschlag/nitsi-ipfire/virtual-environment/basic/
618
619 NITSI_INCLUDE_RECIPES = \
620         test/nitsi/include/setup
621
622 EXTRA_DIST += \
623         test/nitsi/include/setup.in
624
625 CLEANFILES += \
626         test/nitsi/include/setup
627
628 NITSI_TESTS = \
629         test/nitsi/test/make-check \
630         test/nitsi/test/phase1 \
631         test/nitsi/test/pppoe \
632         test/nitsi/test/raw-device-get-by-mac \
633         test/nitsi/test/zone-new-bridge \
634         test/nitsi/test/zone-port-attach-bridge \
635         test/nitsi/test/zone/ip-tunnel/gre6 \
636         test/nitsi/test/zone/ip-tunnel/gre4 \
637         test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv4 \
638         test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv6 \
639         test/nitsi/test/vpn/ipsec/n2n/vti/ipv6-via-ipv4 \
640         test/nitsi/test/vpn/ipsec/n2n/vti/ipv6-via-ipv6 \
641         test/nitsi/test/vpn/ipsec/n2n/vti/ipv64-via-ipv4 \
642         test/nitsi/test/vpn/ipsec/n2n/vti/ipv64-via-ipv6 \
643         test/nitsi/test/port-vlan
644
645 EXTRA_DIST += \
646         test/nitsi/test/settings.in \
647         test/nitsi/test/make-check/recipe.in \
648         test/nitsi/test/make-check/settings.in \
649         test/nitsi/test/raw-device-get-by-mac/recipe \
650         test/nitsi/test/raw-device-get-by-mac/settings.in \
651         test/nitsi/test/zone-new-bridge/recipe \
652         test/nitsi/test/zone-new-bridge/settings.in \
653         test/nitsi/test/zone-port-attach-bridge/recipe \
654         test/nitsi/test/zone-port-attach-bridge/settings.in \
655         test/nitsi/test/zone/ip-tunnel/gre6/recipe \
656         test/nitsi/test/zone/ip-tunnel/gre6/settings \
657         test/nitsi/test/zone/ip-tunnel/gre4/recipe \
658         test/nitsi/test/zone/ip-tunnel/gre4/settings \
659         test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv4/recipe \
660         test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv4/settings \
661         test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv6/recipe \
662         test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv6/settings \
663         test/nitsi/test/vpn/ipsec/n2n/vti/ipv6-via-ipv4/recipe \
664         test/nitsi/test/vpn/ipsec/n2n/vti/ipv6-via-ipv4/settings \
665         test/nitsi/test/vpn/ipsec/n2n/vti/ipv6-via-ipv6/recipe \
666         test/nitsi/test/vpn/ipsec/n2n/vti/ipv6-via-ipv6/settings \
667         test/nitsi/test/vpn/ipsec/n2n/vti/ipv64-via-ipv4/recipe \
668         test/nitsi/test/vpn/ipsec/n2n/vti/ipv64-via-ipv4/settings \
669         test/nitsi/test/vpn/ipsec/n2n/vti/ipv64-via-ipv6/recipe \
670         test/nitsi/test/vpn/ipsec/n2n/vti/ipv64-via-ipv6/settings \
671         test/nitsi/test/port-vlan/recipe \
672         test/nitsi/test/port-vlan/settings
673
674 CLEANFILES += \
675         test/nitsi/test/settings \
676         test/nitsi/test/make-check/recipe \
677         test/nitsi/test/make-check/settings \
678         test/nitsi/test/raw-device-get-by-mac/settings \
679         test/nitsi/test/zone-new-bridge/settings \
680         test/nitsi/test/zone-port-attach-bridge/settings
681
682 NITSI_ENVIRONMENT =
683
684 .PHONY: $(NITSI_TESTS)
685 $(NITSI_TESTS): % : dist %/recipe %/settings test/nitsi/test/settings $(VIRTUAL_ENVIRONMENT_FILES) $(VIRTUAL_ENVIRONMENT_IMAGES) $(NITSI_INCLUDE_RECIPES)
686         $(AM_V_NITSI) $(NITSI_ENVIRONMENT) $(NITSI) --log-level error run-test -d $@ \
687                 --default-settings $(abs_builddir)/test/nitsi/test/settings --interactive-error-handling
688
689 .PHONY: nitsi
690 nitsi: $(NITSI_TESTS)
691
692 # Downloads a virtual image file and extracts it
693 $(VIRTUAL_ENVIRONMENT_IMAGES):
694         $(AM_V_DOWNLOAD)$(MKDIR_P) $(dir $@) && \
695         $(WGET) -qO - $(VIRTUAL_ENVIRONMENT_IMAGES_DOWNLOAD_URL)/$(notdir $@).xz | xz -qd > $@