diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2022-10-04 18:44:36 +0200 | 
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2022-10-26 17:12:34 +0100 | 
| commit | 89cb86aeb0262e17ee39c1d791effe9515bd0dc8 (patch) | |
| tree | a1643fa620a97ffdc2da9442abd7cff29d86e434 /watchfrr | |
| parent | 695f387ed872c1bc55ad4149ede95465b48697b9 (diff) | |
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 'watchfrr')
| -rw-r--r-- | watchfrr/subdir.am | 1 | ||||
| -rw-r--r-- | watchfrr/watchfrr_vty.c | 2 | 
2 files changed, 0 insertions, 3 deletions
diff --git a/watchfrr/subdir.am b/watchfrr/subdir.am index e899b895e7..04a4aaf166 100644 --- a/watchfrr/subdir.am +++ b/watchfrr/subdir.am @@ -4,7 +4,6 @@  if WATCHFRR  sbin_PROGRAMS += watchfrr/watchfrr -vtysh_scan += watchfrr/watchfrr_vty.c  man8 += $(MANBUILD)/frr-watchfrr.8  endif diff --git a/watchfrr/watchfrr_vty.c b/watchfrr/watchfrr_vty.c index e5cc437542..742b474eab 100644 --- a/watchfrr/watchfrr_vty.c +++ b/watchfrr/watchfrr_vty.c @@ -153,9 +153,7 @@ DEFUN_NOSH (show_logging,  	return CMD_SUCCESS;  } -#ifndef VTYSH_EXTRACT_PL  #include "watchfrr/watchfrr_vty_clippy.c" -#endif  DEFPY (watchfrr_ignore_daemon,         watchfrr_ignore_daemon_cmd,  | 
