Hi Marc,
Marc Piulachs wrote:
Now if we are going to generate two .def files f.e:
modulename.msvc.spec.def
and modulename.gcc.spec.def how we should declare it
on the
modulename.rbuild?
I think we should change the <importlibrary> tag to support .spec files
directly.
For example in the module you have: <importlibrary definition="module.spec"
/>
When you compile using the MinGW backend, you will get a file
"module_gcc.def" in the intermediate directory. As rbuild builds the
filename itself, it can simply use it for makefile.auto and expect that the
.spec to .def converter created this file.
When the MSVC backend is used (by calling "make msvc*"), it will create a
file "module_msvc.def" in the intermediate directory.
* With my proposed method the def files are created by
backends on request so on a msvc build only msvc
compatible def files would be generated
Is also possible with the .spec file method (see above).
- If you take a look at
/tools/rbuild/modulehandler.cpp:2506
you will be horrorified to see that both module names are
hardcoded on rbuild which is not good.
Agreed, this should be handled better, but this is something we can care
about later :-P
Last but not least, from my point of view integration
is
important, We have a fairly complex build tool, all the information
we can give to it about the codebase will worth it because more
automatic checking we will be able to do and more things we will
be able to autogenerate , we should let rbuild itself generate as much
things as possible.
When doing such changes, always remember that rbuild is mainly just a tool
that processes makefile-like files and doesn't compile code files itself.
Also processing XML files is slower compared to processing plain text files.
In this case, there also exists a format that is already used to solve this
problem, so we should really adopt it.
Regards,
Colin