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