mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-30 07:11:14 +00:00
vtysh: fix commands when building only isisd or fabricd
* add files to vtysh_scan when building only fabricd * don't add isisd/fabricd commands when daemon build is disabled Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
This commit is contained in:
parent
e84c83139c
commit
97fc5adacb
@ -23,6 +23,18 @@ if FABRICD
|
|||||||
noinst_LIBRARIES += isisd/libfabric.a
|
noinst_LIBRARIES += isisd/libfabric.a
|
||||||
sbin_PROGRAMS += isisd/fabricd
|
sbin_PROGRAMS += isisd/fabricd
|
||||||
dist_examples_DATA += isisd/fabricd.conf.sample
|
dist_examples_DATA += isisd/fabricd.conf.sample
|
||||||
|
if !ISISD
|
||||||
|
vtysh_scan += \
|
||||||
|
isisd/isis_cli.c \
|
||||||
|
isisd/isis_ldp_sync.c \
|
||||||
|
isisd/isis_redist.c \
|
||||||
|
isisd/isis_spf.c \
|
||||||
|
isisd/isis_te.c \
|
||||||
|
isisd/isis_sr.c \
|
||||||
|
isisd/isis_vty_fabricd.c \
|
||||||
|
isisd/isisd.c \
|
||||||
|
# end
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
noinst_HEADERS += \
|
noinst_HEADERS += \
|
||||||
|
@ -23,6 +23,8 @@
|
|||||||
## 02111-1307, USA.
|
## 02111-1307, USA.
|
||||||
##
|
##
|
||||||
|
|
||||||
|
use Getopt::Long;
|
||||||
|
|
||||||
print <<EOF;
|
print <<EOF;
|
||||||
#include <zebra.h>
|
#include <zebra.h>
|
||||||
|
|
||||||
@ -199,18 +201,31 @@ sub scan_file {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my $have_isisd = 0;
|
||||||
|
my $have_fabricd = 0;
|
||||||
|
|
||||||
|
GetOptions('have-isisd' => \$have_isisd, 'have-fabricd' => \$have_fabricd);
|
||||||
|
|
||||||
foreach (@ARGV) {
|
foreach (@ARGV) {
|
||||||
if (/(^|\/)isisd\//) {
|
if (/(^|\/)isisd\//) {
|
||||||
# We scan all the IS-IS files twice, once for isisd,
|
# We scan all the IS-IS files twice, once for isisd,
|
||||||
# once for fabricd. Exceptions are made for the files
|
# once for fabricd. Exceptions are made for the files
|
||||||
# that are not shared between the two.
|
# that are not shared between the two.
|
||||||
if (/isis_vty_isisd.c/) {
|
if (/isis_vty_isisd.c/) {
|
||||||
scan_file($_, 0);
|
if ( $have_isisd ) {
|
||||||
|
scan_file($_, 0);
|
||||||
|
}
|
||||||
} elsif (/isis_vty_fabricd.c/) {
|
} elsif (/isis_vty_fabricd.c/) {
|
||||||
scan_file($_, 1);
|
if ( $have_fabricd ) {
|
||||||
|
scan_file($_, 1);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
scan_file($_, 0);
|
if ( $have_isisd ) {
|
||||||
scan_file($_, 1);
|
scan_file($_, 0);
|
||||||
|
}
|
||||||
|
if ( $have_fabricd ) {
|
||||||
|
scan_file($_, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
scan_file($_, 0);
|
scan_file($_, 0);
|
||||||
|
@ -31,5 +31,17 @@ am__v_EXTRACT_ = $(am__v_EXTRACT_$(AM_DEFAULT_VERBOSITY))
|
|||||||
am__v_EXTRACT_0 = @echo " EXTRACT " $@;
|
am__v_EXTRACT_0 = @echo " EXTRACT " $@;
|
||||||
am__v_EXTRACT_1 =
|
am__v_EXTRACT_1 =
|
||||||
|
|
||||||
|
if ISISD
|
||||||
|
HAVE_ISISD = --have-isisd
|
||||||
|
else
|
||||||
|
HAVE_ISISD =
|
||||||
|
endif
|
||||||
|
|
||||||
|
if FABRICD
|
||||||
|
HAVE_FABRICD = --have-fabricd
|
||||||
|
else
|
||||||
|
HAVE_FABRICD =
|
||||||
|
endif
|
||||||
|
|
||||||
vtysh/vtysh_cmd.c: vtysh/extract.pl $(vtysh_scan)
|
vtysh/vtysh_cmd.c: vtysh/extract.pl $(vtysh_scan)
|
||||||
$(AM_V_EXTRACT) $^ > vtysh/vtysh_cmd.c
|
$(AM_V_EXTRACT) $^ $(HAVE_ISISD) $(HAVE_FABRICD) > vtysh/vtysh_cmd.c
|
||||||
|
Loading…
Reference in New Issue
Block a user