build: use VPATH for vtysh_scan

No need to put $(top_srcdir) everywhere.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
David Lamparter 2020-04-15 10:45:08 +02:00
parent 98dc08cdda
commit 2768748b88
21 changed files with 101 additions and 101 deletions

View file

@ -7,9 +7,9 @@ noinst_LIBRARIES += babeld/libbabel.a
sbin_PROGRAMS += babeld/babeld
dist_examples_DATA += babeld/babeld.conf.sample
vtysh_scan += \
$(top_srcdir)/babeld/babel_interface.c \
$(top_srcdir)/babeld/babel_zebra.c \
$(top_srcdir)/babeld/babeld.c \
babeld/babel_interface.c \
babeld/babel_zebra.c \
babeld/babeld.c \
# end
endif

View file

@ -6,8 +6,8 @@ if BFDD
noinst_LIBRARIES += bfdd/libbfd.a
sbin_PROGRAMS += bfdd/bfdd
dist_examples_DATA += bfdd/bfdd.conf.sample
vtysh_scan += $(top_srcdir)/bfdd/bfdd_vty.c
vtysh_scan += $(top_srcdir)/bfdd/bfdd_cli.c
vtysh_scan += bfdd/bfdd_vty.c
vtysh_scan += bfdd/bfdd_cli.c
man8 += $(MANBUILD)/frr-bfdd.8
endif

View file

@ -12,29 +12,29 @@ dist_examples_DATA += \
bgpd/bgpd.conf.vnc.sample \
# end
vtysh_scan += \
$(top_srcdir)/bgpd/bgp_bfd.c \
$(top_srcdir)/bgpd/bgp_debug.c \
$(top_srcdir)/bgpd/bgp_dump.c \
$(top_srcdir)/bgpd/bgp_evpn_vty.c \
$(top_srcdir)/bgpd/bgp_filter.c \
$(top_srcdir)/bgpd/bgp_mplsvpn.c \
$(top_srcdir)/bgpd/bgp_nexthop.c \
$(top_srcdir)/bgpd/bgp_route.c \
$(top_srcdir)/bgpd/bgp_routemap.c \
$(top_srcdir)/bgpd/bgp_vty.c \
$(top_srcdir)/bgpd/bgp_flowspec_vty.c \
bgpd/bgp_bfd.c \
bgpd/bgp_debug.c \
bgpd/bgp_dump.c \
bgpd/bgp_evpn_vty.c \
bgpd/bgp_filter.c \
bgpd/bgp_mplsvpn.c \
bgpd/bgp_nexthop.c \
bgpd/bgp_route.c \
bgpd/bgp_routemap.c \
bgpd/bgp_vty.c \
bgpd/bgp_flowspec_vty.c \
# end
# can be loaded as DSO - always include for vtysh
vtysh_scan += $(top_srcdir)/bgpd/bgp_rpki.c
vtysh_scan += $(top_srcdir)/bgpd/bgp_bmp.c
vtysh_scan += bgpd/bgp_rpki.c
vtysh_scan += bgpd/bgp_bmp.c
if ENABLE_BGP_VNC
vtysh_scan += \
$(top_srcdir)/bgpd/rfapi/bgp_rfapi_cfg.c \
$(top_srcdir)/bgpd/rfapi/rfapi.c \
$(top_srcdir)/bgpd/rfapi/rfapi_vty.c \
$(top_srcdir)/bgpd/rfapi/vnc_debug.c \
bgpd/rfapi/bgp_rfapi_cfg.c \
bgpd/rfapi/rfapi.c \
bgpd/rfapi/rfapi_vty.c \
bgpd/rfapi/vnc_debug.c \
# end
endif
if SNMP

View file

@ -7,11 +7,11 @@ noinst_LIBRARIES += eigrpd/libeigrp.a
sbin_PROGRAMS += eigrpd/eigrpd
dist_examples_DATA += eigrpd/eigrpd.conf.sample
vtysh_scan += \
$(top_srcdir)/eigrpd/eigrp_cli.c \
$(top_srcdir)/eigrpd/eigrp_dump.c \
$(top_srcdir)/eigrpd/eigrp_vty.c \
eigrpd/eigrp_cli.c \
eigrpd/eigrp_dump.c \
eigrpd/eigrp_vty.c \
# end
# $(top_srcdir)/eigrpd/eigrp_routemap.c
# eigrpd/eigrp_routemap.c
man8 += $(MANBUILD)/frr-eigrpd.8
endif

