r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!REBOL3 Extensions] REBOL 3 Extensions discussions

Andreas
12-Jul-2010
[839]
Yes, it basically boils down to an adapted Makefile along with an 
auto-generated header file (or defines) for platform-specific config.
Carl
12-Jul-2010
[840x4]
A few things on that...
The makefile is auto-generated and changes with each release. 


Also, there are big variations in make between target platforms (some 
are really horrible.) So, the makefile is kept very "dumb" to allow 
those builds.
So, we will want to get the makefile maker to do the right thing.
Second, the config controls are already part of R3, and are triggered 
by the reb-to.h file.
Andreas
12-Jul-2010
[844]
I used CMake, which is a cross-plattform tool that automatically 
generates "project" files for a variety of targets (such as GNU Make, 
Eclipse project files, Visual Studio project files). It works great 
on Linux, Win32, OSX and is used by several high-profile projects. 
But I'm well aware that third-party tools are most likely no-go for 
REBOL, so I'm fine with all that, and can easily look into it, as 
long as there' s at least a Linux hostkit available.
Carl
12-Jul-2010
[845]
So, what header files do you find a need to generate above?
AdrianS
12-Jul-2010
[846]
I would recommend cmake as well, seems to work well
Andreas
12-Jul-2010
[847]
I can only talk about A96.
Carl
12-Jul-2010
[848]
What is the input to cmake?
Graham
12-Jul-2010
[849]
http://203.97.234.193:8080/secure/project/ViewProject.jspa?pid=10020 
... I've added a hostkit tracker to my Jira instance.
Carl
12-Jul-2010
[850]
BTW, no, I'm fine with supporting as many target formats as possible!
Andreas
12-Jul-2010
[851]
CMake does basically the same thing your "makefile maker" tries do 
to.
Carl
12-Jul-2010
[852]
So far I've built it on about 5 different targets... but there are 
many more. For instance, we've talked about ARM, but the ARM tools 
are really crude (at least what I've got here.)
Andreas
12-Jul-2010
[853x2]
The most common ARM tooling is just GCC.
CMake Input is a "CMakeLists.txt" file, which is written in "just 
another Makefile language".
Carl
12-Jul-2010
[855]
Yes, but the ARM make tool looked like 1982 the last time I tried 
it.
Andreas
12-Jul-2010
[856]
No idea what you tried, but you'd typically just use GNU make on 
ARM as well.
Carl
12-Jul-2010
[857]
Have you tried using the makefile on BSD or OSX?
Andreas
12-Jul-2010
[858]
No, as there is no hostkit release for either of those.
Carl
12-Jul-2010
[859]
Basically, same as Linux right now.
Andreas
12-Jul-2010
[860x2]
Can't sensibly try without e.g. a OSX dylib.
But I prodded you for weeks to build one :)
Carl
12-Jul-2010
[862x2]
Also, problematic builds are Sun and HP Unix. But, anyway, if people 
are willing to add them, it's ok with me.
Right... I remember that now. We'll have to give it another go.
Andreas
12-Jul-2010
[864]
I guess sticking with the big three (+ BSD, maybe) will be sufficient 
for now.
AdrianS
12-Jul-2010
[865]
here's the CMakeLists.txt from the OpenCV project , as an example:


https://code.ros.org/svn/opencv/tags/latest_tested_snapshot/opencv/CMakeLists.txt
Andreas
12-Jul-2010
[866x2]
In my opinion, there are bigger problems to tackle before spreading 
thin over multiple platforms makes sense.
(Eventing, for example)
Carl
12-Jul-2010
[868]
Yes, of course, but if more developers get involved, the work does 
not need to be sequential.
Graham
12-Jul-2010
[869]
Oh yeah ..let's get an Os/2 build too !
Carl
12-Jul-2010
[870]
Hmmm.
Andreas
12-Jul-2010
[871]
http://bolka.at/2010/rebol3/CMakeLists.txt.html
Carl
12-Jul-2010
[872]
Looking at above link, I don't think cmake provides much benefit 
to us.
Graham
12-Jul-2010
[873]
( the current version of Os/2 is ecomworkstation  and is positioned 
as a secure enterprise client environemnt )
Andreas
12-Jul-2010
[874x2]
Here's the CMake buildfile I use for the A96 hostkit
CMake provides the benefit that we don't have to reinvent the wheel 
for now. It has, for example, a nice installer for Win32 and can 
automatically generate Visual Studio project files from the above.
AdrianS
12-Jul-2010
[876]
well, if you are considering a makefile generator, at least cmake 
is somewhat of a standard
Carl
12-Jul-2010
[877]
Installer? What does it install?
Andreas
12-Jul-2010
[878x3]
cmake.exe
CMake takes the above as input and generates e.g. a Makefile as output.
Taking specifics of the actual build environment into account.
Carl
12-Jul-2010
[881]
The method I use for R3 simply uses REBOL to generate the host-kit, 
the makefile, and other related files at the same time.
Andreas
12-Jul-2010
[882x2]
With CMake the workflow of a user who wants to build the hostkit 
on Win32 would be as follows:
- Download and install a toolchain (e.g. MingW or MSVC)
- Download and install CMake
- Download the R3 Hostkit

- Generate a R3 build script for your preferred toolchain using CMake. 
E.g. use CMake to generate a GNU make Makefile for MingW
- Build the R3 Hostkit (using the generated build script)
Without CMake, those steps would be the same, except for the extra 
installation of CMake and the generation of a local build script. 
But it would also either limit the user to a single toolchain (such 
as MingW, currently) or you would need to replicate some of the functionality 
of CMake in your make-build.r
AdrianS
12-Jul-2010
[884]
there's a GUI front end for cmake too, though I guess one could be 
made for REBOL just as easily - this lets you resolve env var issues 
and other things
Andreas
12-Jul-2010
[885]
Further, at least for the A96 hostkit, Linux and Win32 hostkits are 
completely separate packages, and that's an incredible nuisance for 
someone doing cross-platform work.
Edgar
12-Jul-2010
[886x2]
It built for me just fine but I had to modify the makefile to use 
cp lib\r3lib.dll .
instead of 
copy lib\r3lib.dll . 
inside a mingw cmd window.
Do we have a test files to run to check if all areas of R3 that is 
implemented is working?
Graham
12-Jul-2010
[888]
It would be good if we had access to the test suites