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

Re: 1 source, 2 binaries, 2 CFLAGS and cdbs

On 6/25/06, Neil Williams <linux@codehelp.co.uk> wrote:
marciotex@gmail.com wrote:
> Hi.
> How implement conditions following?
> 1) libfoo0 and libfoo0-athlon are binary packages builded from libfoo
>    source package
> 2) CFLAGS for build libfoo0 are differents that for build libfoo0-athlon
> 3) debian/control contains libfoo0 (Architecture: any) and
>    libfoo0-athlon (Architecture: i386)
> 4) debian/rules includes cdbs
> If somebody know package that do it, please, tell me what is. Package
> are building ok already (with cdbs). But just single binary.

If the build can be tweaked to use two local variables for the CFLAGS
differences, you can build multiple binaries in a single pass (which
cdbs needs).

Identify the common CFLAGS settings for both and the specific flags to
be added for each of the others. Store those binary-specific flags in a
local variable in, say, configure or the Makefiles. In the Makefile.am,
you can build two binaries from the same source by simply repeating the
libfoo_SOURCES etc with appropriate names, and bring in the local CFLAGS
options too. i.e. repeat the build within the one pass but with
different options.

All this is quite a lot of automake patching and if you can get upstream
onside it will be a lot easier.

Running autotools in debian/rules will bring you in a huge mess[1].
Please DO NOT do that.

[1] see "Fixing autotools related build issues" by Sam Hocevar,

"Imagination is more important than knowledge" A.Einstein

Reply to: