On Sat, Mar 23, 2002 at 04:03:21AM +0100, Frank Heckenbach wrote:
Carel Fellinger wrote:
...<usefull anwsers snipped>
The project I'm porting used `.pf' for interface modules. So I've to use the `-x Pascal' flag (took me some time to find it's an uppercase Pascal, in the docs I read first it was a lowercase p). Could as wel change the extension to something more telling, hence I asked.
Well, if it's really useful (e.g., compatible to some other compiler), we could add `.pf' to the list of the recognized extensions. After all, it doesn't make a big difference if we have 4 or 5 of them. What do you think?
I wasn't around when they decided to use this extension, it might be the case that MetaWare Pascal used it, but no I wouldn't suggest to add it.
On the other hand I would very much like to have *some* extension agreed upon to be used for interface-only source, say ".pi". That way it becomes possible to apply --automake to true separate compilation.
To me it seems elegant that when interface and implementation are split in separate files, their file names only differ in extension, and it would definitely help if a specific extension was allotted to interface sources and a different one to implementation sources.
The automake would then first try to locate a separate ".pi" interface file, compile it and import the "gpi", and later but prior to calling the linker it would try to compile the accompaniing ".p" or ".pas" implementation file. If that separate interface file isn't found, then the ".p" or ".pas" file is taken to contain both the interface as wel as the implementation and it is compiled just once at the moment it is needed in an import statement.
I don't think it's worth the trouble to distinguish between program, implementation-only or shared-interface-and-implementation files, as I don't see how this serves any purpose for the automake process.
Note: I don't know were the ".pp" extension stems from, if it's used like ".p" or ".pas" then it should be included in the above discussion were ever ".p'and ".pas" are mentioned. If its use is unspecified, then asfar as I'm concerned ".pp" is as good as any as `interface-only' extension (though ".pi" is nicer as it's closer to ".gpi").
-- groetjes, carel