[asterisk-bugs] [Asterisk 0015759]: [patch] Need makefile to do kbuild-like out-of-source-tree builds for Asterisk modules

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Aug 26 20:31:39 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=15759 
====================================================================== 
Reported By:                pprindeville
Assigned To:                kpfleming
====================================================================== 
Project:                    Asterisk
Issue ID:                   15759
Category:                   Core/BuildSystem
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     assigned
Asterisk Version:           1.6.1.4 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-08-21 19:39 CDT
Last Modified:              2009-08-26 20:31 CDT
====================================================================== 
Summary:                    [patch] Need makefile to do kbuild-like
out-of-source-tree builds for Asterisk modules
Description: 
Linux modules have "kbuild".

Apache modules have "apxs".

Asterisk needs something similar.  Building a bundled distro (like
Astlinux, for instance) means having two possible courses of action:

(a) have hairy "buildroot" makefiles that copy bits of source into the
asterisk/ source tree, apply patches to the makefiles, etc. and hope that
the next version bump doesn't break your patches and sources;

(b) have a way to build outside of the source tree with only the asterisk
include files (i.e. the "apxs" and "kbuild" way).

Obviously, (b) would be a lot more robust and simpler to maintain.

Tilghman wrote the following makefile, and we've been copying it into our
source tree (sigh) and using it.  It works great.  We'll swear by it.

We just would like to go the final step and have it be in the source tree
permanently.

====================================================================== 

---------------------------------------------------------------------- 
 (0109714) pprindeville (reporter) - 2009-08-26 20:31
 https://issues.asterisk.org/view.php?id=15759#c109714 
---------------------------------------------------------------------- 
I think the operative parts here are "build Asterisk, install it, then
build the out-of-tree module", especially the "install it".

In a cross-compilation environment, there's nothing to install (again,
much like cross-compilation with Kbuild or apxs).

Yeah, you can probably set all of the required Make variables, and include
all the right files and eventually figure it out yourself... but why?  You
set three variables with this file:

ASTSRC
LOADABLE_MODS
LIBS (which may be empty)

and you're golden.  It would be hard to make it any easier than that. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-08-26 20:31 pprindeville   Note Added: 0109714                          
======================================================================




More information about the asterisk-bugs mailing list