Unit sharing in large similar projects
Posted on 1998-06-17
I am currently working on two projects with a lot (say 100) units. The projects are very much the same; therefore a lot of units are excatly the same. Different people work on the projects and the up-to-date source of all projects is never on one machine.
At this moment we work with two copies of the units that are the same. Every now and then I scan the two sources for differences. The two projects have the same name.
How can I determine wether a unit can be put into a shared directory and be used by both projects. What unit dependancies are allowed for this type of sharing sharing. Ideally the shared units are only compiled once for both projects. All types of unit dependencies are used in the projects.
So there are a number of cases that are distinguishable:
- candidate unit uses a project unit in the interface section
- candidate unit uses a project unit in the implementaion section
- candidate unit is used in a project unit in the interface section
- candiadte unit is used in a project unit in the implementation section
note: the units in both projects which are in the uses clause the candidate units have the same filename.
I have experimented a bit with this but am not sure yet which units to include in this sharing. I have seen strange behaviour: units not being recomplied while I expected they would be.
I hope to solve this problem soon. Maybe some people have experience with multiple similar projects and sharing units.