Prof A Olowofoyeku (The African Chief) wrote:
On 8 Dec 2002 at 13:39, Nick Ioffe wrote:
Hi!
We're converting large (about 300 modules) project from DEC-PASCAL to GPC.
The problem is that building the project after changing some file is very time-consuming, since when I change module implementation the interface is recompiled as well.
I keep both interface and implementation in the same file, so when the file is changed I've no way telling the make what have changed - interface or implementation , don't I?
If there is an option then I can use --interface-only and --implementation-only options in gpc.
There is: " -finterface-only" Compile only the interface part of a unit/module and exit
" -fimplementation-only" Do not produce a GPI file; only compile the implementation part
Thus number of questions :
- Is there any "normal" way (without keeping previous version of .pas) to tell what have been changed?
Writing changelogs, using CVS, etc.
I suppose Nick meant how to tell the compiler (or the make tool) ...
- How do you handle such problems?
I use changelogs or comments in the code.
- Is there any automatic tool which can keep and provide the makefile with dependency structure of modules?
"--automake" ?
The problem with `--automake' is that it consideres any modification of the file a reason to recompile everything that depends on it (so it tries to be too conservative in doubt).
The often-announced `gp' utility will solve this (by keeping a checksum of the interface). But, as I said before, it's not finished yet (in particular, it doesn't work with modules yet, only with units).
This might be another reason to make the release of gp a higher priority. But I don't think I'll be able to finish it this year. BTW, what's your time scale, would it still be useful to you some time later, or will you have to find another way then, anyway?
Frank