View file

@ -7,12 +7,12 @@ noinst_LIBRARIES += isisd/libisis.a
sbin_PROGRAMS += isisd/isisd
dist_examples_DATA += isisd/isisd.conf.sample
vtysh_scan += \
$(top_srcdir)/isisd/isis_cli.c \
$(top_srcdir)/isisd/isis_redist.c \
$(top_srcdir)/isisd/isis_spf.c \
$(top_srcdir)/isisd/isis_te.c \
$(top_srcdir)/isisd/isis_vty_fabricd.c \
$(top_srcdir)/isisd/isisd.c \
isisd/isis_cli.c \
isisd/isis_redist.c \
isisd/isis_spf.c \
isisd/isis_te.c \
isisd/isis_vty_fabricd.c \
isisd/isisd.c \
# end
man8 += $(MANBUILD)/frr-isisd.8
endif

View file

@ -6,7 +6,7 @@ if LDPD
noinst_LIBRARIES += ldpd/libldp.a
sbin_PROGRAMS += ldpd/ldpd
dist_examples_DATA += ldpd/ldpd.conf.sample
vtysh_scan += $(top_srcdir)/ldpd/ldp_vty_cmds.c
vtysh_scan += ldpd/ldp_vty_cmds.c
man8 += $(MANBUILD)/frr-ldpd.8
endif

View file

@ -125,21 +125,21 @@ nodist_lib_libfrr_la_SOURCES = \
# end
vtysh_scan += \
$(top_srcdir)/lib/distribute.c \
$(top_srcdir)/lib/filter.c \
$(top_srcdir)/lib/if.c \
$(top_srcdir)/lib/if_rmap.c \
$(top_srcdir)/lib/keychain.c \
$(top_srcdir)/lib/lib_vty.c \
$(top_srcdir)/lib/nexthop_group.c \
$(top_srcdir)/lib/plist.c \
$(top_srcdir)/lib/routemap.c \
$(top_srcdir)/lib/routemap_cli.c \
$(top_srcdir)/lib/vrf.c \
$(top_srcdir)/lib/vty.c \
lib/distribute.c \
lib/filter.c \
lib/if.c \
lib/if_rmap.c \
lib/keychain.c \
lib/lib_vty.c \
lib/nexthop_group.c \
lib/plist.c \
lib/routemap.c \
lib/routemap_cli.c \
lib/vrf.c \
lib/vty.c \
# end
# can be loaded as DSO - always include for vtysh
vtysh_scan += $(top_srcdir)/lib/agentx.c
vtysh_scan += lib/agentx.c
if SQLITE3
lib_libfrr_la_LIBADD += $(SQLITE3_LIBS)

View file

@ -4,7 +4,7 @@
if NHRPD
sbin_PROGRAMS += nhrpd/nhrpd
vtysh_scan += $(top_srcdir)/nhrpd/nhrp_vty.c
vtysh_scan += nhrpd/nhrp_vty.c
man8 += $(MANBUILD)/frr-nhrpd.8
endif

View file

@ -7,21 +7,21 @@ noinst_LIBRARIES += ospf6d/libospf6.a
sbin_PROGRAMS += ospf6d/ospf6d
dist_examples_DATA += ospf6d/ospf6d.conf.sample
vtysh_scan += \
$(top_srcdir)/ospf6d/ospf6_abr.c \
$(top_srcdir)/ospf6d/ospf6_asbr.c \
$(top_srcdir)/ospf6d/ospf6_area.c \
$(top_srcdir)/ospf6d/ospf6_bfd.c \
$(top_srcdir)/ospf6d/ospf6_flood.c \
$(top_srcdir)/ospf6d/ospf6_interface.c \
$(top_srcdir)/ospf6d/ospf6_intra.c \
$(top_srcdir)/ospf6d/ospf6_lsa.c \
$(top_srcdir)/ospf6d/ospf6_message.c \
$(top_srcdir)/ospf6d/ospf6_neighbor.c \
$(top_srcdir)/ospf6d/ospf6_route.c \
$(top_srcdir)/ospf6d/ospf6_spf.c \
$(top_srcdir)/ospf6d/ospf6_top.c \
$(top_srcdir)/ospf6d/ospf6_zebra.c \
$(top_srcdir)/ospf6d/ospf6d.c \
ospf6d/ospf6_abr.c \
ospf6d/ospf6_asbr.c \
ospf6d/ospf6_area.c \
ospf6d/ospf6_bfd.c \
ospf6d/ospf6_flood.c \
ospf6d/ospf6_interface.c \
ospf6d/ospf6_intra.c \
ospf6d/ospf6_lsa.c \
ospf6d/ospf6_message.c \
ospf6d/ospf6_neighbor.c \
ospf6d/ospf6_route.c \
ospf6d/ospf6_spf.c \
ospf6d/ospf6_top.c \
ospf6d/ospf6_zebra.c \
ospf6d/ospf6d.c \
# end
if SNMP
module_LTLIBRARIES += ospf6d/ospf6d_snmp.la

