summaryrefslogtreecommitdiffstats
path: root/vtysh
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2020-04-15 10:45:08 +0200
committerDavid Lamparter <equinox@diac24.net>2020-04-27 09:30:01 +0200
commit2768748b88f4133d10835255845e64a4e1e365e6 (patch)
tree093a9bb724b40b5364e5704e55cb8078f1d46f71 /vtysh
parentMerge pull request #6249 from chiragshah6/yang_nb5 (diff)
downloadfrr-2768748b88f4133d10835255845e64a4e1e365e6.tar.xz
frr-2768748b88f4133d10835255845e64a4e1e365e6.zip
build: use VPATH for vtysh_scan
No need to put $(top_srcdir) everywhere. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'vtysh')
-rwxr-xr-xvtysh/extract.pl.in4
-rw-r--r--vtysh/subdir.am4
2 files changed, 4 insertions, 4 deletions
diff --git a/vtysh/extract.pl.in b/vtysh/extract.pl.in
index c4f293fd3..d5142b1b5 100755
--- a/vtysh/extract.pl.in
+++ b/vtysh/extract.pl.in
@@ -138,7 +138,7 @@ sub scan_file {
$protocol = "VTYSH_FABRICD";
}
else {
- ($protocol) = ($file =~ /^.*\/([a-z0-9]+)\/[a-zA-Z0-9_\-]+\.c$/);
+ ($protocol) = ($file =~ /^(?:.*\/)?([a-z0-9]+)\/[a-zA-Z0-9_\-]+\.c$/);
$protocol = "VTYSH_" . uc $protocol;
}
@@ -197,7 +197,7 @@ sub scan_file {
}
foreach (@ARGV) {
- if (/\/isisd\//) {
+ if (/(^|\/)isisd\//) {
# We scan all the IS-IS files twice, once for isisd,
# once for fabricd. Exceptions are made for the files
# that are not shared between the two.
diff --git a/vtysh/subdir.am b/vtysh/subdir.am
index 74595788b..3e9b8a3dc 100644
--- a/vtysh/subdir.am
+++ b/vtysh/subdir.am
@@ -31,5 +31,5 @@ am__v_EXTRACT_ = $(am__v_EXTRACT_$(AM_DEFAULT_VERBOSITY))
am__v_EXTRACT_0 = @echo " EXTRACT " $@;
am__v_EXTRACT_1 =
-vtysh/vtysh_cmd.c: $(vtysh_scan) vtysh/extract.pl
- $(AM_V_EXTRACT) vtysh/extract.pl $(vtysh_scan) > vtysh/vtysh_cmd.c
+vtysh/vtysh_cmd.c: vtysh/extract.pl $(vtysh_scan)
+ $(AM_V_EXTRACT) $^ > vtysh/vtysh_cmd.c