summaryrefslogtreecommitdiffstats
path: root/vtysh
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetwroks.com>2016-07-28 20:28:22 +0200
committerDonald Sharp <sharpd@cumulusnetwroks.com>2016-07-28 20:28:22 +0200
commit9994130f1d052b851bfffdd44d85e0a1c461a5cb (patch)
treea9ee634a576380b02655faf54232f2a336dabc35 /vtysh
parentlib: 'show commandtree' is not a CLI command (diff)
downloadfrr-9994130f1d052b851bfffdd44d85e0a1c461a5cb.tar.xz
frr-9994130f1d052b851bfffdd44d85e0a1c461a5cb.zip
vtysh: Do not run extract.pl over protocols that are not configured
Dynamically figure out the list of .c files that we need to scan based upon whether or not the daemon is --enabled via configure. Ticket: CM-12081 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'vtysh')
-rw-r--r--vtysh/Makefile.am35
1 files changed, 31 insertions, 4 deletions
diff --git a/vtysh/Makefile.am b/vtysh/Makefile.am
index 2180a7862..d4a74487e 100644
--- a/vtysh/Makefile.am
+++ b/vtysh/Makefile.am
@@ -20,10 +20,37 @@ dist_examples_DATA = vtysh.conf.sample
EXTRA_DIST = extract.pl
-vtysh_cmd_FILES = $(top_srcdir)/bgpd/*.c $(top_srcdir)/isisd/*.c \
- $(top_srcdir)/ospfd/*.c $(top_srcdir)/ospf6d/*.c \
- $(top_srcdir)/ripd/*.c $(top_srcdir)/ripngd/*.c \
- $(top_srcdir)/pimd/pim_cmd.c \
+vtysh_scan =
+
+if PIMD
+vtysh_scan += $(top_srcdir)/pimd/pim_cmd.c
+endif
+
+if BGPD
+vtysh_scan += $(top_srcdir)/bgpd/*.c
+endif
+
+if ISISD
+vtysh_scan += $(top_srcdir)/isisd/*.c
+endif
+
+if OSPFD
+vtysh_scan += $(top_srcdir)/ospfd/*.c
+endif
+
+if OSPF6D
+vtysh_scan += $(top_srcdir)/ospf6d/*.c
+endif
+
+if RIPD
+vtysh_scan += $(top_srcdir)/ripd/*.c
+endif
+
+if RIPNGD
+vtysh_scan += $(top_srcdir)/ripngd/*.c
+endif
+
+vtysh_cmd_FILES = $(vtysh_scan) \
$(top_srcdir)/lib/keychain.c $(top_srcdir)/lib/routemap.c \
$(top_srcdir)/lib/filter.c $(top_srcdir)/lib/plist.c \
$(top_srcdir)/lib/distribute.c $(top_srcdir)/lib/if_rmap.c \