Christoph Höger wrote:
I have started converting MetaModelica to autootols to
boot-bootstrap
the omc build process.
May I suggest using CMake instead? It's easier to use, its new versions are
more backwards-compatible with older ones, it's more portable to other
(inferior ;-) ) operating systems, it doesn't require or expect you to ship
generated files in source tarballs, it supports nice features like progress
percentages, it's faster and it's successfully used in more and more
upstream projects, including all of KDE.
On the other hand, CMake would probably be less than helpful for the SML
parts, which comprise a significant portion of the codebase as far as I can
see, you'd have to work with add_custom_command which isn't that wonderful.
(For common languages like C/C++ and a few others, CMake does a lot of stuff
for you, but less common ones aren't really supported and you end up having
to write CMake commands equivalent to makefile rules.)
So each tool has its advantages and drawbacks.
Building the rml compiler and the related libraries was easy, but now
I
could need some help and advice on how to build the testcases.
In the original buildsystem from
https://openmodelica.ida.liu.se/svn/MetaModelica there are some examples
with own makefiles, but those refer to the buildsystem itself.
I am not sure how to handle this with automake (obviously it would
require to build the compiler before the tests).
So currently I am wondering if the examples should have a build system
that requires the compiler to be installed, any thoughts?
Normally testsuites can use the just-built compiler directly from the source
tree. Look at existing projects and how they handle this. As you're using
autotools, I guess GCC would be a good place to look.
On the other hand, there are some "style" questions,
I'd like to be
answered:
This package builds three slightly different libraries in three differen
flavors: called (librml_plain|librml_mask|librml_diff)(_g|_p|).so
Those flavors only differ by the CFLAGS set upon compilation (_p means
-p, _g -g).
Upstream told me, they require them all, but would this be acceptable?
Sure, I don't see why not. You just need to be careful when building (you
need to build the object files to different places so they don't conflict).
Is the name rml ok for a library in /usr/lib or shall I
use /usr/lib/rml/ by default? (Same for headers)
Hmmm, that's a bit at the limit, 3 letters are a bit short for a unique
name. :-( But there's no librml.so in Fedora yet as far as repoquery tells
me, so at least there's no current conflict. Let's see what others think.
What with the name? Is MetaModelica even a good name, if the main
binary
is rmlc?
If that's the upstream project name (used in things like tarballs), it's
fine. (But is the MixedCase really necessary? :-( Usually things like
tarball and package names are all lowercase, but sometimes MixedCase is used
by upstream and the Fedora packages usually match that. Probably something
to discuss with upstream.)
The package builds a compiler driver, essentially a shell script, by
copying some configuration variables into a shell template (mainly how
to invoke cc). Would this be fine as a /usr/bin script?
Yes, but beware of multilib conflicts: if that script is in the same package
as some libraries, that package will end up multilibbed due to the libraries
and if the script is not identical for 32-bit and 64-bit, there will be a
conflict between the 2 multilibbed packages. (Splitting out the libraries
into a -libs package is a way to work around that.)
Kevin Kofler