I am having so much trouble with automake that I am considering abandoning GPC altogether.
Everytime that I add a few more modules to my program, I have to spend several hours reorganizing units in order to get the program to compile. The only solution seems to be to combine all units into one giant unit. This is not really satisfactory.
I keep running out of virtual memory on a machine with 256 MBytes of memory.
My concern is that eventually my program will grow to a point where I won't be able to compile it at all. Or that compilation takes so long that development becomes impossible. Currently, the code only implements part of the GUI.
Using a makefile is much better. I am not absolutely sure how to express the dependencies. Make seems to have no concept of a compilation producing more than one output file. I can get RHIDE to bypass automake by not specifying a primary file and adding all source files to the project. But Rhide apparently ignores the Uses clauses when determining dependencies and I ca't work out how to use user-defined dependencies with it.
Does anyone know how I can use Rhide and avoid automake?
Alternatively, is there some other solutions -
A library for gpi's would be nice? Any options to indicate to automake that certain units don't need to be checked?
I suspect that if automake kept track of the units not requiring compilation, things might improve.things. That is, the first time it checks grx20.pas, it should note that no recompilation is required rather than rechecking the same file many times.
I'd be grateful for any advice.
Russell Thamm
Thamm, Russell wrote:
I am having so much trouble with automake that I am considering abandoning GPC altogether. [...]
:-(
I keep running out of virtual memory on a machine with 256 MBytes of memory.
This looks like a circular dependency between some units.
Using a makefile is much better.
Our current project (together with the related issue of re-writing the GPI mechanism) is to re-implement the AutoMake mechanism using `make'.
I am not absolutely sure how to express the dependencies.
To get the (*$include ... *) dependencies, run `gpc -M foo.pas'. It will produce a rule
foo.o: foo.pas foobar.incl foobaz.incl
you only need to extend by adding the gpi files of the units used by this one and the action `gpc -c $(PFLAGS) foo.pas'. The result will look like the following:
foo.o: foo.pas foobar.incl foobaz.incl bar.gpi: gpc -c $(PFLAGS) foo.pas
Make seems to have no concept of a compilation producing more than one output file.
If you duplicate the rule above for the GPI file,
foo.o: foo.pas foobar.incl foobaz.incl bar.gpi: gpc -c $(PFLAGS) foo.pas
foo.gpi: foo.pas foobar.incl foobaz.incl bar.gpi: gpc -c $(PFLAGS) foo.pas
then `make' will nevertheless compile `foo.pas' only once (at least according to my tests with GNU make:-).
I can get RHIDE to bypass automake by not specifying a primary file and adding all source files to the project. But Rhide apparently ignores the Uses clauses when determining dependencies and I ca't work out how to use user-defined dependencies with it.
What about producing a Makefile with RHIDE and adding the `uses' dependencies manually?
A library for gpi's would be nice?
Any suggestion how this could be implemented?
Any options to indicate to automake that certain units don't need to be checked?
Nope. But if AutoMake does not see the source, it will not try to recompile.
I suspect that if automake kept track of the units not requiring compilation, things might improve.things. That is, the first time it checks grx20.pas, it should note that no recompilation is required rather than rechecking the same file many times.
Indeed. That's one reason why we think that `make' should be invoked instead of `gpc1' duplicating the features of `make'.
Greetings,
Peter