On Nov 13 2012 10:06 PM, John Morris wrote:
> ...
>> What's an economical way to build multiple configurations 
>> side-by-side,
>> e.g., for Michael's code, ./configure --with-threads options rtai,
>> xenomai-user, xenomai-kernel, rt-preempt-user, rt-preempt-kernel?
>
> I'm not doing this exactly, but building RPMs requires this kind of 
> kung-fu.
>
> If you specify a --prefix argument to ./configure, it will install
> LinuxCNC where you ask it to, but the directory structure may not be
> what you intend.  For example, ./configure --prefix=~/emc2-xeno-user
> will, I expect, put things in ~/emc2-xeno-user/bin,
> ~/emc2-xeno-user/lib, etc.  There are ways to further control those
> locations with args like '--bindir' and '--libdir'.  Try ./configure 
> --help.
>
> This also may not be what you intend because you won't really have
> multiple configurations side-by-side.  You'll still have to run
> ./configure; make; make install when you've been working on xeno-user
> and decide to switch to rtai.
>
> (In the olden days before 'distros' came to be and disk and CPU were
> still scarce, many open-source packages' makefiles contained a 
> variable
> to specify a separate build directory so you could keep one copy of 
> the
> source but build object files for multiple architectures in another
> place.  I believe LinuxCNC does not have such a thing.)

Something that the Gentoo community came up with to deal with multiple 
versions of the same package was the "eselect" tool.  This allows you to 
install multiple versions of all sorts of packages (including kernels).  
You can then do something like:

# eselect kernel list
Available kernel symlink targets:
   [1]   linux-3.2.14-rt24
   [2]   linux-3.3.8-gentoo
   [3]   linux-3.4.9-gentoo *
   [4]   linux-3.5.7-gentoo

# ls -l /usr/src/linux
lrwxrwxrwx 1 root root 18 Oct 25 21:09 /usr/src/linux -> 
linux-3.4.9-gentoo

# eselect kernel set linux-3.5.7-gentoo

  # eselect kernel list
Available kernel symlink targets:
   [1]   linux-3.2.14-rt24
   [2]   linux-3.3.8-gentoo
   [3]   linux-3.4.9-gentoo
   [4]   linux-3.5.7-gentoo *

# ls -l /usr/src/linux
lrwxrwxrwx 1 root root 18 Nov 14 00:12 /usr/src/linux -> 
linux-3.5.7-gentoo


While for something as simple as setting as linking /usr/src/linux is 
streight forward, when jumping between packages like binutils, python, 
and fontconfig (just to name a few) can have lots of weird actions (like 
sym linking things in bin, lib, include, share, ... can be very tedious 
when there is an abstract representation that allows the switch.  So, 
what this does (if I understand it correctly) is build and install in 
separate directories, and then manage symlinks to the appropriate heads.

   Hope this helps,

   EBo --

ps: I forgot to mention that the build system has tools to specify the 
appropriate (multiple-)versions of the above tools.  So what appears to 
be a simple "emerge" might actually build the tool for multiple versions 
of python, kernels, etc.


------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to