[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: packaging release and debug builds in the same RPM package

From: Ralf Wildenhues
Subject: Re: packaging release and debug builds in the same RPM package
Date: Tue, 6 May 2008 08:41:24 +0200
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

Hello Olivier,

* Olivier Langlois wrote on Mon, May 05, 2008 at 11:52:47PM CEST:
> Now that I am able to build these 2 versions of my libs into separate
> subdirectories, I would like to suffix the library names with 'd'.

> Suggestions on how to express this in automake files are welcome. Also
> note, that I am willing to reconsider how I am planning to package
> release and debug version of my libs if there are better ways to
> achieve the same goal.

Here's a better idea: use two different build trees and install trees:
  mkdir build-opt build-debug
  cd build-opt
  ../source/configure -C --prefix=/inst-opt  # CFLAGS will be -O2 -g
  make all check install
  cd ..
  cd build-debug
  ../source/configure -C --prefix=/inst-debug CFLAGS=-g
  make all check install

Then link against '-L/inst-debug/lib -lfoo' or similar.

Advantage of this approach: you can have a debug tree, 45 different
optimized trees (with different optimization flags), 32bit and 64bit
trees, one done with another compiler, and whatnot else, without the
need to adjust your package for any of them.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]