
tools/dev/headerizer.pl - Generates the function header parts of .h files from .c files

$ perl tools/dev/headerizer.pl [object files]
Generates C function declarations based on the function definitions in the C source code.

The headerizer works off of directives in the source and header files.
One source file's public declarations can only go into one header file. In other words, headers-to-source is one-to-many.
HEADERIZER BEGIN: source-filename / HEADERIZER END: source-filenameMarks the beginning and end of a block of declarations in a header file.
# In file foo.h
/* HEADERIZER BEGIN: src/foo.c */
/* HEADERIZER END: src/foo.c */
/* HEADERIZER BEGIN: src/bar.c */
/* HEADERIZER END: src/bar.c */
HEADERIZER HFILE: header-filenameTells the headerizer where the declarations for the functions should go
# In file foo.c
/* HEADERIZER HFILE: foo.h */
# In file bar.c
/* HEADERIZER HFILE: foo.h */

--macro=XPrint a list of all functions that have macro X. Example:
$> perl tools/dev/headerizer.pl --macro=PARROT_CAN_RETURN_NULL src/list.o
src/list.c
Parrot_list_pop
Parrot_list_remove
2 PARROT_CAN_RETURN_NULL functions

The original headerizer program was created by Andy Lester in May 2006, with assistance from Jerry Gay and others. In the last half of 2010, Most of the code was refactored into lib/Parrot/Headerizer.pm and lib/Parrot/Headerizer/Functions.pm by James E Keenan.