Chapter 12.10 of the GPC docs "GPC’s Automake Mechanism – How it Works" reads as follows:
"When a program/module/unit imports (uses) an interface, GPC searches for the GPI file (see Section 12.9 [GPI files], page 476) derived from the name of the interface.
Case 1: A GPI file was found.
Each GPI file contains the name of the primary source file (normally a ‘.pas’ or ‘.p’ file) of the module/unit, and the names of all interfaces imported. GPC reads this information and invokes itself with a command like gpc foo.pas -M -o foo.d This means: preprocess the file, and write down the name of the object file and those of all its source files in ‘foo.d’. GPC reads ‘foo.d’ and looks if the object file exists and if the source was modified since the creation of the object file and the gpi file. If so, GPC calls itself again to compile the primary source file. When everything is done, the ‘.d’ file is removed. If there was no need to recompile, all interfaces imported by the module/unit are processed in the same way as this one."
I may be doing something wrong but "gpc foo.pas -M -o foo.d" doesn't give the primary source file nor the names of all interfaces imported, instead the '.d' file is always empty ....
Any clues or hints ? Full information on all unit dependencies is crucial in the project I am working on (an IDE plugin for GPC).
Regards,
Adriaan van Os