summaryrefslogtreecommitdiffstats
path: root/bfdd
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2022-10-04 18:44:36 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2022-10-26 18:12:34 +0200
commit89cb86aeb0262e17ee39c1d791effe9515bd0dc8 (patch)
treea1643fa620a97ffdc2da9442abd7cff29d86e434 /bfdd
parentMerge pull request #11673 from cscarpitta/srv6-per-vrf-sid (diff)
downloadfrr-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 'bfdd')
-rw-r--r--bfdd/bfdd_cli.c2
-rw-r--r--bfdd/bfdd_vty.c2
-rw-r--r--bfdd/subdir.am2
3 files changed, 0 insertions, 6 deletions
diff --git a/bfdd/bfdd_cli.c b/bfdd/bfdd_cli.c
index 69424c45d..52f2dd8fd 100644
--- a/bfdd/bfdd_cli.c
+++ b/bfdd/bfdd_cli.c
@@ -26,9 +26,7 @@
#include "lib/log.h"
#include "lib/northbound_cli.h"
-#ifndef VTYSH_EXTRACT_PL
#include "bfdd/bfdd_cli_clippy.c"
-#endif /* VTYSH_EXTRACT_PL */
#include "bfd.h"
#include "bfdd_nb.h"
diff --git a/bfdd/bfdd_vty.c b/bfdd/bfdd_vty.c
index 4a2c5bf66..7b7a001e2 100644
--- a/bfdd/bfdd_vty.c
+++ b/bfdd/bfdd_vty.c
@@ -28,9 +28,7 @@
#include "bfd.h"
-#ifndef VTYSH_EXTRACT_PL
#include "bfdd/bfdd_vty_clippy.c"
-#endif
/*
* Commands help string definitions.
diff --git a/bfdd/subdir.am b/bfdd/subdir.am
index 8d35b933d..b86a18967 100644
--- a/bfdd/subdir.am
+++ b/bfdd/subdir.am
@@ -5,8 +5,6 @@
if BFDD
noinst_LIBRARIES += bfdd/libbfd.a
sbin_PROGRAMS += bfdd/bfdd
-vtysh_scan += bfdd/bfdd_vty.c
-vtysh_scan += bfdd/bfdd_cli.c
vtysh_daemons += bfdd
man8 += $(MANBUILD)/frr-bfdd.8
endif