2 ################################################################################
4 # mkapidoc.sh -- generate apidoc.fnc from scanning the Perl source
6 ################################################################################
10 # $Date: 2009/01/18 14:10:50 +0100 $
12 ################################################################################
14 # Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz.
15 # Version 2.x, Copyright (C) 2001, Paul Marquess.
16 # Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
18 # This program is free software; you can redistribute it and/or
19 # modify it under the same terms as Perl itself.
21 ################################################################################
25 [ -f "$1/embed.fnc" ] && [ -f "$1/perl.h" ]
30 echo "USAGE: $0 [perlroot] [output-file] [embed.fnc]"
35 if isperlroot "../../.."; then
45 if [ -f "parts/apidoc.fnc" ]; then
46 OUTPUT="parts/apidoc.fnc"
55 if [ -f "parts/embed.fnc" ]; then
56 EMBED="parts/embed.fnc"
64 if isperlroot $PERLROOT; then
66 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
68 : !!!! Do NOT edit this file directly! -- Edit devel/mkapidoc.sh instead. !!!!
70 : This file was automatically generated from the API documentation scattered
71 : all over the Perl source code. To learn more about how all this works,
72 : please read the F<HACKERS> file that came with this distribution.
74 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
77 : This file lists all API functions/macros that are documented in the Perl
78 : source code, but are not contained in F<embed.fnc>.
82 grep -hr '^=for apidoc' $PERLROOT | sed -e 's/=for apidoc //' | grep '|' | sort | uniq \
83 | perl -e'$f=pop;open(F,$f)||die"$f:$!";while(<F>){(split/\|/)[2]=~/(\w+)/;$h{$1}++}
84 while(<>){s/[ \t]+$//;(split/\|/)[2]=~/(\w+)/;$h{$1}||print}' $EMBED >>$OUTPUT