Let's say that I have the code as follows:
L - A common library (source) (via svn:extern)
X - My project
Y - A static library (source) (via svn:extern) compiled with X and depends on L
Inside Lthere is a macro that is widely used in code XandY
#define FOO() printf("Hello World\n")
I want to change it to
#define FOO() printf("===> Hello World <===")
Now I know what in my code XI can do:
#ifdef FOO
#undef FOO
#define FOO() printf("===> Hello World <===")
#endif
which works great for Xbut doesn't help for any code in Yand compilation. I could change the code Yeither Llocally, but then I can’t check my modifications, as this can violate other expectations of the project, which does FOO.
, , -D? , Makefile, , X, FOO. -D , X Y #include L, ( , ).