Pascal Viandier wrote:
I have some questions about gpi files:
- What is a difference between file.gpi and file-all.gpi
The former contains the exported interface, the latter all the interface declarations. A module interface can export all or only some of the declarations (plus possibly some imported ones and possibly with renaming etc.), so it's not necessarily the same.
- Are they all necessary?
Yes, the former for imports, the latter is needed when the implementation of the module is compiled (which may be in a separate file). It must have direct access to all interface declarations, whether exported or not. Indeed, this was a known bug until we added the foo-all.gpi files.
- I set the gpc options --unit-destination-path and --unit-path to a
specific directory (which does exists and have the right permissions) but gpi and objects file files are still created where the makefile is. Do I use wrong options?
These options are used by automake and GP. If you compile your modules manually (or via an explicit Makefile) with `-c', you have to use `-o $UDP/foo.o --gpc-destination-path=$UDP' where $UDP is your intended directory and foo is the file name of the module. Unfortunately, it's not easy to change this for direct compiler invocations due to GCC's design. (Automake and GP do the same when invoking GPC [recursively], just hidden.)
Frank