Re: [greenstone-users] More detailed info on macros

From jens wille
DateWed, 01 Nov 2006 17:27:44 +0100
Subject Re: [greenstone-users] More detailed info on macros
In-Reply-To (4548C056-4030902-gmail-com)
hi!

Biligsaikhan B. [01.11.2006 16:42]:
> Where can I find more detailed information about macros? Maybe
> list of all macros, which macro used where, load order or macros
> tree ....?
you can use the expand_macros.pl script to answer at least some of
those questions:

- get a list of all macros and where they are defined (in order to
have macros defined in the c++ source included as well, you may
specify the path to your greenstone source directory; see the usage
information of the script for details):

expand_macros.pl -s '_.*_'

- get a list of those macros that use, e.g., the macro
('-r' for reverse search):

expand_macros.pl -r -s

- get a list, or "tree", of all macros that are used, e.g., within
the macro function initialize() { } (note the package qualification),
two levels deep:

expand_macros.pl -s -d 2 function initialize() { }

additionally, you can use expand_macros.pl to explore macros
interactively:

expand_macros.pl -i

hope this helps, and have fun! ;-)

final remark: in case expand_macros.pl lacks any functionality you
would like to see or exposes any bugs, please let me know.

cheers
jens