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