diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2022-10-04 18:44:36 +0200 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2022-10-26 18:12:34 +0200 |
commit | 89cb86aeb0262e17ee39c1d791effe9515bd0dc8 (patch) | |
tree | a1643fa620a97ffdc2da9442abd7cff29d86e434 /ospfd | |
parent | Merge pull request #11673 from cscarpitta/srv6-per-vrf-sid (diff) | |
download | frr-89cb86aeb0262e17ee39c1d791effe9515bd0dc8.tar.xz frr-89cb86aeb0262e17ee39c1d791effe9515bd0dc8.zip |
build, vtysh: extract vtysh commands from .xref
Rather than running selected source files through the preprocessor and a
bunch of perl regex'ing to get the list of all DEFUNs, use the data
collected in frr.xref.
This not only eliminates issues we've been having with preprocessor
failures due to nonexistent header files, but is also much faster.
Where extract.pl would take 5s, this now finishes in 0.2s. And since
this is a non-parallelizable build step towards the end of the build
(dependent on a lot of other things being done already), the speedup is
actually noticeable.
Also files containing CLI no longer need to be listed in `vtysh_scan`
since the .xref data covers everything. `#ifndef VTYSH_EXTRACT_PL`
checks are equally obsolete.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'ospfd')
-rw-r--r-- | ospfd/ospf_dump.c | 2 | ||||
-rw-r--r-- | ospfd/ospf_gr.c | 2 | ||||
-rw-r--r-- | ospfd/ospf_ldp_sync.c | 2 | ||||
-rw-r--r-- | ospfd/ospf_vty.c | 2 | ||||
-rw-r--r-- | ospfd/subdir.am | 12 |
5 files changed, 0 insertions, 20 deletions
diff --git a/ospfd/ospf_dump.c b/ospfd/ospf_dump.c index 59f95c5da..a47ed8d67 100644 --- a/ospfd/ospf_dump.c +++ b/ospfd/ospf_dump.c @@ -42,9 +42,7 @@ #include "ospfd/ospf_dump.h" #include "ospfd/ospf_packet.h" #include "ospfd/ospf_network.h" -#ifndef VTYSH_EXTRACT_PL #include "ospfd/ospf_dump_clippy.c" -#endif /* Configuration debug option variables. */ unsigned long conf_debug_ospf_packet[5] = {0, 0, 0, 0, 0}; diff --git a/ospfd/ospf_gr.c b/ospfd/ospf_gr.c index 66ef1d656..6678d8c1f 100644 --- a/ospfd/ospf_gr.c +++ b/ospfd/ospf_gr.c @@ -44,9 +44,7 @@ #include "ospfd/ospf_gr.h" #include "ospfd/ospf_errors.h" #include "ospfd/ospf_dump.h" -#ifndef VTYSH_EXTRACT_PL #include "ospfd/ospf_gr_clippy.c" -#endif static void ospf_gr_nvm_delete(struct ospf *ospf); diff --git a/ospfd/ospf_ldp_sync.c b/ospfd/ospf_ldp_sync.c index 77e96f173..7b1fa6626 100644 --- a/ospfd/ospf_ldp_sync.c +++ b/ospfd/ospf_ldp_sync.c @@ -751,9 +751,7 @@ void ospf_ldp_sync_if_write_config(struct vty *vty, /* * LDP-SYNC commands. */ -#ifndef VTYSH_EXTRACT_PL #include "ospfd/ospf_ldp_sync_clippy.c" -#endif DEFPY (ospf_mpls_ldp_sync, ospf_mpls_ldp_sync_cmd, diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index 4f0fa6194..c8285f2e5 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -185,9 +185,7 @@ static void ospf_show_vrf_name(struct ospf *ospf, struct vty *vty, } } -#ifndef VTYSH_EXTRACT_PL #include "ospfd/ospf_vty_clippy.c" -#endif DEFUN_NOSH (router_ospf, router_ospf_cmd, diff --git a/ospfd/subdir.am b/ospfd/subdir.am index 78688fac9..b67f94288 100644 --- a/ospfd/subdir.am +++ b/ospfd/subdir.am @@ -5,18 +5,6 @@ if OSPFD noinst_LIBRARIES += ospfd/libfrrospf.a sbin_PROGRAMS += ospfd/ospfd -vtysh_scan += \ - ospfd/ospf_bfd.c \ - ospfd/ospf_dump.c \ - ospfd/ospf_gr.c \ - ospfd/ospf_ldp_sync.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 vtysh_daemons += ospfd if SNMP module_LTLIBRARIES += ospfd/ospfd_snmp.la |