[Asterisk-Dev] Compiler Directives and viewing code
Ole Reinartz
ole.reinartz at gmx.de
Tue Oct 5 13:52:19 MST 2004
Matthew Boehm wrote:
>Lets say that I've got this source file and its got #ifdef's and #else's
>etc..all over the place. Is there any way to view the resulting source code
>after these directives have been parsed?
>
>
run it through the preprocessor?
Find out how that sourcefile is going to be built (maybe theres a
makefile with the package? Just run make -n to see how this file is
going to be compiled). Then take that command line, remove -c and -o
filename.o, and add a -E. Run that command.
The preprocessed source you will get on the standard output. But beware:
it will contain all the contents of all included files and of the files
included by the included files asf. Search for a characteristic code
sequence of your sourcefile. You should find it at the very end.
Ole
More information about the asterisk-dev
mailing list