2004-09-13 Paul Jakma <paul@dishone.st>

        * Makefile.am: extract.pl isnt in srcdir, it's always in the
          builddir.
        * extract.pl.in: match on end of filenames, filename could contain
          various preamble due to out of tree builds.
diff --git a/vtysh/extract.pl.in b/vtysh/extract.pl.in
index 6882b10..ae83a2e 100755
--- a/vtysh/extract.pl.in
+++ b/vtysh/extract.pl.in
@@ -117,7 +117,7 @@
               }
            }
         } else {
-           ($protocol) = ($file =~ /\/([a-z0-9]+)/);
+           ($protocol) = ($file =~ /^.*\/([a-z0-9]+)\/[a-zA-Z0-9_\-]+\.c$/);
            $protocol = "VTYSH_" . uc $protocol;
         }