Hi all, I am trying to extract some part of C source code defined under certain Macro statements for example this is a code
#include<stdio.h> #include<unistd.h> int main(void) { int my_int = 10 ; #ifdef TEST_MACRO int his_int = 20 ; #else int other_int = 40; #endif printf( "Test Program\n"); #ifdef TEST_MACRO printf("his_int=%d\n",his_int); #else printf("other_int=%d\n",other_int) ; #endif printf("my_int=%d\n",my_int); return 0 ; } Now after some processing using m4 I want following type of output #include<stdio.h> #include<unistd.h> int main(void) { int my_int = 10 ; int his_int = 20 ; printf( "Test Program\n"); printf("his_int=%d\n",his_int); printf("my_int=%d\n",my_int); return 0 ; } using gcc -E is ofcourse one way of doing this but Is it possible using m4? Is it possible? Please any body tell me !!! _______________________________________________ help-gnu-utils mailing list help-gnu-utils@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-utils