This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

#include macro-generated file name


Hi,
While upgrading some code from 2.95.3 to gcc-3.4.6, I ran into a problem where we were construction an include filename with macros like this:


#ifdef AAA
DIR="dir1"
#elif defined( BBB)
DIR="dir2"
#elif defined( CCC)
DIR="dir3"

#include DIR/file1
#include DIR/file2
#include DIR/file3
...

This worked fine with 2.95.3, but I've been unable to make this work with 3.4.6. In the documentation for the 2.95.3 preprocessor, there is
some verbage about a computed include, which will expand macros and concatenate strings. However, this is not in the later docs.


Is this simply no longer allowed? Adding the proper include search-path to the command line isn't easy. I'm thinking that I'll just need
to replicate my block of #include directives. But before I give up, I felt the need to ask.
Thanks!



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]