Why is wmakelnInclude designed the way it is?
As far as I can tell,
Code:
EXE_INC = \
Code:
EXE_INC = \ It seems to me that the current system forces the programmer to dive into the dependencies of the modules that (s)he uses, and that this is a task which would be easy to delegate to a script. What's the motivation behind the current approach? |
Here is my take on the build system:
If wmakeLnInclude would work the way you describe in your post, you would generate loads of symlinks. In the current implementation, each module has its own lnInclude folder which contains symlinks to all files belonging to that very module. Thus, if you search for a particular file in your OF sources by name, you find it twice. The file and the symlink. Code:
user@host/OpenFOAM/OpenFOAM-dev/src$ find . -name fvMesh.H Furthermore, under the system you proposed, there would be a mix of links to files belonging to the module and links to files belonging to other modules in a module's lnInclude directory. A compiler warning/error pointing to the file moduleA/lnInclude/X.H would then not automatically indicate, that file X of moduleA is at fault. It could also be file X of moduleK. Granted, you would eliminate the need to include many lnInclude entries in the Make/options file, however, under the current system there is a clear division of labour (or knowledge). The lnInclude folder contains all the symlinks to the module's own files. Whereas, Make/options contains all information on the dependencies of a module. |
Good points. I don't think that any of the issues you raise are insurmountable, though:
|
All times are GMT -4. The time now is 02:43. |