View file

@ -7,14 +7,14 @@ noinst_LIBRARIES += ospfd/libfrrospf.a
sbin_PROGRAMS += ospfd/ospfd
dist_examples_DATA += ospfd/ospfd.conf.sample
vtysh_scan += \
$(top_srcdir)/ospfd/ospf_bfd.c \
$(top_srcdir)/ospfd/ospf_dump.c \
$(top_srcdir)/ospfd/ospf_opaque.c \
$(top_srcdir)/ospfd/ospf_ri.c \
$(top_srcdir)/ospfd/ospf_routemap.c \
$(top_srcdir)/ospfd/ospf_te.c \
$(top_srcdir)/ospfd/ospf_sr.c \
$(top_srcdir)/ospfd/ospf_vty.c \
ospfd/ospf_bfd.c \
ospfd/ospf_dump.c \
ospfd/ospf_opaque.c \
ospfd/ospf_ri.c \
ospfd/ospf_routemap.c \
ospfd/ospf_te.c \
ospfd/ospf_sr.c \
ospfd/ospf_vty.c \
# end
if SNMP
module_LTLIBRARIES += ospfd/ospfd_snmp.la

View file

@ -7,8 +7,8 @@ noinst_LIBRARIES += pbrd/libpbr.a
sbin_PROGRAMS += pbrd/pbrd
dist_examples_DATA += pbrd/pbrd.conf.sample
vtysh_scan += \
$(top_srcdir)/pbrd/pbr_vty.c \
$(top_srcdir)/pbrd/pbr_debug.c \
pbrd/pbr_vty.c \
pbrd/pbr_debug.c \
# end
man8 += $(MANBUILD)/frr-pbrd.8
endif

View file

@ -8,7 +8,7 @@ sbin_PROGRAMS += pimd/pimd
bin_PROGRAMS += pimd/mtracebis
noinst_PROGRAMS += pimd/test_igmpv3_join
dist_examples_DATA += pimd/pimd.conf.sample
vtysh_scan += $(top_srcdir)/pimd/pim_cmd.c
vtysh_scan += pimd/pim_cmd.c
man8 += $(MANBUILD)/frr-pimd.8
man8 += $(MANBUILD)/mtracebis.8
endif

View file

@ -7,9 +7,9 @@ noinst_LIBRARIES += ripd/librip.a
sbin_PROGRAMS += ripd/ripd
dist_examples_DATA += ripd/ripd.conf.sample
vtysh_scan += \
$(top_srcdir)/ripd/rip_cli.c \
$(top_srcdir)/ripd/rip_debug.c \
$(top_srcdir)/ripd/ripd.c \
ripd/rip_cli.c \
ripd/rip_debug.c \
ripd/ripd.c \
# end
if SNMP

View file

@ -6,9 +6,9 @@ if RIPNGD
noinst_LIBRARIES += ripngd/libripng.a
sbin_PROGRAMS += ripngd/ripngd
vtysh_scan += \
$(top_srcdir)/ripngd/ripng_cli.c \
$(top_srcdir)/ripngd/ripng_debug.c \
$(top_srcdir)/ripngd/ripngd.c \
ripngd/ripng_cli.c \
ripngd/ripng_debug.c \
ripngd/ripngd.c \
# end
man8 += $(MANBUILD)/frr-ripngd.8
endif

View file

@ -6,7 +6,7 @@ if SHARPD
noinst_LIBRARIES += sharpd/libsharp.a
sbin_PROGRAMS += sharpd/sharpd
dist_examples_DATA += sharpd/sharpd.conf.sample
vtysh_scan += $(top_srcdir)/sharpd/sharp_vty.c
vtysh_scan += sharpd/sharp_vty.c
man8 += $(MANBUILD)/frr-sharpd.8
endif

