You are absolutely right, we have to try to avoid using particular or concrete information about the build process on .rbuild files and abstract the maximum possible data. The .rbuild files at the end should be only metadata that describes the source code. With this information plus the context (Environment + Project) rbuild can guess most of the concrete information needed to generate the appropriate makefile.
Regarding the "ElfExecutable" module type IMHO it's not correct because it does not describe a generic module type .It's a concrete solution for a particular problem. If what "ElfExecutable" really does is create a ppc compatible bootloader version you should modify "MingBootLoaderModuleHandle" to accommodate it using an architecture switch as you suggested and even introducing a new attribute, tag or condition if necessary but not a new module type.
From my point of view the main problem with rbuild is that there isn't any
responsible of the subproject. When a developer needs a particular feature he just implements it in its on way which is fine but rbuild is a more or less complex piece of software that needs to be known what leads to copy-paste code, inconsistencies and really FULL of hacks .It is becoming unmaintainable and sooner or later most parts of it will have to be rewriteen.
One small criticism though I would like to actively work on improving rbuild but it's a little discouraging because the patches send to bugzilla usually takes days or even weeks to be applied what leads to merge conflicts if you keep modifying your working copy. I think other developers feel like me. Reactos would get a lot more contributions if the patch reviewing process was faster.
Marc,
-----Original Message----- From: ros-dev-bounces@reactos.org [mailto:ros-dev-bounces@reactos.org] On Behalf Of art yerkes Sent: Thursday, September 06, 2007 8:59 AM To: ReactOS Development List Cc: Marc Piulachs Subject: Re: [ros-dev] Regarding new rbuild module type "ElfExecutable"
On Tue, 4 Sep 2007 14:05:24 +0200 "Marc Piulachs" marc.piulachs@codexchange.net wrote:
Hi,
I have been reviewing last changes introduced in rbuild to support the powerpc version and I don't understand the new module type
"ElfExecutable".
Can anyone explain me why is it necessary?
Looking at the source code I can see that this module type is really
similar
to the "BootLoader" module type (they produce the boot executable) since rbuild already knows the architecture being build I can't see the
difference
between both
Also , from my point of view the .rbuild files should contain only
abstract
information about the build process and not particular one about an architecture or a format type to be used , that's rbuild.exe job , produce the apropiate makefile using all the information available.
Rbuild definately encodes too much information inside it, and leaves too little for configuration. Also, most of the modules don't use the ARCH setting, so I was reluctant to introduce an architecture switch in rbuild.
I wouldn't be opposed to removing ElfExecutable if you'd help me sort out how rbuild *should* work.
I'd personally like to see hardcoded strings pulled out into properties and the 'if' code made more uniform. Right now, each tag type needs to be made separately conditionable.
I think that if we made a few things more data-oriented, then rbuild would become much easier to adapt.