Mercurial > octave-nkf
comparison scripts/mkdoc.pl @ 18972:18e46285a608
Skip private functions when building DOCSTRING (bug #42791).
* scripts/mkdoc.pl: the DOCSTRING being built are used as cache for functions
such as 'lookfor()', even if they are private functions. This change skips
those, effectively removing them from lookfor results.
author | Carnë Draug <carandraug@octave.org> |
---|---|
date | Thu, 17 Jul 2014 16:25:30 +0100 |
parents | d63878346099 |
children | b0960d4afe5f |
comparison
equal
deleted
inserted
replaced
18971:961ecaf9fb57 | 18972:18e46285a608 |
---|---|
19 # <http://www.gnu.org/licenses/>. | 19 # <http://www.gnu.org/licenses/>. |
20 | 20 |
21 ## Expecting arguments in this order: | 21 ## Expecting arguments in this order: |
22 ## | 22 ## |
23 ## SRCDIR SRCDIR-FILES ... -- LOCAL-FILES ... | 23 ## SRCDIR SRCDIR-FILES ... -- LOCAL-FILES ... |
24 use File::Spec; | |
24 | 25 |
25 unless (@ARGV >= 2) { die "Usage: $0 srcdir m_filename1 ..." ; } | 26 unless (@ARGV >= 2) { die "Usage: $0 srcdir m_filename1 ..." ; } |
26 | 27 |
27 $srcdir = shift (@ARGV) . '/'; | 28 $srcdir = shift (@ARGV) . '/'; |
28 | 29 |
41 $srcdir = "./"; | 42 $srcdir = "./"; |
42 next MFILE; | 43 next MFILE; |
43 } | 44 } |
44 | 45 |
45 $full_fname = $srcdir . $m_fname; | 46 $full_fname = $srcdir . $m_fname; |
47 next MFILE if ((File::Spec->splitdir($full_fname))[-2] eq "private"); | |
46 next MFILE unless ( $full_fname =~ m{(.*)/(@|)([^/]*)/(.*)\.m} ); | 48 next MFILE unless ( $full_fname =~ m{(.*)/(@|)([^/]*)/(.*)\.m} ); |
47 if ($2) | 49 if ($2) |
48 { $fcn = "$2$3/$4"; } | 50 { $fcn = "$2$3/$4"; } |
49 else | 51 else |
50 { $fcn = $4; } | 52 { $fcn = $4; } |