View file

@ -6,7 +6,7 @@ if STATICD
noinst_LIBRARIES += staticd/libstatic.a
sbin_PROGRAMS += staticd/staticd
dist_examples_DATA += staticd/staticd.conf.sample
vtysh_scan += $(top_srcdir)/staticd/static_vty.c
vtysh_scan += staticd/static_vty.c
man8 += $(MANBUILD)/frr-staticd.8
endif

View file

@ -6,7 +6,7 @@ if VRRPD
noinst_LIBRARIES += vrrpd/libvrrp.a
sbin_PROGRAMS += vrrpd/vrrpd
# dist_examples_DATA += staticd/staticd.conf.sample
vtysh_scan += $(top_srcdir)/vrrpd/vrrp_vty.c
vtysh_scan += vrrpd/vrrp_vty.c
man8 += $(MANBUILD)/frr-vrrpd.8
endif

View file

@ -138,7 +138,7 @@ sub scan_file {
$protocol = "VTYSH_FABRICD";
}
else {
($protocol) = ($file =~ /^.*\/([a-z0-9]+)\/[a-zA-Z0-9_\-]+\.c$/);
($protocol) = ($file =~ /^(?:.*\/)?([a-z0-9]+)\/[a-zA-Z0-9_\-]+\.c$/);
$protocol = "VTYSH_" . uc $protocol;
}
@ -197,7 +197,7 @@ sub scan_file {
}
foreach (@ARGV) {
if (/\/isisd\//) {
if (/(^|\/)isisd\//) {
# We scan all the IS-IS files twice, once for isisd,
# once for fabricd. Exceptions are made for the files
# that are not shared between the two.

View file

@ -31,5 +31,5 @@ am__v_EXTRACT_ = $(am__v_EXTRACT_$(AM_DEFAULT_VERBOSITY))
am__v_EXTRACT_0 = @echo " EXTRACT " $@;
am__v_EXTRACT_1 =
vtysh/vtysh_cmd.c: $(vtysh_scan) vtysh/extract.pl
$(AM_V_EXTRACT) vtysh/extract.pl $(vtysh_scan) > vtysh/vtysh_cmd.c
vtysh/vtysh_cmd.c: vtysh/extract.pl $(vtysh_scan)
$(AM_V_EXTRACT) $^ > vtysh/vtysh_cmd.c

View file

@ -4,7 +4,7 @@
if WATCHFRR
sbin_PROGRAMS += watchfrr/watchfrr
vtysh_scan += $(top_srcdir)/watchfrr/watchfrr_vty.c
vtysh_scan += watchfrr/watchfrr_vty.c
man8 += $(MANBUILD)/frr-watchfrr.8
endif

View file

@ -6,23 +6,23 @@ if ZEBRA
sbin_PROGRAMS += zebra/zebra
dist_examples_DATA += zebra/zebra.conf.sample
vtysh_scan += \
$(top_srcdir)/zebra/debug.c \
$(top_srcdir)/zebra/interface.c \
$(top_srcdir)/zebra/router-id.c \
$(top_srcdir)/zebra/rtadv.c \
$(top_srcdir)/zebra/zebra_mlag_vty.c \
$(top_srcdir)/zebra/zebra_mpls_vty.c \
$(top_srcdir)/zebra/zebra_ptm.c \
$(top_srcdir)/zebra/zebra_pw.c \
$(top_srcdir)/zebra/zebra_routemap.c \
$(top_srcdir)/zebra/zebra_vty.c \
$(top_srcdir)/zebra/zserv.c \
$(top_srcdir)/zebra/zebra_gr.c \
zebra/debug.c \
zebra/interface.c \
zebra/router-id.c \
zebra/rtadv.c \
zebra/zebra_mlag_vty.c \
zebra/zebra_mpls_vty.c \
zebra/zebra_ptm.c \
zebra/zebra_pw.c \
zebra/zebra_routemap.c \
zebra/zebra_vty.c \
zebra/zserv.c \
zebra/zebra_gr.c \
# end
# can be loaded as DSO - always include for vtysh
vtysh_scan += $(top_srcdir)/zebra/irdp_interface.c
vtysh_scan += $(top_srcdir)/zebra/zebra_fpm.c
vtysh_scan += zebra/irdp_interface.c
vtysh_scan += zebra/zebra_fpm.c
if IRDP
module_LTLIBRARIES += zebra/zebra_irdp.la