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