]> git.ipfire.org Git - people/ms/network.git/blame - Makefile.am
Fix network reset
[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
c4966dd6
MT
92AM_V_DOWNLOAD = $(AM_V_DOWNLOAD_$(V))
93AM_V_DOWNLOAD_ = $(AM_V_DOWNLOAD_$(AM_DEFAULT_VERBOSITY))
94AM_V_DOWNLOAD_0 = @echo " LOAD " $@;
95
1908d2b3
MT
96AM_V_NITSI = $(AM_V_NITSI_$(V))
97AM_V_NITSI_ = $(AM_V_NITSI_$(AM_DEFAULT_VERBOSITY))
98AM_V_NITSI_0 = @echo " NITSI " $@;
99
5ca9dc30
MT
100AM_V_XSLT = $(AM_V_XSLT_$(V))
101AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
102AM_V_XSLT_0 = @echo " XSLT " $@;
103
104# ------------------------------------------------------------------------------
105
106dist_doc_DATA = \
1337eee2 107 README \
dd46582c 108 docs/CODING_STYLE \
1337eee2 109 docs/COPYING
5ca9dc30
MT
110
111dist_sbin_SCRIPTS = \
112 src/dhclient-script \
113 src/firewall-config \
114 src/firewall4 \
115 src/firewall6 \
116 src/network
117
a62e991a 118network_DATA = \
5ca9dc30
MT
119 src/functions/functions
120
121CLEANFILES += \
122 src/functions/functions
123
124EXTRA_DIST += \
125 src/functions/functions.in
126
a62e991a 127dist_network_DATA = \
5ca9dc30
MT
128 src/functions/functions.at \
129 src/functions/functions.auth \
5ca9dc30
MT
130 src/functions/functions.bonding \
131 src/functions/functions.bridge \
132 src/functions/functions.cli \
133 src/functions/functions.cli.firewall \
134 src/functions/functions.colors \
135 src/functions/functions.config \
136 src/functions/functions.conntrack \
137 src/functions/functions.constants \
138 src/functions/functions.constants-firewall \
139 src/functions/functions.db \
5ccc7299 140 src/functions/functions.description \
5ca9dc30
MT
141 src/functions/functions.device \
142 src/functions/functions.dhclient \
143 src/functions/functions.dhcpd \
144 src/functions/functions.distro \
145 src/functions/functions.dns \
146 src/functions/functions.dummy \
e524986c 147 src/functions/functions.editor \
5ca9dc30
MT
148 src/functions/functions.firewall \
149 src/functions/functions.firewall-policy \
150 src/functions/functions.firewall-zones \
151 src/functions/functions.he \
152 src/functions/functions.hook \
153 src/functions/functions.hostapd \
b8026986 154 src/functions/functions.hotplug \
5ca9dc30 155 src/functions/functions.http \
de72bd91 156 src/functions/functions.interrupts \
5ca9dc30 157 src/functions/functions.ip \
be844b7b 158 src/functions/functions.ipsec \
4e78b7ad 159 src/functions/functions.ipsec-pool \
5ca9dc30
MT
160 src/functions/functions.iptables \
161 src/functions/functions.ip-tunnel \
162 src/functions/functions.ipv4 \
163 src/functions/functions.ipv6 \
5ca9dc30
MT
164 src/functions/functions.list \
165 src/functions/functions.lock \
166 src/functions/functions.logging \
167 src/functions/functions.macros \
5ca9dc30
MT
168 src/functions/functions.modem \
169 src/functions/functions.phy \
170 src/functions/functions.ports \
171 src/functions/functions.ppp \
172 src/functions/functions.pppoe-server \
173 src/functions/functions.radvd \
5ca9dc30
MT
174 src/functions/functions.route \
175 src/functions/functions.routing \
176 src/functions/functions.serial \
177 src/functions/functions.service \
e9df08ad 178 src/functions/functions.settings \
5ca9dc30 179 src/functions/functions.stp \
5ca9dc30 180 src/functions/functions.sysctl \
de72bd91 181 src/functions/functions.system \
de3cecef 182 src/functions/functions.triggers \
5ca9dc30
MT
183 src/functions/functions.usb \
184 src/functions/functions.util \
185 src/functions/functions.vlan \
2da98f56 186 src/functions/functions.vpn \
3eae7bed 187 src/functions/functions.vpn-security-policies \
5ca9dc30 188 src/functions/functions.wireless \
81bf9898 189 src/functions/functions.wireless-mesh \
49958b8c 190 src/functions/functions.wireless-networks \
5ca9dc30
MT
191 src/functions/functions.wpa_supplicant \
192 src/functions/functions.zone \
193 src/network-radvd-config \
194 src/dhclient-helper \
195 src/header-config \
196 src/header-port \
197 src/header-zone \
198 src/ppp/dialer \
199 src/ppp/pppoe-server
200
201dist_helpers_SCRIPTS = \
5ca9dc30
MT
202 src/helpers/dhcpd-config-helper \
203 src/helpers/firewall-kernel-init \
204 src/helpers/hostapd-config-helper \
67baa452 205 src/helpers/ipsec-updown \
5ca9dc30 206 src/helpers/pppd-angel \
02807ad2 207 src/helpers/wpa_supplicant
5ca9dc30 208
13a6e69f
MT
209bin_PROGRAMS = \
210 src/inetcalc
211
212src_inetcalc_SOURCES = \
213 src/inetcalc.c
214
01f2b2e4
MT
215src_inetcalc_LDADD = \
216 src/libnetwork.la
217
7d2cb6d3 218dist_hooks_configs_SCRIPTS = \
9353a4e4 219 src/hooks/configs/dhcp \
b73e9d43 220 src/hooks/configs/ipv6-auto \
46a28dcd
MT
221 src/hooks/configs/pppoe-server \
222 src/hooks/configs/static
7d2cb6d3 223
5ca9dc30 224dist_hooks_ports_SCRIPTS = \
5ca9dc30
MT
225 src/hooks/ports/bonding \
226 src/hooks/ports/dummy \
227 src/hooks/ports/ethernet \
5ca9dc30 228 src/hooks/ports/vlan \
727248f0
MT
229 src/hooks/ports/wireless-ap \
230 src/hooks/ports/wireless-mesh
5ca9dc30
MT
231
232dist_hooks_zones_SCRIPTS = \
5ca9dc30 233 src/hooks/zones/6to4-tunnel \
5ca9dc30 234 src/hooks/zones/bridge \
5ca9dc30
MT
235 src/hooks/zones/modem \
236 src/hooks/zones/pppoe \
5ca9dc30
MT
237 src/hooks/zones/wireless
238
f166708b
MT
239INSTALL_DIRS += \
240 $(configdir) \
241 $(configdir)/ports \
242 $(configdir)/vpn \
243 $(configdir)/vpn/ipsec/connections \
244 $(configdir)/vpn/security-policies \
245 $(configdir)/wireless \
246 $(configdir)/wireless/networks \
247 $(configdir)/zones
248
5ca9dc30
MT
249# ------------------------------------------------------------------------------
250
01f2b2e4
MT
251LIBNETWORK_CURRENT=0
252LIBNETWORK_REVISION=0
253LIBNETWORK_AGE=0
254
255pkginclude_HEADERS = \
248629ae 256 src/libnetwork/network/interface.h \
6f4814db 257 src/libnetwork/network/libnetwork.h \
9cb2f0c0
MT
258 src/libnetwork/network/logging.h \
259 src/libnetwork/network/phy.h
01f2b2e4
MT
260
261lib_LTLIBRARIES = \
262 src/libnetwork.la
263
264src_libnetwork_la_SOURCES = \
248629ae 265 src/libnetwork/interface.c \
01f2b2e4 266 src/libnetwork/libnetwork-private.h \
9cb2f0c0
MT
267 src/libnetwork/libnetwork.c \
268 src/libnetwork/phy.c
01f2b2e4 269
db0a2d76
MT
270src_libnetwork_la_LIBADD = \
271 $(LIBNL_LIBS)
272
6f4814db
MT
273src_libnetwork_la_CPPFLAGS = \
274 $(AM_CPPFLAGS) \
db0a2d76 275 $(LIBNL_CPPFLAGS) \
6f4814db
MT
276 -D_GNU_SOURCE \
277 -DNETWORK_PRIVATE
278
db0a2d76
MT
279src_libnetwork_la_CFLAGS = \
280 $(AM_CFLAGS) \
281 $(LIBNL_CFLAGS)
282
01f2b2e4
MT
283src_libnetwork_la_LDFLAGS = \
284 $(AM_LDFLAGS) \
285 -version-info $(LIBNETWORK_CURRENT):$(LIBNETWORK_REVISION):$(LIBNETWORK_AGE) \
286 -Wl,--version-script=$(top_srcdir)/src/libnetwork/libnetwork.sym
287
288src_libnetwork_la_DEPENDENCIES = \
289 src/libnetwork/libnetwork.sym
290
291EXTRA_DIST += \
292 src/libnetwork/libnetwork.sym
293
294# ------------------------------------------------------------------------------
e145b2f3
MT
295
296util_PROGRAMS = \
297 src/utils/network-phy-list-ht-caps
298
299src_utils_network_phy_list_ht_caps_SOURCES = \
300 src/utils/network-phy-list-ht-caps.c
301
302src_utils_network_phy_list_ht_caps_LDADD = \
303 src/libnetwork.la
304
305# ------------------------------------------------------------------------------
01f2b2e4 306
5ca9dc30
MT
307ppp_SCRIPTS = \
308 src/ppp/ip-updown
309
310CLEANFILES += \
311 src/ppp/ip-updown
312
313EXTRA_DIST += \
314 src/ppp/ip-updown.in
315
316INSTALL_DIRS += \
9c9d0585
SS
317 $(pppdir) \
318 $(logdir)
5ca9dc30
MT
319
320ppp-install-hook:
321 ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-pre-up
322 ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-up
323 ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-down
324 ln -svf ip-updown $(DESTDIR)$(pppdir)/ipv6-up
325 ln -svf ip-updown $(DESTDIR)$(pppdir)/ipv6-down
326
327ppp-uninstall-hook:
328 rm -f $(DESTDIR)$(pppdir)/ip-{down,pre-up,up}
329 rm -f $(DESTDIR)$(pppdir)/ipv6-{down,up}
330
331INSTALL_EXEC_HOOKS += ppp-install-hook
332UNINSTALL_EXEC_HOOKS += ppp-uninstall-hook
333
334# ------------------------------------------------------------------------------
335
336if HAVE_SYSTEMD
337systemdsystemunit_DATA = \
338 src/systemd/firewall4.service \
339 src/systemd/firewall6.service \
340 src/systemd/firewall-init.service \
341 src/systemd/network-init.service \
342 src/systemd/network@.service
343
344CLEANFILES += \
345 $(systemdsystemunit_DATA)
346
347INSTALL_DIRS += \
348 $(systemdsystemunitdir)
349endif
350
351EXTRA_DIST += \
352 src/systemd/firewall4.service.in \
353 src/systemd/firewall6.service.in \
354 src/systemd/firewall-init.service.in \
355 src/systemd/network-init.service.in \
356 src/systemd/network@.service.in
357
358# ------------------------------------------------------------------------------
359
5e84cd41
MT
360systemconfig_vpndir = $(systemconfigdir)/vpn
361
362dist_systemconfig_vpn_security_policies_DATA = \
56d5efa7 363 config/vpn/security-policies/performance \
5e84cd41
MT
364 config/vpn/security-policies/system
365
366systemconfig_vpn_security_policiesdir = $(systemconfig_vpndir)/security-policies
367
368# ------------------------------------------------------------------------------
369
5ca9dc30
MT
370dist_sysctl_DATA = \
371 src/sysctl/network.conf
372
373# ------------------------------------------------------------------------------
374
bae37360
MT
375dist_bashcompletion_SCRIPTS = \
376 src/bash-completion/network
377
378# ------------------------------------------------------------------------------
379
5ca9dc30 380dist_tmpfiles_DATA = \
f9dac5a0 381 src/tmpfiles/network.conf
5ca9dc30
MT
382
383# ------------------------------------------------------------------------------
384
385if HAVE_UDEV
386dist_udev_SCRIPTS = \
387 src/udev/network-hotplug \
388 src/udev/network-hotplug-rename \
389 src/udev/network-hotplug-serial
390
391dist_udevrules_DATA = \
392 src/udev/rules.d/50-serial-whitelist.rules \
393 src/udev/rules.d/60-net.rules
394
395INSTALL_DIRS += \
396 $(udevdir) \
397 $(udevrulesdir)
398endif
399
400# ------------------------------------------------------------------------------
401
01f2b2e4 402pkgconfig_DATA = \
5ca9dc30
MT
403 src/network.pc
404
405CLEANFILES += \
01f2b2e4 406 $(pkgconfig_DATA)
5ca9dc30
MT
407
408EXTRA_DIST += \
409 src/network.pc.in
410
411# ------------------------------------------------------------------------------
412
413dist_macros_DATA = \
414 src/macros/DHCP \
415 src/macros/HTTP \
416 src/macros/HTTPS \
417 src/macros/WWW
418
419# ------------------------------------------------------------------------------
420
ec3fe5b7 421INSTALL_DIRS += \
de3cecef
MT
422 $(triggersdir)
423
424# ------------------------------------------------------------------------------
425
5ca9dc30 426MANPAGES = \
2b0ff832 427 man/firewall-settings.8 \
5ca9dc30 428 man/network.8 \
89c81bcf 429 man/network-color.8 \
6135a5b3 430 man/network-description.8 \
5ca9dc30 431 man/network-device.8 \
427f5ae2 432 man/network-dhcp.8 \
5ca9dc30 433 man/network-dns-server.8 \
de72bd91 434 man/network-performance-tuning.8 \
7a302fa7 435 man/network-port.8 \
94eab754 436 man/network-quick-start.8 \
5ca9dc30 437 man/network-route.8 \
e023191b 438 man/network-route-static.8 \
2b0ff832 439 man/network-settings.8 \
bec94f95
MT
440 man/network-vpn.8 \
441 man/network-vpn-security-policies.8 \
5ca9dc30 442 man/network-zone.8 \
5ca9dc30 443 man/network-zone-6to4-tunnel.8 \
5ca9dc30
MT
444 man/network-zone-bridge.8 \
445 man/network-zone-config-pppoe-server.8 \
7a302fa7 446 man/network-zone-modem.8 \
2fb7ae4d
MT
447 man/network-zone-pppoe.8 \
448 man/network-zone-wireless.8
5ca9dc30
MT
449
450MANPAGES_XML = $(patsubst %.8,%.xml,$(MANPAGES))
451MANPAGES_HTML = $(patsubst %.xml,%.html,$(MANPAGES_XML))
452
453.PHONY: man
454man: $(MANPAGES) $(MANPAGES_HTML)
455
456man_MANS = \
457 $(MANPAGES)
458
459noinst_DATA += \
460 $(MANPAGES_HTML)
461
462CLEANFILES += \
463 $(man_MANS) \
464 $(MANPAGES_HTML)
465
466EXTRA_DIST += \
467 $(MANPAGES_XML) \
468 man/custom-html.xsl
469
470XSLTPROC_FLAGS = \
471 --nonet \
472 --stringparam man.output.quietly 1 \
473 --stringparam funcsynopsis.style ansi \
474 --stringparam man.th.extra1.suppress 1 \
475 --stringparam man.authors.section.enabled 1 \
476 --stringparam man.copyright.section.enabled 1
477
478XSLTPROC_COMMAND_MAN = \
479 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
480 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
481
482XSLTPROC_COMMAND_HTML = \
483 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
484
485man/%.8: man/%.xml
486 $(XSLTPROC_COMMAND_MAN)
487
488man/%.html: man/%.xml man/custom-html.xsl
489 $(XSLTPROC_COMMAND_HTML)
490
491# ------------------------------------------------------------------------------
492
493substitutions = \
494 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
495 '|PACKAGE_URL=$(PACKAGE_URL)|' \
496 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
a35f416c 497 '|builddir=$(abs_builddir)|' \
5ca9dc30
MT
498 '|prefix=$(prefix)|' \
499 '|exec_prefix=$(exec_prefix)|' \
500 '|sbindir=$(sbindir)|' \
c6525a63 501 '|networkdir=$(networkdir)|' \
96275aa1 502 '|helpersdir=$(helpersdir)|' \
c4966dd6
MT
503 '|utildir=$(utildir)|' \
504 '|VIRTUAL_ENVIRONMENT_IMAGES_DIR=$(VIRTUAL_ENVIRONMENT_IMAGES_DIR)|'
5ca9dc30
MT
505
506SED_PROCESS = \
507 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
508 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
509 < $< > $@
510
3431f712 511%: %.in Makefile
5ca9dc30
MT
512 $(SED_PROCESS)
513
514INSTALL_DIRS += \
515 $(sbindir)
516
517install-exec-hook: $(INSTALL_EXEC_HOOKS)
518
519uninstall-hook: $(UNINSTALL_EXEC_HOOKS)
520
521# - testsuite ------------------------------------------------------------------
522
523TESTS_ENVIRONMENT = \
071d3416 524 LD_LIBRARY_PATH=$(top_builddir)/src/.libs:$(LD_LIBRARY_PATH) \
8744a476
MT
525 PATH=$(top_builddir)/src:$(PATH) \
526 functions=$(abs_builddir)/src/functions/functions \
527 networkdir=$(abs_srcdir)/src/functions \
528 testdir=$(top_srcdir)/test
529
530dist_check_DATA = \
ee86c73f
MT
531 test/constants.sh \
532 test/test-functions
5ca9dc30
MT
533
534dist_check_SCRIPTS = \
8744a476 535 $(TESTS)
5ca9dc30
MT
536
537TESTS = \
bb8304ec 538 test/load-library \
bb8304ec 539 test/functions/ip/ip_detect_protocol \
bb8304ec 540 test/functions/ip/ip_get_prefix \
8b0958b2 541 test/functions/ip/ip_net_is_valid \
b7fd8067 542 test/functions/ip/ip_is_valid \
b862734c 543 test/functions/ip/ip_network_is_subnet_of \
b7fd8067
MT
544 test/functions/ip/ip_prefix_is_valid \
545 test/functions/ip/ip_protocol_is_supported \
546 test/functions/ip/ip_split_prefix
1908d2b3
MT
547
548# - NITSI tests ----------------------------------------------------------------
549
232d01c8 550# Files for the virtual environment
c4966dd6 551VIRTUAL_ENVIRONMENT_FILES = \
232d01c8
MT
552 test/nitsi/virtual-environment/basic/machines/alice/machine.xml \
553 test/nitsi/virtual-environment/basic/machines/alice/snapshot.xml \
554 test/nitsi/virtual-environment/basic/machines/bob/machine.xml \
555 test/nitsi/virtual-environment/basic/machines/bob/snapshot.xml \
556 test/nitsi/virtual-environment/basic/network/network1/network.xml \
557 test/nitsi/virtual-environment/basic/network/network2/network.xml \
558 test/nitsi/virtual-environment/basic/network/network3/network.xml \
559 test/nitsi/virtual-environment/basic/network/network4/network.xml \
232d01c8
MT
560 test/nitsi/virtual-environment/basic/settings
561
c4966dd6
MT
562EXTRA_DIST += \
563 test/nitsi/virtual-environment/basic/machines/alice/machine.xml.in \
564 test/nitsi/virtual-environment/basic/machines/alice/snapshot.xml.in \
565 test/nitsi/virtual-environment/basic/machines/bob/machine.xml.in \
43d82e80
JS
566 test/nitsi/virtual-environment/basic/machines/bob/snapshot.xml.in \
567 test/nitsi/virtual-environment/basic/settings.in
c4966dd6
MT
568
569CLEANFILES += \
570 test/nitsi/virtual-environment/basic/machines/alice/machine.xml \
571 test/nitsi/virtual-environment/basic/machines/alice/snapshot.xml \
572 test/nitsi/virtual-environment/basic/machines/bob/machine.xml \
43d82e80
JS
573 test/nitsi/virtual-environment/basic/machines/bob/snapshot.xml \
574 test/nitsi/virtual-environment/basic/settings
c4966dd6
MT
575
576# Virtual Machine Images
577VIRTUAL_ENVIRONMENT_IMAGES = \
578 $(VIRTUAL_ENVIRONMENT_IMAGES_DIR)/ipfire-alice-2.qcow2 \
579 $(VIRTUAL_ENVIRONMENT_IMAGES_DIR)/ipfire-bob.qcow2
580
581DISTCLEANFILES += \
582 $(VIRTUAL_ENVIRONMENT_IMAGES)
583
584VIRTUAL_ENVIRONMENT_IMAGES_DIR = $(abs_builddir)/test/nitsi/virtual-environment/.images
585VIRTUAL_ENVIRONMENT_IMAGES_DOWNLOAD_URL = \
586 https://people.ipfire.org/~jschlag/nitsi-ipfire/virtual-environment/basic/
587
1908d2b3 588NITSI_TESTS = \
a35f416c
MT
589 test/nitsi/test/hello-world \
590 test/nitsi/test/make-check
1908d2b3
MT
591
592EXTRA_DIST += \
593 test/nitsi/test/hello-world/recipe \
a35f416c
MT
594 test/nitsi/test/hello-world/settings \
595 test/nitsi/test/make-check/recipe.in \
596 test/nitsi/test/make-check/settings.in
597
598CLEANFILES += \
599 test/nitsi/test/make-check/recipe \
600 test/nitsi/test/make-check/settings
1908d2b3
MT
601
602NITSI_ENVIRONMENT =
603
604.PHONY: $(NITSI_TESTS)
c4966dd6 605$(NITSI_TESTS): % : %/recipe %/settings $(VIRTUAL_ENVIRONMENT_FILES) $(VIRTUAL_ENVIRONMENT_IMAGES)
449ae5ce 606 $(AM_V_NITSI) $(NITSI_ENVIRONMENT) $(NITSI) --log-level error run-test -d $@
1908d2b3
MT
607
608.PHONY: nitsi
a35f416c 609nitsi: dist $(NITSI_TESTS)
c4966dd6
MT
610
611# Downloads a virtual image file and extracts it
612$(VIRTUAL_ENVIRONMENT_IMAGES):
613 $(AM_V_DOWNLOAD)$(MKDIR_P) $(dir $@) && \
614 $(WGET) -qO - $(VIRTUAL_ENVIRONMENT_IMAGES_DOWNLOAD_URL)/$(notdir $@).xz | xz -qd > $@