From 2e4c22961689fb7ddb973cac9c5cf930d5b7d85f Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Mon, 4 Dec 2017 19:32:20 -0200 Subject: [PATCH] *: make clippy usage more consistent Fixes #1511. Signed-off-by: Renato Westphal --- bgpd/bgp_rpki.c | 4 +++- bgpd/bgp_vty.c | 2 +- doc/cli.md | 2 +- ldpd/subdir.am | 1 + lib/plist.c | 2 +- ospfd/ospf_vty.c | 2 +- sharpd/sharp_vty.c | 2 ++ 7 files changed, 10 insertions(+), 5 deletions(-) diff --git a/bgpd/bgp_rpki.c b/bgpd/bgp_rpki.c index 1a42478513..19d4769cd3 100644 --- a/bgpd/bgp_rpki.c +++ b/bgpd/bgp_rpki.c @@ -52,7 +52,9 @@ #include "libfrr.h" #include "version.h" -#include "bgp_rpki_clippy.c" +#ifndef VTYSH_EXTRACT_PL +#include "bgpd/bgp_rpki_clippy.c" +#endif DEFINE_MTYPE_STATIC(BGPD, BGP_RPKI_CACHE, "BGP RPKI Cache server") DEFINE_MTYPE_STATIC(BGPD, BGP_RPKI_CACHE_GROUP, "BGP RPKI Cache server group") diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index a673810738..5515643ed1 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -721,7 +721,7 @@ static void bgp_clear_star_soft_out(struct vty *vty, const char *name) #ifndef VTYSH_EXTRACT_PL -#include "bgp_vty_clippy.c" +#include "bgpd/bgp_vty_clippy.c" #endif /* BGP global configuration. */ diff --git a/doc/cli.md b/doc/cli.md index 253617e9b5..723237ebb8 100644 --- a/doc/cli.md +++ b/doc/cli.md @@ -210,7 +210,7 @@ all DEFPY statements**: ... -#include "filename_clippy.c" +#include "daemon/filename_clippy.c" DEFPY(...) DEFPY(...) diff --git a/ldpd/subdir.am b/ldpd/subdir.am index db71cee618..2d87be0cda 100644 --- a/ldpd/subdir.am +++ b/ldpd/subdir.am @@ -38,6 +38,7 @@ ldpd_libldp_a_SOURCES = \ ldpd/util.c \ # end +ldpd/ldp_vty_cmds_clippy.c: $(CLIPPY_DEPS) ldpd/ldp_vty_cmds.$(OBJEXT): ldpd/ldp_vty_cmds_clippy.c noinst_HEADERS += \ diff --git a/lib/plist.c b/lib/plist.c index 3c491d6a3b..a95749cf0e 100644 --- a/lib/plist.c +++ b/lib/plist.c @@ -1321,7 +1321,7 @@ static int vty_clear_prefix_list(struct vty *vty, afi_t afi, const char *name, } #ifndef VTYSH_EXTRACT_PL -#include "plist_clippy.c" +#include "lib/plist_clippy.c" #endif DEFPY (ip_prefix_list, diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index f1848f1eaf..3a66481132 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -187,7 +187,7 @@ static void ospf_show_vrf_name(struct ospf *ospf, struct vty *vty, } #ifndef VTYSH_EXTRACT_PL -#include "ospf_vty_clippy.c" +#include "ospfd/ospf_vty_clippy.c" #endif DEFUN_NOSH (router_ospf, diff --git a/sharpd/sharp_vty.c b/sharpd/sharp_vty.c index 47bb37ce92..a35157faa1 100644 --- a/sharpd/sharp_vty.c +++ b/sharpd/sharp_vty.c @@ -29,7 +29,9 @@ #include "sharpd/sharp_zebra.h" #include "sharpd/sharp_vty.h" +#ifndef VTYSH_EXTRACT_PL #include "sharpd/sharp_vty_clippy.c" +#endif extern uint32_t total_routes; extern uint32_t installed_routes; -- 2.39.5