access to include path in front end

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I don't understand how to access in a front end the arguments to the -I
option on the command line.  

Cobol has a feature similar to the C preprecessor, known as the
Compiler Directing Facility (CDF).  The CDF has a COPY statement that
resembles an #include directive in C, and shares the property that COPY
names a file that is normally found in a "copybook" which, for our
purposes, is a directory of such files.  The name of that directory is
defined outside the Cobol program.  

I would like to use the -I option to pass the names of copybook
directories to the cobol front end.  A bit of exploration leaves me
with the sense that it's not that simple because the -I argument, in
C at least, is not passed to the compiler, but to the preprocessor.
Access to -fmax-errors I think I've figured out, but -I is a mystery. 

I'm sure other front ends have similar needs.  I didn't want to follow
the -J option in Fortran.  Which should I think of as the canonical
example?  

I'm a little puzzled by the status quo as I understand it.  Unless I
missed it, it's not discussed in gccint.  ISTM ideally there would be
some kind of getopt(3) processing, and the whole set of command-line
options captured in an array of structures accessible to any front
end.  Is that not the case and, if not, why not?  

Many thanks.  

--jkl



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux