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

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



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.



-- 

Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: