is "-ifoobar.h=dir/foobar.h" possible?

Mark Galeck mark_galeck@pacbell.net
Thu Aug 11 02:20:00 GMT 2011


Hello,

Windriver's diab C/++ compiler had this incredibly useful option for a long 
time:

-ifoobar.h=dir/foobar.h

This means to the preprocessor, 

"whenever you find 

#include "foobar.h"
or 
#include <foobar.h>

in the code, replace foobar.h with dir/foobar.h "


This option makes all other header file search options obsolete, in fact the 
whole "search" is obsolete, which means compilation is fastest, and also if you 
have multiple files in the filesystem with the same name, it is trivial to point 
which is the one you want to include (with thousands of files and copies all 
over the place, it can be very difficult to arrange traditional -I options so 
that all the correct header files are picked up, and not the unwanted copies).  




Is anything like that planned for gcc?  Possible?  


Thank you,

Mark 



More information about the Gcc-help mailing list