You might have noticed on some systems nmake runs
instead of running the compiler directly.
ppcc is a
shell script which allows us to compile code using the nmake
preprocessor with compilers that don't provide a means to access
an external preprocessor.
ppcc first calls nmake cpp
to generate a preprocessed
.i file. The
.i file is then
passed to the compiler for compilation. Since the source code is already
preprocessed we do not have to rely on the native preprocessor.
nmake has its own C preprocessor (cpp) which is used to faciliate
viewpathing. It treats the
-I arguments a bit differently
than standard cpp implementations to guarantee correct include files are
picked up when viewpathing. (For more information see the
cpp FAQ page.)
There are three cases concerning nmake cpp and the compiler:
.ifile) to the compiler. The compiler doesn't have to do any preprocessing since it is already done.
-Ilist the same as nmake cpp. In these cases the native cpp will pick up the correct include files, so nmake cpp is not used. This is indicated by the native preprocessor accepting the
-I-argument. Examples are the Gnu C compiler, EDG based C++ 4.x compilers, HP aCC, and later release of Sun Forte C++.
When nmake is first run with a given compiler it "probes" the compiler to learn the compiler's capibilities and what kind of arguments are supported. At this time "probe" files are created, and from then on these probe files are referenced by nmake rather than re-probing every time.
The make probe file (located in
indicates which of the above three cases is relevant for the compiler,
and determines if and how the nmake cpp is used. You can see the
make probe file by running: '
probe -l C make /path/to/cc'.
-I-then use the native cpp, it supports
-I-(case number 3 above).
CC.ALTPP.ENVare empty, and there is no
CC.DIALECT, then use ppcc (case number 2 above).
CC.ALTPP.ENVtells how the compiler can use an external cpp (case number 1 above).