On 01/30/2013 07:55 PM, Andrew Fish wrote:
>
> On Jan 30, 2013, at 2:43 PM, Rod Smith <rodsm...@rodsbooks.com>
> wrote:
>
>> Personally, I'm most familiar with Unix-style development with
>> make. Also, I wanted rEFInd to be compilable in a way that would
>> facilitate inclusion in Linux distributions, and that definitely
>> means building it outside of the TianoCore directory tree.
>
> Is the issue the size of the edk2 packages and build tools, plus the
> dependency on Python? Or that you need to duplicate the edk2 packages
> and build tools for every module you want to build?

Neither. It's about the locations of files and permissions to write to 
the TianoCore tree. If you look at the requirements for creating an RPM 
source file, for instance, the assumption is that the package tools 
(such as the rpmbuild utility) will be able to uncompress the project's 
(rEFInd's, in my case) source files in an arbitrary location and build 
them. Dependencies on other packages are perfectly acceptable, but it's 
awkward at best, and perhaps impossible, to specify that the project's 
source files be uncompressed in a particular directory (such as within 
the TianoCore directory). I suppose in theory you could have a 
pre-compilation script set up symbolic links to meet that requirement, 
but that wouldn't work if the user who builds the binary package doesn't 
have permission to create a link within the TianoCore tree. Permissions 
also become an issue when creating the object files and binaries, since 
in the TianoCore model, those get scattered about within the TianoCore 
tree, and an ordinary user might lack write permission to those 
locations. The only alternative I can think of would be to include 
TianoCore within the rEFInd source archive (or as a patch to it), which 
is ridiculous. This isn't just an RPM requirement, either; you'd have 
similar problems with Debian packages, Gentoo ebuilds, etc. I'm less 
familiar with FreeBSD, but I think there might be similar issues with 
its ports system.

Building out of tree solves these problems. The RPM (or whatever) source 
package can uncompress rEFInd's source files wherever it likes and built 
the program using read-only access to the TianoCore directory tree. I 
chose to use make to do it with rEFInd, but that wouldn't be necessary 
from a Linux packaging point of view; TianoCore-specific build scripts 
that supported out-of-tree compilation would work as well.

I could write more about this, but I don't want to hijack Rafael's 
topic. Since he wants to distribute code via git or svn, he's likely to 
have similar concerns, although perhaps not as extreme -- he could 
probably instruct users to do a "git clone" within the TianoCore tree, 
or create symbolic links, and not complicate matters too much.

>> That said, I agree that if you're used to the TianoCore style
>> (which I ASSUME comes from a Microsoft/Windows model),
>
> I never really though of it as the Microsoft Windows model, well I
> guess text files with [Sections] was probably inspired by Windows INF
> files? I think it was more inspired by modern GUI based development
> model. If I write an iPhone App with Xcode I don't manually edit
> makefiles, and the same goes for Visual Studio. So the concept of
> having simple config files stems more from that.

I wasn't referring to the configuration file vs. Makefile issue, but to 
the layout of files within the package and the relationship of a 
project's (rEFInd's) source files as being within the library's 
(TianoCore's) directory tree. That said, I've done very little Windows 
development, so I may be off base on that. I don't really know that 
other big libraries encourage building applications within their 
directory trees. I do recall that this sort of thing was common for 
other DOS and Windows programs like word processors back in the 1980s 
and early 1990s.

>> Would documentation on a make-style approach be a welcome addition
>> to the project? If so, I could probably write something up that
>> would help people get started on that way of building with
>> TianoCore.
>>
>
> Contributions are always welcome. I think as long a we recommend that
> folks use the in-tree way if possible adding GNU makefile
> instructions don't hurt anything.

Is there a style/submissions document to provide hints on how to do 
this? What format should I use? (HTML? ASCII?)

-- 
Rod Smith
rodsm...@rodsbooks.com
http://www.rodsbooks.com

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to