From 2768748b88f4133d10835255845e64a4e1e365e6 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Wed, 15 Apr 2020 10:45:08 +0200 Subject: [PATCH] build: use VPATH for vtysh_scan No need to put $(top_srcdir) everywhere. Signed-off-by: David Lamparter --- babeld/subdir.am | 6 +++--- bfdd/subdir.am | 4 ++-- bgpd/subdir.am | 34 +++++++++++++++++----------------- eigrpd/subdir.am | 8 ++++---- isisd/subdir.am | 12 ++++++------ ldpd/subdir.am | 2 +- lib/subdir.am | 26 +++++++++++++------------- nhrpd/subdir.am | 2 +- ospf6d/subdir.am | 30 +++++++++++++++--------------- ospfd/subdir.am | 16 ++++++++-------- pbrd/subdir.am | 4 ++-- pimd/subdir.am | 2 +- ripd/subdir.am | 6 +++--- ripngd/subdir.am | 6 +++--- sharpd/subdir.am | 2 +- staticd/subdir.am | 2 +- vrrpd/subdir.am | 2 +- vtysh/extract.pl.in | 4 ++-- vtysh/subdir.am | 4 ++-- watchfrr/subdir.am | 2 +- zebra/subdir.am | 28 ++++++++++++++-------------- 21 files changed, 101 insertions(+), 101 deletions(-) diff --git a/babeld/subdir.am b/babeld/subdir.am index dd46675f22..7827e7dc58 100644 --- a/babeld/subdir.am +++ b/babeld/subdir.am @@ -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 diff --git a/bfdd/subdir.am b/bfdd/subdir.am index 254329e221..e12ae37195 100644 --- a/bfdd/subdir.am +++ b/bfdd/subdir.am @@ -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 diff --git a/bgpd/subdir.am b/bgpd/subdir.am index ff15248a98..27473af8ab 100644 --- a/bgpd/subdir.am +++ b/bgpd/subdir.am @@ -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 diff --git a/eigrpd/subdir.am b/eigrpd/subdir.am index e59c88b471..bf900912ef 100644 --- a/eigrpd/subdir.am +++ b/eigrpd/subdir.am @@ -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 diff --git a/isisd/subdir.am b/isisd/subdir.am index 5dddb7d345..2b78d6f763 100644 --- a/isisd/subdir.am +++ b/isisd/subdir.am @@ -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 diff --git a/ldpd/subdir.am b/ldpd/subdir.am index f464bad9e7..0960774caa 100644 --- a/ldpd/subdir.am +++ b/ldpd/subdir.am @@ -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 diff --git a/lib/subdir.am b/lib/subdir.am index f3f709fd24..5adbd42c48 100644 --- a/lib/subdir.am +++ b/lib/subdir.am @@ -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) diff --git a/nhrpd/subdir.am b/nhrpd/subdir.am index 42a6380b17..8cfc25b7bd 100644 --- a/nhrpd/subdir.am +++ b/nhrpd/subdir.am @@ -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 diff --git a/ospf6d/subdir.am b/ospf6d/subdir.am index 570b077cb1..9bb6838310 100644 --- a/ospf6d/subdir.am +++ b/ospf6d/subdir.am @@ -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 diff --git a/ospfd/subdir.am b/ospfd/subdir.am index 6de4099c5b..119945735a 100644 --- a/ospfd/subdir.am +++ b/ospfd/subdir.am @@ -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 diff --git a/pbrd/subdir.am b/pbrd/subdir.am index c55f0b41cc..45001de2c7 100644 --- a/pbrd/subdir.am +++ b/pbrd/subdir.am @@ -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 diff --git a/pimd/subdir.am b/pimd/subdir.am index 0e30590079..cbb657dc30 100644 --- a/pimd/subdir.am +++ b/pimd/subdir.am @@ -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 diff --git a/ripd/subdir.am b/ripd/subdir.am index 00984672ed..0a653412b5 100644 --- a/ripd/subdir.am +++ b/ripd/subdir.am @@ -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 diff --git a/ripngd/subdir.am b/ripngd/subdir.am index 4e219c9947..b0b06731cf 100644 --- a/ripngd/subdir.am +++ b/ripngd/subdir.am @@ -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 diff --git a/sharpd/subdir.am b/sharpd/subdir.am index 8b32b2370c..b0280e2a0e 100644 --- a/sharpd/subdir.am +++ b/sharpd/subdir.am @@ -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 diff --git a/staticd/subdir.am b/staticd/subdir.am index 30c69231c9..b5461191ab 100644 --- a/staticd/subdir.am +++ b/staticd/subdir.am @@ -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 diff --git a/vrrpd/subdir.am b/vrrpd/subdir.am index 07358e0383..5052b5c291 100644 --- a/vrrpd/subdir.am +++ b/vrrpd/subdir.am @@ -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 diff --git a/vtysh/extract.pl.in b/vtysh/extract.pl.in index c4f293fd3b..d5142b1b55 100755 --- a/vtysh/extract.pl.in +++ b/vtysh/extract.pl.in @@ -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. diff --git a/vtysh/subdir.am b/vtysh/subdir.am index 74595788b0..3e9b8a3dc9 100644 --- a/vtysh/subdir.am +++ b/vtysh/subdir.am @@ -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 diff --git a/watchfrr/subdir.am b/watchfrr/subdir.am index 36af57cf82..6dceedf82a 100644 --- a/watchfrr/subdir.am +++ b/watchfrr/subdir.am @@ -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 diff --git a/zebra/subdir.am b/zebra/subdir.am index aafb4abb01..bb1aed0346 100644 --- a/zebra/subdir.am +++ b/zebra/subdir.am @@ -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 -- 2.39.5