1999-12-05 07:16:40 +00:00
#
2012-10-18 14:17:40 +00:00
# Asterisk -- An open source telephony toolkit.
2012-01-30 21:21:16 +00:00
#
1999-12-05 07:16:40 +00:00
# Top level Makefile
#
2010-07-24 20:49:39 +00:00
# Copyright (C) 1999-2010, Digium, Inc.
1999-12-05 07:16:40 +00:00
#
2005-06-06 18:29:57 +00:00
# Mark Spencer <markster@digium.com>
1999-12-05 07:16:40 +00:00
#
# This program is free software, distributed under the terms of
# the GNU General Public License
#
2006-07-15 20:12:28 +00:00
# All Makefiles use the following variables:
#
2009-07-21 13:28:04 +00:00
# ASTCFLAGS - compiler options provided by the user (if any)
# _ASTCFLAGS - compiler options provided by the build system
# ASTLDFLAGS - linker flags (not libraries) provided by the user (if any)
# _ASTLDFLAGS - linker flags (not libraries) provided by the build system
2006-07-15 20:12:28 +00:00
# LIBS - additional libraries, at top-level for all links,
# on a single object just for that object
2012-01-30 21:21:16 +00:00
# SOLINK - linker flags used only for creating dynamically loadable modules
# as .so files
# DYLINK - linker flags used only for creating shared libaries
# (.so files on Unix-type platforms, .dylib on Darwin)
2006-07-15 20:12:28 +00:00
#
2009-07-21 13:28:04 +00:00
# Values for ASTCFLAGS and ASTLDFLAGS can be specified in the
2006-09-29 18:54:21 +00:00
# environment when running make, as follows:
#
2007-12-18 08:20:17 +00:00
# $ ASTCFLAGS="-Werror" make ...
#
2009-07-21 13:28:04 +00:00
# or as a variable value on the make command line itself:
2007-12-18 08:20:17 +00:00
#
# $ make ASTCFLAGS="-Werror" ...
2007-12-10 04:18:07 +00:00
2007-12-10 01:54:40 +00:00
export A S T T O P D I R # Top level dir, used in subdirs' Makefiles
2006-09-29 18:54:21 +00:00
export ASTERISKVERSION
export ASTERISKVERSIONNUM
2007-12-10 01:54:40 +00:00
#--- values used for default paths
# DESTDIR is the staging (or final) directory where files are copied
# during the install process. Define it before 'export', otherwise
# export will set it to the empty string making ?= fail.
2011-12-07 20:15:29 +00:00
# Trying to run asterisk from the DESTDIR is completely unsupported
# behavior.
2007-12-10 01:54:40 +00:00
# WARNING: do not put spaces or comments after the value.
DESTDIR ?= $( INSTALL_PATH)
export DESTDIR
2012-03-08 16:12:11 +00:00
export I N S T A L L _ P A T H # Additional prefix for the following paths
export A S T E T C D I R # Path for config files
2006-09-29 18:54:21 +00:00
export ASTVARRUNDIR
export ASTSPOOLDIR
export ASTVARLIBDIR
export ASTDATADIR
2008-01-24 22:58:10 +00:00
export ASTDBDIR
2006-09-29 18:54:21 +00:00
export ASTLOGDIR
2006-11-28 18:28:07 +00:00
export ASTLIBDIR
2012-01-30 21:21:16 +00:00
export ASTMODDIR
2006-11-28 18:28:07 +00:00
export ASTMANDIR
export ASTHEADERDIR
export ASTSBINDIR
2006-09-29 18:54:21 +00:00
export AGI_DIR
export ASTCONFPATH
2010-05-05 00:22:32 +00:00
export ASTKEYDIR
2007-12-10 01:54:40 +00:00
2012-03-08 16:12:11 +00:00
export O S A R C H # Operating system
2007-12-10 01:54:40 +00:00
2012-03-08 16:12:11 +00:00
export N O I S Y _ B U I L D # Used in Makefile.rules
export M E N U S E L E C T _ C F L A G S # Options selected in menuselect.
export A S T _ D E V M O D E # Set to "yes" for additional compiler
# and runtime checks
2012-03-08 16:21:49 +00:00
export A S T _ D E V M O D E _ S T R I C T # Enables shadow warnings (-Wshadow)
2007-12-10 01:54:40 +00:00
2012-03-08 16:12:11 +00:00
export _ S O L I N K # linker flags for all shared objects
export S O L I N K # linker flags for loadable modules
export D Y L I N K # linker flags for shared libraries
export S T A T I C _ B U I L D # Additional cflags, set to -static
# for static builds. Probably
# should go directly to ASTLDFLAGS
2007-12-10 01:54:40 +00:00
#--- paths to various commands
2013-04-08 18:24:50 +00:00
# The makeopts include below tries to set these if they're found during
# configure.
2006-09-29 18:54:21 +00:00
export CC
export CXX
export AR
export RANLIB
export HOST_CC
2010-06-04 19:40:00 +00:00
export BUILD_CC
2006-09-29 18:54:21 +00:00
export INSTALL
2006-11-01 22:54:15 +00:00
export STRIP
2006-12-01 23:20:17 +00:00
export DOWNLOAD
2007-12-17 07:25:35 +00:00
export AWK
2007-08-22 18:54:30 +00:00
export GREP
2008-11-19 00:27:45 +00:00
export MD5
2010-02-18 04:20:11 +00:00
export WGET_EXTRA_ARGS
2012-01-30 21:21:16 +00:00
export LDCONFIG
export LDCONFIG_FLAGS
2012-06-25 17:59:34 +00:00
export PYTHON
2016-10-03 16:30:43 +00:00
export TAR
export PATCH
export SED
export NM
1999-12-05 07:16:40 +00:00
2016-01-27 16:29:13 +00:00
# makeopts is required unless the goal is clean or distclean
i f e q ( $( findstring clean ,$ ( MAKECMDGOALS ) ) , )
i n c l u d e m a k e o p t s
e n d i f
2006-08-21 02:11:39 +00:00
2009-08-28 20:01:21 +00:00
# start the primary CFLAGS and LDFLAGS with any that were provided
# to the configure script
2014-10-19 17:09:38 +00:00
_ASTCFLAGS := $( CONFIG_CFLAGS) $( CONFIG_SIGNED_CHAR)
2009-08-28 20:01:21 +00:00
_ASTLDFLAGS := $( CONFIG_LDFLAGS)
2007-08-22 16:22:27 +00:00
# Some build systems, such as the one in openwrt, like to pass custom target
2009-08-28 20:01:21 +00:00
# CFLAGS and LDFLAGS in the COPTS and LDOPTS variables; these should also
# go before any build-system computed flags, since they are defaults, not
# overrides
_ASTCFLAGS += $( COPTS)
_ASTLDFLAGS += $( LDOPTS)
2007-08-22 16:22:27 +00:00
2008-11-01 21:10:07 +00:00
# libxml2 cflags
2009-07-21 13:28:04 +00:00
_ASTCFLAGS += $( LIBXML2_INCLUDE)
2008-11-01 21:10:07 +00:00
2017-06-06 19:54:43 +00:00
# BIND_8_COMPAT
_ASTCFLAGS += $( BIND8_CFLAGS)
2006-07-06 23:18:45 +00:00
#Uncomment this to see all build commands instead of 'quiet' output
#NOISY_BUILD=yes
2008-01-29 17:22:47 +00:00
empty :=
space := $( empty) $( empty)
ASTTOPDIR := $( subst $( space) ,\$ ( space) ,$( CURDIR) )
2006-02-23 22:38:47 +00:00
2015-10-30 18:22:23 +00:00
# Overwite config files on "make samples" or other config installation targets
2005-11-07 22:33:12 +00:00
OVERWRITE = y
2003-03-18 06:00:18 +00:00
2006-04-06 17:13:00 +00:00
# Include debug and macro symbols in the executables (-g) and profiling info (-pg)
2006-05-11 13:15:10 +00:00
DEBUG = -g3
2003-03-18 06:00:18 +00:00
2006-04-07 07:04:05 +00:00
# Asterisk.conf is located in ASTETCDIR or by using the -C flag
# when starting Asterisk
ASTCONFPATH = $( ASTETCDIR) /asterisk.conf
2006-04-15 22:53:53 +00:00
AGI_DIR = $( ASTDATADIR) /agi-bin
2006-04-07 07:04:05 +00:00
# If you use Apache, you may determine by a grep 'DocumentRoot' of your httpd.conf file
HTTP_DOCSDIR = /var/www/html
# Determine by a grep 'ScriptAlias' of your Apache httpd.conf file
HTTP_CGIDIR = /var/www/cgi-bin
1999-12-05 07:16:40 +00:00
2010-04-02 18:57:58 +00:00
# If your platform's linker expects a prefix on symbols generated from compiling C
# source files, set LINKER_SYMBOL_PREFIX to that value. On some systems, exported symbols
# from C source files are prefixed with '_', for example. If this value is not set
# properly, the linker scripts that live in the '*.exports' files in various places
# in this tree will unintentionally suppress symbols that should be visible
# in the final binary objects.
LINKER_SYMBOL_PREFIX =
2006-04-06 17:13:00 +00:00
# Uncomment this to use the older DSP routines
2009-07-21 13:28:04 +00:00
#_ASTCFLAGS+=-DOLD_DSP_ROUTINES
2005-07-14 19:40:15 +00:00
2014-09-18 15:07:12 +00:00
# Default install directory for DAHDI hooks.
DAHDI_UDEV_HOOK_DIR = /usr/share/dahdi/span_config.d
2005-07-14 19:40:15 +00:00
# If the file .asterisk.makeopts is present in your home directory, you can
2006-04-24 17:11:45 +00:00
# include all of your favorite menuselect options so that every time you download
2012-01-30 21:21:16 +00:00
# a new version of Asterisk, you don't have to run menuselect to set them.
2006-04-24 17:11:45 +00:00
# The file /etc/asterisk.makeopts will also be included but can be overridden
2005-07-18 18:34:52 +00:00
# by the file in your home directory.
2015-04-14 07:36:03 +00:00
i f e q ( $( wildcard menuselect .makeopts ) , )
USER_MAKEOPTS = $( wildcard ~/.asterisk.makeopts)
GLOBAL_MAKEOPTS = $( wildcard /etc/asterisk.makeopts)
e l s e
USER_MAKEOPTS =
GLOBAL_MAKEOPTS =
e n d i f
2006-04-24 17:11:45 +00:00
2011-08-17 19:30:50 +00:00
MOD_SUBDIR_CFLAGS = " -I $( ASTTOPDIR) /include "
OTHER_SUBDIR_CFLAGS = " -I $( ASTTOPDIR) /include "
2005-07-14 19:40:15 +00:00
2007-12-10 01:54:40 +00:00
# Create OPTIONS variable, but probably we can assign directly to ASTCFLAGS
OPTIONS =
2009-07-21 13:28:04 +00:00
i f e q ( $( findstring -save -temps ,$ ( _ASTCFLAGS ) $ ( ASTCFLAGS ) ) , )
ifeq ( $( findstring -pipe,$( _ASTCFLAGS) $( ASTCFLAGS) ) ,)
_ASTCFLAGS += -pipe
2008-07-29 23:00:45 +00:00
endif
e n d i f
2009-07-21 13:28:04 +00:00
i f e q ( $( findstring -Wall ,$ ( _ASTCFLAGS ) $ ( ASTCFLAGS ) ) , )
_ASTCFLAGS += -Wall
2007-10-29 22:05:17 +00:00
e n d i f
2015-03-12 12:40:23 +00:00
_ASTCFLAGS += -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $( AST_NESTED_FUNCTIONS) $( AST_CLANG_BLOCKS) $( DEBUG)
2011-01-06 17:50:57 +00:00
ADDL_TARGETS =
2006-04-24 17:11:45 +00:00
i f e q ( $( AST_DEVMODE ) , y e s )
2009-07-21 13:28:04 +00:00
_ASTCFLAGS += -Werror
_ASTCFLAGS += -Wunused
_ASTCFLAGS += $( AST_DECLARATION_AFTER_STATEMENT)
2012-06-01 16:33:25 +00:00
_ASTCFLAGS += $( AST_TRAMPOLINES)
2012-01-30 21:21:16 +00:00
_ASTCFLAGS += -Wundef
2009-07-21 13:28:04 +00:00
_ASTCFLAGS += -Wmissing-format-attribute
2009-08-01 01:04:06 +00:00
_ASTCFLAGS += -Wformat= 2
2012-03-08 16:21:49 +00:00
ifeq ( $( AST_DEVMODE_STRICT) ,yes)
_ASTCFLAGS += -Wshadow
endif
2011-01-06 17:50:57 +00:00
ADDL_TARGETS += validate-docs
2006-04-24 17:11:45 +00:00
e n d i f
2006-08-21 02:11:39 +00:00
i f n e q ( $( findstring BSD ,$ ( OSARCH ) ) , )
2009-08-04 14:53:00 +00:00
_ASTCFLAGS += -isystem /usr/local/include
2005-09-26 02:08:06 +00:00
e n d i f
2005-11-05 18:58:27 +00:00
i f e q ( $( OSARCH ) , F r e e B S D )
2006-08-25 20:10:56 +00:00
# -V is understood by BSD Make, not by GNU make.
BSDVERSION = $( shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk)
2009-07-21 13:28:04 +00:00
_ASTCFLAGS += $( shell if test $( BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE" ; fi )
2006-08-21 02:11:39 +00:00
e n d i f
2004-06-22 17:42:14 +00:00
2005-11-05 18:58:27 +00:00
i f e q ( $( OSARCH ) , N e t B S D )
2009-07-21 13:28:04 +00:00
_ASTCFLAGS += -pthread -I/usr/pkg/include
2004-08-31 13:32:11 +00:00
e n d i f
2005-11-05 18:58:27 +00:00
i f e q ( $( OSARCH ) , O p e n B S D )
2009-07-21 13:28:04 +00:00
_ASTCFLAGS += -pthread -ftrampolines
2003-04-27 18:13:11 +00:00
e n d i f
2005-08-30 02:54:02 +00:00
2005-11-05 18:58:27 +00:00
i f e q ( $( OSARCH ) , S u n O S )
2009-11-03 19:59:46 +00:00
_ASTCFLAGS += -Wcast-align -DSOLARIS -I../include/solaris-compat -I/opt/ssl/include -I/usr/local/ssl/include -D_XPG4_2 -D__EXTENSIONS__
2004-12-14 23:36:30 +00:00
e n d i f
2002-06-21 01:40:13 +00:00
2013-04-08 18:24:50 +00:00
i f n e q ( $( GREP ) , )
ASTERISKVERSION:= $( shell GREP = $( GREP) AWK = $( AWK) GIT = $( GIT) build_tools/make_version .)
e n d i f
i f n e q ( $( AWK ) , )
ifneq ( $( wildcard .version) ,)
ASTERISKVERSIONNUM:= $( shell $( AWK) -F. '{printf "%01d%02d%02d", $$1, $$2, $$3}' .version)
endif
2005-08-30 02:54:02 +00:00
e n d i f
2005-07-12 02:08:03 +00:00
2006-06-19 15:17:32 +00:00
i f n e q ( $( wildcard .svn ) , )
2007-12-10 01:54:40 +00:00
ASTERISKVERSIONNUM:= 999999
2005-08-30 02:54:02 +00:00
e n d i f
2003-02-04 16:35:12 +00:00
2009-07-21 13:28:04 +00:00
_ASTCFLAGS += $( OPTIONS)
2005-12-27 06:24:28 +00:00
build-system: Allow building with static pjproject
Background here:
http://lists.digium.com/pipermail/asterisk-dev/2016-January/075266.html
From CHANGES:
* To help insure that Asterisk is compiled and run with the same known
version of pjproject, a new option (--with-pjproject-bundled) has been
added to ./configure. When specified, the version of pjproject specified
in third-party/versions.mak will be downloaded and configured. When you
make Asterisk, the build process will also automatically build pjproject
and Asterisk will be statically linked to it. Once a particular version
of pjproject is configured and built, it won't be configured or built
again unless you run a 'make distclean'.
To facilitate testing, when 'make install' is run, the pjsua and pjsystest
utilities and the pjproject python bindings will be installed in
ASTDATADIR/third-party/pjproject.
The default behavior remains building with the shared pjproject
installation, if any.
Building:
All you have to do is include the --with-pjproject-bundled option on
the ./configure command line (and remove any existing --with-pjproject
option if specified). Everything else is automatic.
Behind the scenes:
The top-level Makefile was modified to include 'third-party' in the
list of MOD_SUBDIRS.
The third-party directory was created to contain any third party
packages that may be needed in the future. Its Makefile automatically
iterates over any subdirectories passing on targets.
The third-party/pjproject directory was created to house the pjproject
source distribution. Its Makefile contains targets to download, patch
configure, generate dependencies, compile libs, apps and python bindings,
sanitized build.mak and generate a symbols list.
When bootstrap.sh is run, it automatically includes the configure.m4
file in third-party/pjproject. This file has a macro to download and
conifgure pjproject and get and set PJPROJECT_INCLUDE, PJPROJECT_DIR
and PJPROJECT_BUNDLED. It also tests for the capabilities like
PJ_TRANSACTION_GRP_LOCK by parsing preprocessor output as opposed to
trying to compile. Of course, bootstrap.sh is only run once and the
configure file is incldued in the patch.
When configure is run with the new options, the macro in configure.m4
triggers the download, patch, conifgure and tests. No compilation is
performed at this time. The downloaded tarball is cached in /tmp so
it doesn't get downloaded again on a distclean.
When make is run in the top-level Asterisk source directory, it will
automatically descend all the subdirectories in third_party just as it
does for addons, apps, etc. The top-level Makefile makes sure that
the 'third-party' is built before 'main' so that dependencies from the
other directories are built first.
When main does build, a new shared library (libasteriskpj) is created that
links statically to the pjproject .a files and exports all their symbols.
The asterisk binary links to that, just as it does with libasteriskssl.
When Asterisk is installed, the pjsua and pjsystest apps, and the pjproject
python bindings are installed in ASTDATADIR/third-party/pjproject. This
will facilitate testing, including running the testsuite which will be
updated to check that directory for the pjsua module ahead of the system
python library.
Modules should continue to depend on pjproject if they use pjproject APIs
directly. They should not care about the implementation. No changes to any
res_pjsip modules were made.
Change-Id: Ia7a60c28c2e9ba9537c5570f933c1ebcb20a3103
2016-01-19 03:54:28 +00:00
MOD_SUBDIRS := third-party channels pbx apps codecs formats cdr cel bridges funcs tests main res addons $( LOCAL_MOD_SUBDIRS)
2014-10-31 03:09:48 +00:00
OTHER_SUBDIRS := utils agi contrib
2007-11-17 14:44:03 +00:00
SUBDIRS := $( OTHER_SUBDIRS) $( MOD_SUBDIRS)
2006-06-22 12:48:25 +00:00
SUBDIRS_INSTALL := $( SUBDIRS:%= %-install)
2006-06-22 14:31:52 +00:00
SUBDIRS_CLEAN := $( SUBDIRS:%= %-clean)
2007-10-01 21:54:41 +00:00
SUBDIRS_DIST_CLEAN := $( SUBDIRS:%= %-dist-clean)
2006-06-22 15:38:13 +00:00
SUBDIRS_UNINSTALL := $( SUBDIRS:%= %-uninstall)
2007-12-17 07:25:35 +00:00
MOD_SUBDIRS_MENUSELECT_TREE := $( MOD_SUBDIRS:%= %-menuselect-tree)
2005-08-30 02:54:02 +00:00
2006-08-21 02:11:39 +00:00
i f n e q ( $( findstring darwin ,$ ( OSARCH ) ) , )
2013-06-19 22:52:23 +00:00
_ASTCFLAGS += -D__Darwin__ -mmacosx-version-min= 10.6
2015-06-02 20:07:08 +00:00
_SOLINK = -mmacosx-version-min= 10.6 -Wl,-undefined,dynamic_lookup
2013-01-18 22:42:38 +00:00
_SOLINK += /usr/lib/bundle1.o
2012-01-30 21:21:16 +00:00
SOLINK = -bundle $( _SOLINK)
2015-06-02 20:07:08 +00:00
DYLINK = -Wl,-dylib $( _SOLINK)
2010-01-11 22:06:38 +00:00
_ASTLDFLAGS += -L/usr/local/lib
2005-08-31 03:32:15 +00:00
e l s e
2006-04-06 17:13:00 +00:00
# These are used for all but Darwin
2008-10-14 10:33:14 +00:00
SOLINK = -shared
2012-01-30 21:21:16 +00:00
DYLINK = $( SOLINK)
2006-08-21 02:11:39 +00:00
ifneq ( $( findstring BSD,$( OSARCH) ) ,)
2009-07-27 15:38:59 +00:00
_ASTLDFLAGS += -L/usr/local/lib
2006-01-27 05:33:20 +00:00
endif
2003-10-27 20:00:41 +00:00
e n d i f
2005-08-30 02:54:02 +00:00
2013-01-18 21:35:09 +00:00
# Include rpath settings
_ASTLDFLAGS += $( AST_RPATH)
2005-11-05 18:58:27 +00:00
i f e q ( $( OSARCH ) , S u n O S )
2008-07-03 22:23:04 +00:00
SOLINK = -shared -fpic -L/usr/local/ssl/lib -lrt
2012-01-30 21:21:16 +00:00
DYLINK = $( SOLINK)
2005-09-08 00:34:19 +00:00
e n d i f
2008-10-18 10:27:22 +00:00
i f e q ( $( OSARCH ) , O p e n B S D )
SOLINK = -shared -fpic
2012-01-30 21:21:16 +00:00
DYLINK = $( SOLINK)
2008-10-18 10:27:22 +00:00
e n d i f
2007-12-17 07:25:35 +00:00
# comment to print directories during submakes
2007-12-17 16:48:01 +00:00
#PRINT_DIR=yes
2007-12-17 07:25:35 +00:00
2009-06-16 20:50:41 +00:00
i f n e q ( $( INSIDE_EMACS ) , )
PRINT_DIR = yes
e n d i f
2008-01-03 23:14:15 +00:00
SILENTMAKE := $( MAKE) --quiet --no-print-directory
2007-12-17 16:48:01 +00:00
i f n e q ( $( PRINT_DIR ) $( NOISY_BUILD ) , )
2008-08-11 16:14:29 +00:00
SUBMAKE := $( MAKE)
2007-12-17 16:48:01 +00:00
e l s e
2008-01-03 23:14:15 +00:00
SUBMAKE := $( MAKE) --quiet --no-print-directory
2007-12-17 16:48:01 +00:00
e n d i f
2007-12-17 07:25:35 +00:00
2007-11-05 18:00:24 +00:00
# $(MAKE) is printed in several places, and we want it to be a
# fixed size string. Define a variable whose name has also the
# same size, so we can easily align text.
i f e q ( $( MAKE ) , g m a k e )
mK = "gmake"
e l s e
mK = " make"
e n d i f
2013-02-04 19:52:14 +00:00
all : _all
2012-01-30 21:21:16 +00:00
@echo " +--------- Asterisk Build Complete ---------+"
@echo " + Asterisk has successfully been built, and +"
2006-09-09 03:27:21 +00:00
@echo " + can be installed by running: +"
2000-01-05 20:03:55 +00:00
@echo " + +"
2012-01-30 21:21:16 +00:00
@echo " + $( mK) install + "
@echo " +-------------------------------------------+"
2000-01-05 20:03:55 +00:00
2013-02-04 19:52:14 +00:00
full : _full
2012-06-25 17:59:34 +00:00
@echo " +--------- Asterisk Build Complete ---------+"
@echo " + Asterisk has successfully been built, and +"
@echo " + can be installed by running: +"
@echo " + +"
@echo " + $( mK) install + "
@echo " +-------------------------------------------+"
2012-01-17 19:45:19 +00:00
_all : makeopts $( SUBDIRS ) doc /core -en_US .xml $( ADDL_TARGETS )
2006-09-22 23:45:14 +00:00
2013-02-04 19:52:14 +00:00
_full : makeopts $( SUBDIRS ) doc /full -en_US .xml $( ADDL_TARGETS )
2012-06-25 17:59:34 +00:00
2006-08-21 03:58:02 +00:00
makeopts : configure
2006-04-24 17:11:45 +00:00
@echo "****"
2012-01-30 21:21:16 +00:00
@echo " **** The configure script must be executed before running ' $( MAKE) '. "
2007-05-09 13:24:38 +00:00
@echo "**** Please run \"./configure\"."
2006-04-24 17:11:45 +00:00
@echo "****"
2006-04-24 17:24:03 +00:00
@exit 1
2006-04-24 17:11:45 +00:00
2009-10-23 14:02:42 +00:00
menuselect.makeopts : menuselect /menuselect menuselect -tree makeopts build_tools /menuselect -deps $( GLOBAL_MAKEOPTS ) $( USER_MAKEOPTS )
2015-04-14 07:36:03 +00:00
i f e q ( $( filter %.menuselect ,$ ( MAKECMDGOALS ) ) , )
2009-12-10 21:01:39 +00:00
menuselect/menuselect --check-deps $@
2009-10-23 14:02:42 +00:00
menuselect/menuselect --check-deps $@ $( GLOBAL_MAKEOPTS) $( USER_MAKEOPTS)
2010-02-15 23:43:28 +00:00
e n d i f
2006-06-26 14:38:55 +00:00
2007-12-17 07:25:35 +00:00
$(MOD_SUBDIRS_MENUSELECT_TREE) :
2009-06-09 18:08:53 +00:00
+@$( SUBMAKE) -C $( @:-menuselect-tree= ) SUBDIR = $( @:-menuselect-tree= ) moduleinfo
+@$( SUBMAKE) -C $( @:-menuselect-tree= ) SUBDIR = $( @:-menuselect-tree= ) makeopts
2002-09-02 15:20:28 +00:00
2017-03-24 12:43:05 +00:00
$(SUBDIRS) : makeopts .lastclean main /version .c include /asterisk /build .h include /asterisk /buildopts .h defaults .h
2005-04-29 15:18:10 +00:00
2007-11-17 11:57:52 +00:00
i f e q ( $( findstring $ ( OSARCH ) , mingw 32 cygwin ) , )
build-system: Allow building with static pjproject
Background here:
http://lists.digium.com/pipermail/asterisk-dev/2016-January/075266.html
From CHANGES:
* To help insure that Asterisk is compiled and run with the same known
version of pjproject, a new option (--with-pjproject-bundled) has been
added to ./configure. When specified, the version of pjproject specified
in third-party/versions.mak will be downloaded and configured. When you
make Asterisk, the build process will also automatically build pjproject
and Asterisk will be statically linked to it. Once a particular version
of pjproject is configured and built, it won't be configured or built
again unless you run a 'make distclean'.
To facilitate testing, when 'make install' is run, the pjsua and pjsystest
utilities and the pjproject python bindings will be installed in
ASTDATADIR/third-party/pjproject.
The default behavior remains building with the shared pjproject
installation, if any.
Building:
All you have to do is include the --with-pjproject-bundled option on
the ./configure command line (and remove any existing --with-pjproject
option if specified). Everything else is automatic.
Behind the scenes:
The top-level Makefile was modified to include 'third-party' in the
list of MOD_SUBDIRS.
The third-party directory was created to contain any third party
packages that may be needed in the future. Its Makefile automatically
iterates over any subdirectories passing on targets.
The third-party/pjproject directory was created to house the pjproject
source distribution. Its Makefile contains targets to download, patch
configure, generate dependencies, compile libs, apps and python bindings,
sanitized build.mak and generate a symbols list.
When bootstrap.sh is run, it automatically includes the configure.m4
file in third-party/pjproject. This file has a macro to download and
conifgure pjproject and get and set PJPROJECT_INCLUDE, PJPROJECT_DIR
and PJPROJECT_BUNDLED. It also tests for the capabilities like
PJ_TRANSACTION_GRP_LOCK by parsing preprocessor output as opposed to
trying to compile. Of course, bootstrap.sh is only run once and the
configure file is incldued in the patch.
When configure is run with the new options, the macro in configure.m4
triggers the download, patch, conifgure and tests. No compilation is
performed at this time. The downloaded tarball is cached in /tmp so
it doesn't get downloaded again on a distclean.
When make is run in the top-level Asterisk source directory, it will
automatically descend all the subdirectories in third_party just as it
does for addons, apps, etc. The top-level Makefile makes sure that
the 'third-party' is built before 'main' so that dependencies from the
other directories are built first.
When main does build, a new shared library (libasteriskpj) is created that
links statically to the pjproject .a files and exports all their symbols.
The asterisk binary links to that, just as it does with libasteriskssl.
When Asterisk is installed, the pjsua and pjsystest apps, and the pjproject
python bindings are installed in ASTDATADIR/third-party/pjproject. This
will facilitate testing, including running the testsuite which will be
updated to check that directory for the pjsua module ahead of the system
python library.
Modules should continue to depend on pjproject if they use pjproject APIs
directly. They should not care about the implementation. No changes to any
res_pjsip modules were made.
Change-Id: Ia7a60c28c2e9ba9537c5570f933c1ebcb20a3103
2016-01-19 03:54:28 +00:00
main : third -party
2007-11-17 11:57:52 +00:00
e l s e
2007-11-17 19:00:07 +00:00
# Windows: we need to build main (i.e. the asterisk dll) first,
# followed by res, followed by the other directories, because
# dll symbols must be resolved during linking and not at runtime.
D1 := $( filter-out main,$( MOD_SUBDIRS) )
D1 := $( filter-out res,$( D1) )
2007-11-17 11:57:52 +00:00
2007-11-17 19:00:07 +00:00
$(D1) : res
2007-11-17 11:57:52 +00:00
res : main
e n d i f
2005-04-29 15:18:10 +00:00
2013-02-04 19:52:14 +00:00
$(MOD_SUBDIRS) : makeopts
2009-09-24 18:19:41 +00:00
+@_ASTCFLAGS= " $( MOD_SUBDIR_CFLAGS) $( _ASTCFLAGS) " ASTCFLAGS = " $( ASTCFLAGS) " _ASTLDFLAGS = " $( _ASTLDFLAGS) " ASTLDFLAGS = " $( ASTLDFLAGS) " $( SUBMAKE) --no-builtin-rules -C $@ SUBDIR = $@ all
2005-04-29 15:18:10 +00:00
2013-02-04 19:52:14 +00:00
$(OTHER_SUBDIRS) : makeopts
2009-09-24 18:19:41 +00:00
+@_ASTCFLAGS= " $( OTHER_SUBDIR_CFLAGS) $( _ASTCFLAGS) " ASTCFLAGS = " $( ASTCFLAGS) " _ASTLDFLAGS = " $( _ASTLDFLAGS) " ASTLDFLAGS = " $( ASTLDFLAGS) " $( SUBMAKE) --no-builtin-rules -C $@ SUBDIR = $@ all
2005-04-29 15:18:10 +00:00
2013-04-15 17:26:49 +00:00
defaults.h : makeopts .lastclean build_tools /make_defaults_h
2006-05-10 14:35:38 +00:00
@build_tools/make_defaults_h > $@ .tmp
2007-12-16 10:34:55 +00:00
@cmp -s $@ .tmp $@ || mv $@ .tmp $@
2006-05-10 14:35:38 +00:00
@rm -f $@ .tmp
2005-06-06 03:04:58 +00:00
2015-10-31 03:57:58 +00:00
main/version.c : FORCE menuselect .makeopts .lastclean
Now that the version.h file was getting properly regenerated every time the svn
revision changed, every module that used the version was getting rebuilt after
every svn update. This severly annoyed me pretty quickly, so I have improved
the situation.
Now, instead of generating version.h, main/version.c is generated. version.c
includes the version information, as well as a couple of API calls for modules
to retrieve the version. So now, only version.c will get rebuilt, and the main
asterisk binary relinked, which is must faster than rebuilding http.c, manager.c,
asterisk.c, relinking the asterisk binary, chan_sip.c, func_version.c, res_agi ...
The only minor change in behavior here is that the version information reported by
chan_sip, for example, is the version of the Asterisk core, and not necessarily the
Asterisk version that the chan_sip module came from.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@96717 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-05 22:09:06 +00:00
@build_tools/make_version_c > $@ .tmp
2007-12-16 10:34:55 +00:00
@cmp -s $@ .tmp $@ || mv $@ .tmp $@
2006-05-10 14:35:38 +00:00
@rm -f $@ .tmp
2001-05-09 03:11:22 +00:00
2013-04-15 17:26:49 +00:00
include/asterisk/buildopts.h : menuselect .makeopts .lastclean
2006-05-11 09:50:41 +00:00
@build_tools/make_buildopts_h > $@ .tmp
2007-12-16 10:34:55 +00:00
@cmp -s $@ .tmp $@ || mv $@ .tmp $@
2006-05-11 09:50:41 +00:00
@rm -f $@ .tmp
2013-04-15 17:26:49 +00:00
# build.h must depend on .lastclean, or parallel make may wipe it out after it's
# been created.
include/asterisk/build.h : .lastclean
@build_tools/make_build_h > $@
2006-10-22 04:44:43 +00:00
2006-06-22 14:31:52 +00:00
$(SUBDIRS_CLEAN) :
2009-06-09 18:08:53 +00:00
+@$( SUBMAKE) -C $( @:-clean= ) clean
1999-12-05 07:16:40 +00:00
2007-10-01 21:54:41 +00:00
$(SUBDIRS_DIST_CLEAN) :
2009-06-09 18:08:53 +00:00
+@$( SUBMAKE) -C $( @:-dist-clean= ) dist-clean
2007-10-01 21:54:41 +00:00
2008-11-15 19:45:19 +00:00
clean : $( SUBDIRS_CLEAN ) _clean
_clean :
2005-06-06 03:04:58 +00:00
rm -f defaults.h
rm -f include/asterisk/build.h
Now that the version.h file was getting properly regenerated every time the svn
revision changed, every module that used the version was getting rebuilt after
every svn update. This severly annoyed me pretty quickly, so I have improved
the situation.
Now, instead of generating version.h, main/version.c is generated. version.c
includes the version information, as well as a couple of API calls for modules
to retrieve the version. So now, only version.c will get rebuilt, and the main
asterisk binary relinked, which is must faster than rebuilding http.c, manager.c,
asterisk.c, relinking the asterisk binary, chan_sip.c, func_version.c, res_agi ...
The only minor change in behavior here is that the version information reported by
chan_sip, for example, is the version of the Asterisk core, and not necessarily the
Asterisk version that the chan_sip module came from.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@96717 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-05 22:09:06 +00:00
rm -f main/version.c
2012-06-25 17:59:34 +00:00
rm -f doc/core-en_US.xml
rm -f doc/full-en_US.xml
2013-09-03 17:19:30 +00:00
rm -f doc/rest-api/*.wiki
2015-05-07 19:54:35 +00:00
rm -f doxygen.log
rm -rf latex
2013-09-03 17:19:30 +00:00
rm -f rest-api-templates/*.pyc
2006-06-24 04:42:35 +00:00
@$( MAKE) -C menuselect clean
2006-09-09 03:27:21 +00:00
cp -f .cleancount .lastclean
1999-12-05 07:16:40 +00:00
2006-07-01 14:25:43 +00:00
dist-clean : distclean
2006-04-28 17:39:54 +00:00
2008-11-15 19:45:19 +00:00
distclean : $( SUBDIRS_DIST_CLEAN ) _clean
2006-06-24 04:42:35 +00:00
@$( MAKE) -C menuselect dist-clean
2006-06-22 14:31:52 +00:00
@$( MAKE) -C sounds dist-clean
2006-08-23 03:07:34 +00:00
rm -f menuselect.makeopts makeopts menuselect-tree menuselect.makedeps
2008-03-17 17:31:46 +00:00
rm -f config.log config.status config.cache
2006-06-23 02:15:35 +00:00
rm -rf autom4te.cache
2006-07-01 14:29:06 +00:00
rm -f include/asterisk/autoconfig.h
2006-05-11 09:50:41 +00:00
rm -f include/asterisk/buildopts.h
2006-06-23 08:32:19 +00:00
rm -rf doc/api
2015-05-07 19:54:35 +00:00
rm -f doc/asterisk-ng-doxygen
2006-07-01 04:37:52 +00:00
rm -f build_tools/menuselect-deps
2006-04-24 17:11:45 +00:00
2013-02-04 19:52:14 +00:00
datafiles : _all doc /core -en_US .xml
2011-08-17 19:30:50 +00:00
CFLAGS = " $( _ASTCFLAGS) $( ASTCFLAGS) " build_tools/mkpkgconfig " $( DESTDIR) $( libdir) /pkgconfig " ;
2010-07-23 13:26:41 +00:00
2013-10-18 21:51:01 +00:00
# # Recursively install contents of the static-http directory, in case
# # extra content is provided there. See contrib/scripts/get_swagger_ui.sh
find static-http | while read x; do \
if test -d $$ x; then \
$( INSTALL) -m 755 -d " $( DESTDIR) $( ASTDATADIR) / $$ x " ; \
else \
$( INSTALL) -m 644 $$ x " $( DESTDIR) $( ASTDATADIR) / $$ x " ; \
fi \
2006-04-01 08:49:54 +00:00
done
2011-08-17 19:30:50 +00:00
$( INSTALL) -m 644 doc/core-en_US.xml " $( DESTDIR) $( ASTDATADIR) /static-http " ;
2013-12-11 12:31:57 +00:00
$( INSTALL) -m 644 doc/appdocsxml.xslt " $( DESTDIR) $( ASTDATADIR) /static-http " ;
2008-01-07 17:09:23 +00:00
if [ -d doc/tex/asterisk ] ; then \
2010-12-27 20:42:01 +00:00
$( INSTALL) -d " $( DESTDIR) $( ASTDATADIR) /static-http/docs " ; \
2010-07-23 13:26:41 +00:00
for n in doc/tex/asterisk/* ; do \
2010-12-27 20:42:01 +00:00
$( INSTALL) -m 644 $$ n " $( DESTDIR) $( ASTDATADIR) /static-http/docs " ; \
2010-07-23 13:26:41 +00:00
done \
2008-01-07 17:09:23 +00:00
fi
2001-09-24 21:29:03 +00:00
for x in images/*.jpg; do \
2011-08-17 19:30:50 +00:00
$( INSTALL) -m 644 $$ x " $( DESTDIR) $( ASTDATADIR) /images " ; \
2001-09-24 21:29:03 +00:00
done
2006-06-07 21:05:05 +00:00
$( MAKE) -C sounds install
2013-04-22 14:58:53 +00:00
find rest-api -name "*.json" | while read x; do \
$( INSTALL) -m 644 $$ x " $( DESTDIR) $( ASTDATADIR) /rest-api " ; \
done
2001-09-24 21:29:03 +00:00
2013-04-08 18:24:50 +00:00
i f n e q ( $( GREP ) , )
XML_core_en_US = $( foreach dir,$( MOD_SUBDIRS) ,$( shell $( GREP) -l "language=\"en_US\"" $( dir) /*.c $( dir) /*.cc 2>/dev/null) )
e n d i f
2013-04-15 17:26:49 +00:00
doc/core-en_US.xml : makeopts .lastclean $( XML_core_en_US )
2009-06-06 21:38:54 +00:00
@printf "Building Documentation For: "
2008-11-02 05:47:13 +00:00
@echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > $@
@echo "<!DOCTYPE docs SYSTEM \"appdocsxml.dtd\">" >> $@
2016-07-19 09:48:25 +00:00
@echo "<?xml-stylesheet type=\"text/xsl\" href=\"appdocsxml.xslt\"?>" >> $@
2009-05-16 20:01:22 +00:00
@echo "<docs xmlns:xi=\"http://www.w3.org/2001/XInclude\">" >> $@
2008-11-01 21:10:07 +00:00
@for x in $( MOD_SUBDIRS) ; do \
2009-06-06 21:38:54 +00:00
printf " $$ x " ; \
2013-05-31 07:57:28 +00:00
for i in ` find $$ x -name '*.c' ` ; do \
2008-11-02 05:47:13 +00:00
$( AWK) -f build_tools/get_documentation $$ i >> $@ ; \
2008-11-01 21:10:07 +00:00
done ; \
done
2008-11-02 05:47:13 +00:00
@echo
@echo "</docs>" >> $@
2008-11-01 21:10:07 +00:00
2013-04-08 18:24:50 +00:00
i f n e q ( $( GREP ) , )
2013-06-25 20:25:55 +00:00
XML_full_en_US = $( foreach dir,$( MOD_SUBDIRS) ,$( shell $( GREP) -l "language=\"en_US\"" $( dir) /*.c $( dir) /*.cc 2>/dev/null) )
2013-04-08 18:24:50 +00:00
e n d i f
2013-04-15 17:26:49 +00:00
doc/full-en_US.xml : makeopts .lastclean $( XML_full_en_US )
2012-06-25 17:59:34 +00:00
ifeq ($(PYTHON), : )
@echo "--------------------------------------------------------------------------"
@echo "--- Please install python to build full documentation ---"
@echo "--------------------------------------------------------------------------"
e l s e
@printf "Building Documentation For: "
@echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > $@
@echo "<!DOCTYPE docs SYSTEM \"appdocsxml.dtd\">" >> $@
2016-07-19 09:48:25 +00:00
@echo "<?xml-stylesheet type=\"text/xsl\" href=\"appdocsxml.xslt\"?>" >> $@
2012-06-25 17:59:34 +00:00
@echo "<docs xmlns:xi=\"http://www.w3.org/2001/XInclude\">" >> $@
@for x in $( MOD_SUBDIRS) ; do \
printf " $$ x " ; \
2013-08-29 16:05:23 +00:00
for i in ` find $$ x -name '*.c' ` ; do \
2012-06-25 17:59:34 +00:00
$( PYTHON) build_tools/get_documentation.py < $$ i >> $@ ; \
done ; \
done
@echo
@echo "</docs>" >> $@
@$( PYTHON) build_tools/post_process_documentation.py -i $@ -o "doc/core-en_US.xml"
e n d i f
2008-11-02 05:55:46 +00:00
validate-docs : doc /core -en_US .xml
2010-07-17 13:10:47 +00:00
ifeq ($(XMLSTARLET)$(XMLLINT), :: )
@echo "--------------------------------------------------------------------------"
@echo "--- Please install xmllint or xmlstarlet to validate the documentation ---"
@echo "--------------------------------------------------------------------------"
2008-11-02 05:55:46 +00:00
e l s e
2010-07-17 13:10:47 +00:00
ifneq ( $( XMLLINT) ,:)
$( XMLLINT) --dtdvalid doc/appdocsxml.dtd --noout $<
else
2008-11-04 20:12:41 +00:00
$( XMLSTARLET) val -d doc/appdocsxml.dtd $<
2010-07-17 13:10:47 +00:00
endif
2008-11-02 05:55:46 +00:00
e n d i f
2012-01-30 21:21:16 +00:00
update :
Merged revisions 7265-7266,7268-7275 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r7265 | oej | 2005-12-01 17:18:14 -0600 (Thu, 01 Dec 2005) | 2 lines
Changing bug report address to the Asterisk issue tracker
........
r7266 | kpfleming | 2005-12-01 17:18:29 -0600 (Thu, 01 Dec 2005) | 3 lines
Makefile 'update' target now supports updating from Subversion repositories (issue #5875)
remove support for 'patches' subdirectory, it's no longer useful
........
r7268 | kpfleming | 2005-12-01 17:34:58 -0600 (Thu, 01 Dec 2005) | 2 lines
ensure channel's scheduling context is freed (issue #5788)
........
r7269 | kpfleming | 2005-12-01 17:49:44 -0600 (Thu, 01 Dec 2005) | 2 lines
don't block waiting for the Festival server forever when it goes away (issue #5882)
........
r7270 | kpfleming | 2005-12-01 18:26:12 -0600 (Thu, 01 Dec 2005) | 2 lines
allow variables to exist on both 'halves' of the Local channel (issue #5810)
........
r7271 | kpfleming | 2005-12-01 18:28:48 -0600 (Thu, 01 Dec 2005) | 2 lines
protect agent_bridgedchannel() from segfaulting when there is no bridged channel (issue #5879)
........
r7272 | kpfleming | 2005-12-01 18:39:00 -0600 (Thu, 01 Dec 2005) | 3 lines
properly handle password changes when mailbox is last line of config file and not followed by a newline (issue #5870)
reformat password changing code to conform to coding guidelines (issue #5870)
........
r7273 | kpfleming | 2005-12-01 18:42:40 -0600 (Thu, 01 Dec 2005) | 2 lines
allow previous context-searching behavior to be used if desired (issue #5899)
........
r7274 | kpfleming | 2005-12-01 18:51:15 -0600 (Thu, 01 Dec 2005) | 2 lines
inherit channel variables into channels created by Page() application (issue #5888)
........
r7275 | oej | 2005-12-01 18:52:13 -0600 (Thu, 01 Dec 2005) | 2 lines
Bug #5907. Improve SIP INFO DTMF debugging output. (1.2 & Trunk)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7276 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-02 01:01:11 +00:00
@if [ -d .svn ] ; then \
echo "Updating from Subversion..." ; \
2008-01-16 18:06:14 +00:00
fromrev = " `svn info | $( AWK) '/Revision: / {print $$ 2}'` " ; \
Merged revisions 7265-7266,7268-7275 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r7265 | oej | 2005-12-01 17:18:14 -0600 (Thu, 01 Dec 2005) | 2 lines
Changing bug report address to the Asterisk issue tracker
........
r7266 | kpfleming | 2005-12-01 17:18:29 -0600 (Thu, 01 Dec 2005) | 3 lines
Makefile 'update' target now supports updating from Subversion repositories (issue #5875)
remove support for 'patches' subdirectory, it's no longer useful
........
r7268 | kpfleming | 2005-12-01 17:34:58 -0600 (Thu, 01 Dec 2005) | 2 lines
ensure channel's scheduling context is freed (issue #5788)
........
r7269 | kpfleming | 2005-12-01 17:49:44 -0600 (Thu, 01 Dec 2005) | 2 lines
don't block waiting for the Festival server forever when it goes away (issue #5882)
........
r7270 | kpfleming | 2005-12-01 18:26:12 -0600 (Thu, 01 Dec 2005) | 2 lines
allow variables to exist on both 'halves' of the Local channel (issue #5810)
........
r7271 | kpfleming | 2005-12-01 18:28:48 -0600 (Thu, 01 Dec 2005) | 2 lines
protect agent_bridgedchannel() from segfaulting when there is no bridged channel (issue #5879)
........
r7272 | kpfleming | 2005-12-01 18:39:00 -0600 (Thu, 01 Dec 2005) | 3 lines
properly handle password changes when mailbox is last line of config file and not followed by a newline (issue #5870)
reformat password changing code to conform to coding guidelines (issue #5870)
........
r7273 | kpfleming | 2005-12-01 18:42:40 -0600 (Thu, 01 Dec 2005) | 2 lines
allow previous context-searching behavior to be used if desired (issue #5899)
........
r7274 | kpfleming | 2005-12-01 18:51:15 -0600 (Thu, 01 Dec 2005) | 2 lines
inherit channel variables into channels created by Page() application (issue #5888)
........
r7275 | oej | 2005-12-01 18:52:13 -0600 (Thu, 01 Dec 2005) | 2 lines
Bug #5907. Improve SIP INFO DTMF debugging output. (1.2 & Trunk)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7276 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-02 01:01:11 +00:00
svn update | tee update.out; \
2008-01-16 18:06:14 +00:00
torev = " `svn info | $( AWK) '/Revision: / {print $$ 2}'` " ; \
echo " `date` Updated from revision $$ {fromrev} to $$ {torev}. " >> update.log; \
Merged revisions 7265-7266,7268-7275 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r7265 | oej | 2005-12-01 17:18:14 -0600 (Thu, 01 Dec 2005) | 2 lines
Changing bug report address to the Asterisk issue tracker
........
r7266 | kpfleming | 2005-12-01 17:18:29 -0600 (Thu, 01 Dec 2005) | 3 lines
Makefile 'update' target now supports updating from Subversion repositories (issue #5875)
remove support for 'patches' subdirectory, it's no longer useful
........
r7268 | kpfleming | 2005-12-01 17:34:58 -0600 (Thu, 01 Dec 2005) | 2 lines
ensure channel's scheduling context is freed (issue #5788)
........
r7269 | kpfleming | 2005-12-01 17:49:44 -0600 (Thu, 01 Dec 2005) | 2 lines
don't block waiting for the Festival server forever when it goes away (issue #5882)
........
r7270 | kpfleming | 2005-12-01 18:26:12 -0600 (Thu, 01 Dec 2005) | 2 lines
allow variables to exist on both 'halves' of the Local channel (issue #5810)
........
r7271 | kpfleming | 2005-12-01 18:28:48 -0600 (Thu, 01 Dec 2005) | 2 lines
protect agent_bridgedchannel() from segfaulting when there is no bridged channel (issue #5879)
........
r7272 | kpfleming | 2005-12-01 18:39:00 -0600 (Thu, 01 Dec 2005) | 3 lines
properly handle password changes when mailbox is last line of config file and not followed by a newline (issue #5870)
reformat password changing code to conform to coding guidelines (issue #5870)
........
r7273 | kpfleming | 2005-12-01 18:42:40 -0600 (Thu, 01 Dec 2005) | 2 lines
allow previous context-searching behavior to be used if desired (issue #5899)
........
r7274 | kpfleming | 2005-12-01 18:51:15 -0600 (Thu, 01 Dec 2005) | 2 lines
inherit channel variables into channels created by Page() application (issue #5888)
........
r7275 | oej | 2005-12-01 18:52:13 -0600 (Thu, 01 Dec 2005) | 2 lines
Bug #5907. Improve SIP INFO DTMF debugging output. (1.2 & Trunk)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7276 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-02 01:01:11 +00:00
rm -f .version; \
if [ ` grep -c ^C update.out` -gt 0 ] ; then \
echo ; echo "The following files have conflicts:" ; \
grep ^C update.out | cut -b4- ; \
2005-03-11 08:24:23 +00:00
fi ; \
Merged revisions 7265-7266,7268-7275 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r7265 | oej | 2005-12-01 17:18:14 -0600 (Thu, 01 Dec 2005) | 2 lines
Changing bug report address to the Asterisk issue tracker
........
r7266 | kpfleming | 2005-12-01 17:18:29 -0600 (Thu, 01 Dec 2005) | 3 lines
Makefile 'update' target now supports updating from Subversion repositories (issue #5875)
remove support for 'patches' subdirectory, it's no longer useful
........
r7268 | kpfleming | 2005-12-01 17:34:58 -0600 (Thu, 01 Dec 2005) | 2 lines
ensure channel's scheduling context is freed (issue #5788)
........
r7269 | kpfleming | 2005-12-01 17:49:44 -0600 (Thu, 01 Dec 2005) | 2 lines
don't block waiting for the Festival server forever when it goes away (issue #5882)
........
r7270 | kpfleming | 2005-12-01 18:26:12 -0600 (Thu, 01 Dec 2005) | 2 lines
allow variables to exist on both 'halves' of the Local channel (issue #5810)
........
r7271 | kpfleming | 2005-12-01 18:28:48 -0600 (Thu, 01 Dec 2005) | 2 lines
protect agent_bridgedchannel() from segfaulting when there is no bridged channel (issue #5879)
........
r7272 | kpfleming | 2005-12-01 18:39:00 -0600 (Thu, 01 Dec 2005) | 3 lines
properly handle password changes when mailbox is last line of config file and not followed by a newline (issue #5870)
reformat password changing code to conform to coding guidelines (issue #5870)
........
r7273 | kpfleming | 2005-12-01 18:42:40 -0600 (Thu, 01 Dec 2005) | 2 lines
allow previous context-searching behavior to be used if desired (issue #5899)
........
r7274 | kpfleming | 2005-12-01 18:51:15 -0600 (Thu, 01 Dec 2005) | 2 lines
inherit channel variables into channels created by Page() application (issue #5888)
........
r7275 | oej | 2005-12-01 18:52:13 -0600 (Thu, 01 Dec 2005) | 2 lines
Bug #5907. Improve SIP INFO DTMF debugging output. (1.2 & Trunk)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7276 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-02 01:01:11 +00:00
rm -f update.out; \
2003-02-04 16:35:12 +00:00
else \
Merged revisions 7265-7266,7268-7275 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r7265 | oej | 2005-12-01 17:18:14 -0600 (Thu, 01 Dec 2005) | 2 lines
Changing bug report address to the Asterisk issue tracker
........
r7266 | kpfleming | 2005-12-01 17:18:29 -0600 (Thu, 01 Dec 2005) | 3 lines
Makefile 'update' target now supports updating from Subversion repositories (issue #5875)
remove support for 'patches' subdirectory, it's no longer useful
........
r7268 | kpfleming | 2005-12-01 17:34:58 -0600 (Thu, 01 Dec 2005) | 2 lines
ensure channel's scheduling context is freed (issue #5788)
........
r7269 | kpfleming | 2005-12-01 17:49:44 -0600 (Thu, 01 Dec 2005) | 2 lines
don't block waiting for the Festival server forever when it goes away (issue #5882)
........
r7270 | kpfleming | 2005-12-01 18:26:12 -0600 (Thu, 01 Dec 2005) | 2 lines
allow variables to exist on both 'halves' of the Local channel (issue #5810)
........
r7271 | kpfleming | 2005-12-01 18:28:48 -0600 (Thu, 01 Dec 2005) | 2 lines
protect agent_bridgedchannel() from segfaulting when there is no bridged channel (issue #5879)
........
r7272 | kpfleming | 2005-12-01 18:39:00 -0600 (Thu, 01 Dec 2005) | 3 lines
properly handle password changes when mailbox is last line of config file and not followed by a newline (issue #5870)
reformat password changing code to conform to coding guidelines (issue #5870)
........
r7273 | kpfleming | 2005-12-01 18:42:40 -0600 (Thu, 01 Dec 2005) | 2 lines
allow previous context-searching behavior to be used if desired (issue #5899)
........
r7274 | kpfleming | 2005-12-01 18:51:15 -0600 (Thu, 01 Dec 2005) | 2 lines
inherit channel variables into channels created by Page() application (issue #5888)
........
r7275 | oej | 2005-12-01 18:52:13 -0600 (Thu, 01 Dec 2005) | 2 lines
Bug #5907. Improve SIP INFO DTMF debugging output. (1.2 & Trunk)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7276 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-02 01:01:11 +00:00
echo "Not under version control" ; \
2003-02-04 16:35:12 +00:00
fi
2005-04-27 16:27:53 +00:00
NEWHEADERS = $( notdir $( wildcard include/asterisk/*.h) )
2011-08-17 19:30:50 +00:00
OLDHEADERS = $( filter-out $( NEWHEADERS) $( notdir $( DESTDIR) $( ASTHEADERDIR) ) ,$( notdir $( wildcard $( DESTDIR) $( ASTHEADERDIR) /*.h) ) )
2012-06-13 14:55:30 +00:00
INSTALLDIRS = " $( ASTLIBDIR) " " $( ASTMODDIR) " " $( ASTSBINDIR) " " $( ASTETCDIR) " " $( ASTVARRUNDIR) " \
2012-06-12 18:41:50 +00:00
" $( ASTSPOOLDIR) " " $( ASTSPOOLDIR) /dictate " " $( ASTSPOOLDIR) /meetme " \
" $( ASTSPOOLDIR) /monitor " " $( ASTSPOOLDIR) /system " " $( ASTSPOOLDIR) /tmp " \
2013-07-03 17:58:45 +00:00
" $( ASTSPOOLDIR) /voicemail " " $( ASTSPOOLDIR) /recording " \
" $( ASTHEADERDIR) " " $( ASTHEADERDIR) /doxygen " \
2012-06-12 18:41:50 +00:00
" $( ASTLOGDIR) " " $( ASTLOGDIR) /cdr-csv " " $( ASTLOGDIR) /cdr-custom " \
" $( ASTLOGDIR) /cel-custom " " $( ASTDATADIR) " " $( ASTDATADIR) /documentation " \
" $( ASTDATADIR) /documentation/thirdparty " " $( ASTDATADIR) /firmware " \
" $( ASTDATADIR) /firmware/iax " " $( ASTDATADIR) /images " " $( ASTDATADIR) /keys " \
2013-04-22 14:58:53 +00:00
" $( ASTDATADIR) /phoneprov " " $( ASTDATADIR) /rest-api " " $( ASTDATADIR) /static-http " \
build-system: Allow building with static pjproject
Background here:
http://lists.digium.com/pipermail/asterisk-dev/2016-January/075266.html
From CHANGES:
* To help insure that Asterisk is compiled and run with the same known
version of pjproject, a new option (--with-pjproject-bundled) has been
added to ./configure. When specified, the version of pjproject specified
in third-party/versions.mak will be downloaded and configured. When you
make Asterisk, the build process will also automatically build pjproject
and Asterisk will be statically linked to it. Once a particular version
of pjproject is configured and built, it won't be configured or built
again unless you run a 'make distclean'.
To facilitate testing, when 'make install' is run, the pjsua and pjsystest
utilities and the pjproject python bindings will be installed in
ASTDATADIR/third-party/pjproject.
The default behavior remains building with the shared pjproject
installation, if any.
Building:
All you have to do is include the --with-pjproject-bundled option on
the ./configure command line (and remove any existing --with-pjproject
option if specified). Everything else is automatic.
Behind the scenes:
The top-level Makefile was modified to include 'third-party' in the
list of MOD_SUBDIRS.
The third-party directory was created to contain any third party
packages that may be needed in the future. Its Makefile automatically
iterates over any subdirectories passing on targets.
The third-party/pjproject directory was created to house the pjproject
source distribution. Its Makefile contains targets to download, patch
configure, generate dependencies, compile libs, apps and python bindings,
sanitized build.mak and generate a symbols list.
When bootstrap.sh is run, it automatically includes the configure.m4
file in third-party/pjproject. This file has a macro to download and
conifgure pjproject and get and set PJPROJECT_INCLUDE, PJPROJECT_DIR
and PJPROJECT_BUNDLED. It also tests for the capabilities like
PJ_TRANSACTION_GRP_LOCK by parsing preprocessor output as opposed to
trying to compile. Of course, bootstrap.sh is only run once and the
configure file is incldued in the patch.
When configure is run with the new options, the macro in configure.m4
triggers the download, patch, conifgure and tests. No compilation is
performed at this time. The downloaded tarball is cached in /tmp so
it doesn't get downloaded again on a distclean.
When make is run in the top-level Asterisk source directory, it will
automatically descend all the subdirectories in third_party just as it
does for addons, apps, etc. The top-level Makefile makes sure that
the 'third-party' is built before 'main' so that dependencies from the
other directories are built first.
When main does build, a new shared library (libasteriskpj) is created that
links statically to the pjproject .a files and exports all their symbols.
The asterisk binary links to that, just as it does with libasteriskssl.
When Asterisk is installed, the pjsua and pjsystest apps, and the pjproject
python bindings are installed in ASTDATADIR/third-party/pjproject. This
will facilitate testing, including running the testsuite which will be
updated to check that directory for the pjsua module ahead of the system
python library.
Modules should continue to depend on pjproject if they use pjproject APIs
directly. They should not care about the implementation. No changes to any
res_pjsip modules were made.
Change-Id: Ia7a60c28c2e9ba9537c5570f933c1ebcb20a3103
2016-01-19 03:54:28 +00:00
" $( ASTDATADIR) /sounds " " $( ASTDATADIR) /moh " " $( ASTMANDIR) /man8 " " $( AGI_DIR) " " $( ASTDBDIR) " \
" $( ASTDATADIR) /third-party "
2005-04-27 16:27:53 +00:00
2008-04-18 20:01:47 +00:00
installdirs :
2012-06-12 18:41:50 +00:00
@for i in $( INSTALLDIRS) ; do \
2012-06-13 14:31:24 +00:00
if [ ! -z " $$ {i} " -a ! -d " $( DESTDIR) $$ {i} " ] ; then \
2012-06-12 18:41:50 +00:00
$( INSTALL) -d " $( DESTDIR) $$ {i} " ; \
fi ; \
done
2008-04-18 20:01:47 +00:00
2012-01-30 21:21:16 +00:00
main-bininstall :
+@DESTDIR= " $( DESTDIR) " ASTSBINDIR = " $( ASTSBINDIR) " ASTLIBDIR = " $( ASTLIBDIR) " $( SUBMAKE) -C main bininstall
2013-02-04 19:52:14 +00:00
bininstall : _all installdirs $( SUBDIRS_INSTALL ) main -bininstall
2015-09-04 18:51:46 +00:00
$( INSTALL) -m 755 contrib/scripts/astversion " $( DESTDIR) $( ASTSBINDIR) / "
2011-08-17 19:30:50 +00:00
$( INSTALL) -m 755 contrib/scripts/astgenkey " $( DESTDIR) $( ASTSBINDIR) / "
$( INSTALL) -m 755 contrib/scripts/autosupport " $( DESTDIR) $( ASTSBINDIR) / "
2014-06-12 07:52:59 +00:00
if [ ! -f /sbin/launchd ] ; then \
2014-02-14 08:52:07 +00:00
./build_tools/install_subst contrib/scripts/safe_asterisk " $( DESTDIR) $( ASTSBINDIR) /safe_asterisk " ; \
2004-01-12 03:15:34 +00:00
fi
2011-08-17 19:30:50 +00:00
$( INSTALL) -m 644 include/asterisk.h " $( DESTDIR) $( includedir) "
$( INSTALL) -m 644 include/asterisk/*.h " $( DESTDIR) $( ASTHEADERDIR) "
$( INSTALL) -m 644 include/asterisk/doxygen/*.h " $( DESTDIR) $( ASTHEADERDIR) /doxygen "
2005-04-27 05:46:32 +00:00
if [ -n " $( OLDHEADERS) " ] ; then \
2011-08-17 19:30:50 +00:00
for h in $( OLDHEADERS) ; do rm -f " $( DESTDIR) $( ASTHEADERDIR) / $$ h " ; done \
2005-04-27 05:46:32 +00:00
fi
2010-07-23 13:26:41 +00:00
2011-08-17 19:30:50 +00:00
$( INSTALL) -m 644 doc/core-*.xml " $( DESTDIR) $( ASTDATADIR) /documentation "
2013-12-11 12:31:57 +00:00
$( INSTALL) -m 644 doc/appdocsxml.xslt " $( DESTDIR) $( ASTDATADIR) /documentation "
2011-08-17 19:30:50 +00:00
$( INSTALL) -m 644 doc/appdocsxml.dtd " $( DESTDIR) $( ASTDATADIR) /documentation "
$( INSTALL) -m 644 doc/asterisk.8 " $( DESTDIR) $( ASTMANDIR) /man8 "
2013-10-02 18:28:03 +00:00
$( INSTALL) -m 644 doc/astdb*.8 " $( DESTDIR) $( ASTMANDIR) /man8 "
2011-08-17 19:30:50 +00:00
$( INSTALL) -m 644 contrib/scripts/astgenkey.8 " $( DESTDIR) $( ASTMANDIR) /man8 "
$( INSTALL) -m 644 contrib/scripts/autosupport.8 " $( DESTDIR) $( ASTMANDIR) /man8 "
$( INSTALL) -m 644 contrib/scripts/safe_asterisk.8 " $( DESTDIR) $( ASTMANDIR) /man8 "
2006-10-24 05:24:32 +00:00
if [ -f contrib/firmware/iax/iaxy.bin ] ; then \
2011-08-17 19:30:50 +00:00
$( INSTALL) -m 644 contrib/firmware/iax/iaxy.bin " $( DESTDIR) $( ASTDATADIR) /firmware/iax/iaxy.bin " ; \
2006-10-24 05:24:32 +00:00
fi
2014-09-18 15:07:12 +00:00
i f e q ( $( HAVE_DAHDI ) , 1 )
2014-07-03 14:08:02 +00:00
$( INSTALL) -d $( DESTDIR) /$( DAHDI_UDEV_HOOK_DIR)
$( INSTALL) -m 644 contrib/scripts/dahdi_span_config_hook $( DESTDIR) $( DAHDI_UDEV_HOOK_DIR) /40-asterisk
2014-09-18 15:07:12 +00:00
e n d i f
2006-04-29 11:42:31 +00:00
2006-06-22 12:33:50 +00:00
$(SUBDIRS_INSTALL) :
build-system: Allow building with static pjproject
Background here:
http://lists.digium.com/pipermail/asterisk-dev/2016-January/075266.html
From CHANGES:
* To help insure that Asterisk is compiled and run with the same known
version of pjproject, a new option (--with-pjproject-bundled) has been
added to ./configure. When specified, the version of pjproject specified
in third-party/versions.mak will be downloaded and configured. When you
make Asterisk, the build process will also automatically build pjproject
and Asterisk will be statically linked to it. Once a particular version
of pjproject is configured and built, it won't be configured or built
again unless you run a 'make distclean'.
To facilitate testing, when 'make install' is run, the pjsua and pjsystest
utilities and the pjproject python bindings will be installed in
ASTDATADIR/third-party/pjproject.
The default behavior remains building with the shared pjproject
installation, if any.
Building:
All you have to do is include the --with-pjproject-bundled option on
the ./configure command line (and remove any existing --with-pjproject
option if specified). Everything else is automatic.
Behind the scenes:
The top-level Makefile was modified to include 'third-party' in the
list of MOD_SUBDIRS.
The third-party directory was created to contain any third party
packages that may be needed in the future. Its Makefile automatically
iterates over any subdirectories passing on targets.
The third-party/pjproject directory was created to house the pjproject
source distribution. Its Makefile contains targets to download, patch
configure, generate dependencies, compile libs, apps and python bindings,
sanitized build.mak and generate a symbols list.
When bootstrap.sh is run, it automatically includes the configure.m4
file in third-party/pjproject. This file has a macro to download and
conifgure pjproject and get and set PJPROJECT_INCLUDE, PJPROJECT_DIR
and PJPROJECT_BUNDLED. It also tests for the capabilities like
PJ_TRANSACTION_GRP_LOCK by parsing preprocessor output as opposed to
trying to compile. Of course, bootstrap.sh is only run once and the
configure file is incldued in the patch.
When configure is run with the new options, the macro in configure.m4
triggers the download, patch, conifgure and tests. No compilation is
performed at this time. The downloaded tarball is cached in /tmp so
it doesn't get downloaded again on a distclean.
When make is run in the top-level Asterisk source directory, it will
automatically descend all the subdirectories in third_party just as it
does for addons, apps, etc. The top-level Makefile makes sure that
the 'third-party' is built before 'main' so that dependencies from the
other directories are built first.
When main does build, a new shared library (libasteriskpj) is created that
links statically to the pjproject .a files and exports all their symbols.
The asterisk binary links to that, just as it does with libasteriskssl.
When Asterisk is installed, the pjsua and pjsystest apps, and the pjproject
python bindings are installed in ASTDATADIR/third-party/pjproject. This
will facilitate testing, including running the testsuite which will be
updated to check that directory for the pjsua module ahead of the system
python library.
Modules should continue to depend on pjproject if they use pjproject APIs
directly. They should not care about the implementation. No changes to any
res_pjsip modules were made.
Change-Id: Ia7a60c28c2e9ba9537c5570f933c1ebcb20a3103
2016-01-19 03:54:28 +00:00
+@DESTDIR= " $( DESTDIR) " ASTSBINDIR = " $( ASTSBINDIR) " ASTDATADIR = " $( ASTDATADIR) " $( SUBMAKE) -C $( @:-install= ) install
2005-05-01 01:43:44 +00:00
2007-12-10 04:18:07 +00:00
NEWMODS := $( foreach d,$( MOD_SUBDIRS) ,$( notdir $( wildcard $( d) /*.so) ) )
2012-01-30 21:21:16 +00:00
OLDMODS = $( filter-out $( NEWMODS) $( notdir $( DESTDIR) $( ASTMODDIR) ) ,$( notdir $( wildcard $( DESTDIR) $( ASTMODDIR) /*.so) ) )
build: Add download capability for external packages
The DPMA and g729a, silk, siren7 and siren14 codecs hosted at
http://downloads.digium.com/pub/telephony/ are now listed in the
"External" sections of the "Resource Modules" and "Codec Translators"
pages in menuselect. Any that are selected will automatically be
downloaded and installed when "make install" is run. Their LICENSE and
README (if avaialble) files will be installed to
ASTVARLIBDIR/documentation/thirdparty/<product_name>.
Example use with codecs:
The codecs/codecs.xml file is a menuselect style xml file that lists
the codecs to be included. Their support levels are 'external', which
triggers the download and install, and defaultenabled is no. Also
because codec_g729a is actually in a directory named codec_g729 on the
download server, the newly added 'member_data' element is used to
override the default of the directory name being the package name. You
can use the 'directory_name' attribute to keep default base URL
(http://downloads.digium.com/pub/telephony/) but use the new directory,
or you use the 'remote_url' attribute to specify a full URL to the
download directory. In this case, you must still follow the same
subdirectory naming conventions as that used for the packages located
at 'http://downloads.digium.com/pub/telephony'.
A new configure option '--with-externals-cache' was added and like
'--with-sounds-cache' it allows the installer to cache tarballs so
they're not downloaded every time.
To assist with the download and install process, each external package
now has a manifest.xml file that, among other things, contains a package
version and checksums for each file in the tarball. The manifest is
saved to both the cache directory and ASTMODDIR and together with the
manifest.xml on the downloads site, tells the install scripts whether
a download and/or update is needed.
bash and xmlstarlet are required for downloader operation. If they're
not installed, the external items in menuselect will be unavailable.
Change-Id: Id3dcf1289ffd3cb0bbd7dfab3cafbb87be60323a
2016-08-02 01:55:33 +00:00
BADMODS = $( strip $( filter-out $( shell ./build_tools/list_valid_installed_externals) ,$( OLDMODS) ) )
2005-05-01 01:43:44 +00:00
oldmodcheck :
build: Add download capability for external packages
The DPMA and g729a, silk, siren7 and siren14 codecs hosted at
http://downloads.digium.com/pub/telephony/ are now listed in the
"External" sections of the "Resource Modules" and "Codec Translators"
pages in menuselect. Any that are selected will automatically be
downloaded and installed when "make install" is run. Their LICENSE and
README (if avaialble) files will be installed to
ASTVARLIBDIR/documentation/thirdparty/<product_name>.
Example use with codecs:
The codecs/codecs.xml file is a menuselect style xml file that lists
the codecs to be included. Their support levels are 'external', which
triggers the download and install, and defaultenabled is no. Also
because codec_g729a is actually in a directory named codec_g729 on the
download server, the newly added 'member_data' element is used to
override the default of the directory name being the package name. You
can use the 'directory_name' attribute to keep default base URL
(http://downloads.digium.com/pub/telephony/) but use the new directory,
or you use the 'remote_url' attribute to specify a full URL to the
download directory. In this case, you must still follow the same
subdirectory naming conventions as that used for the packages located
at 'http://downloads.digium.com/pub/telephony'.
A new configure option '--with-externals-cache' was added and like
'--with-sounds-cache' it allows the installer to cache tarballs so
they're not downloaded every time.
To assist with the download and install process, each external package
now has a manifest.xml file that, among other things, contains a package
version and checksums for each file in the tarball. The manifest is
saved to both the cache directory and ASTMODDIR and together with the
manifest.xml on the downloads site, tells the install scripts whether
a download and/or update is needed.
bash and xmlstarlet are required for downloader operation. If they're
not installed, the external items in menuselect will be unavailable.
Change-Id: Id3dcf1289ffd3cb0bbd7dfab3cafbb87be60323a
2016-08-02 01:55:33 +00:00
@if [ -n " $( BADMODS) " ] ; then \
2005-04-27 16:27:53 +00:00
echo " WARNING WARNING WARNING" ; \
echo "" ; \
echo " Your Asterisk modules directory, located at" ; \
2012-01-30 21:21:16 +00:00
echo " $( DESTDIR) $( ASTMODDIR) " ; \
2005-04-27 16:27:53 +00:00
echo " contains modules that were not installed by this " ; \
echo " version of Asterisk. Please ensure that these" ; \
echo " modules are compatible with this version before" ; \
echo " attempting to run Asterisk." ; \
echo "" ; \
build: Add download capability for external packages
The DPMA and g729a, silk, siren7 and siren14 codecs hosted at
http://downloads.digium.com/pub/telephony/ are now listed in the
"External" sections of the "Resource Modules" and "Codec Translators"
pages in menuselect. Any that are selected will automatically be
downloaded and installed when "make install" is run. Their LICENSE and
README (if avaialble) files will be installed to
ASTVARLIBDIR/documentation/thirdparty/<product_name>.
Example use with codecs:
The codecs/codecs.xml file is a menuselect style xml file that lists
the codecs to be included. Their support levels are 'external', which
triggers the download and install, and defaultenabled is no. Also
because codec_g729a is actually in a directory named codec_g729 on the
download server, the newly added 'member_data' element is used to
override the default of the directory name being the package name. You
can use the 'directory_name' attribute to keep default base URL
(http://downloads.digium.com/pub/telephony/) but use the new directory,
or you use the 'remote_url' attribute to specify a full URL to the
download directory. In this case, you must still follow the same
subdirectory naming conventions as that used for the packages located
at 'http://downloads.digium.com/pub/telephony'.
A new configure option '--with-externals-cache' was added and like
'--with-sounds-cache' it allows the installer to cache tarballs so
they're not downloaded every time.
To assist with the download and install process, each external package
now has a manifest.xml file that, among other things, contains a package
version and checksums for each file in the tarball. The manifest is
saved to both the cache directory and ASTMODDIR and together with the
manifest.xml on the downloads site, tells the install scripts whether
a download and/or update is needed.
bash and xmlstarlet are required for downloader operation. If they're
not installed, the external items in menuselect will be unavailable.
Change-Id: Id3dcf1289ffd3cb0bbd7dfab3cafbb87be60323a
2016-08-02 01:55:33 +00:00
for f in $( BADMODS) ; do \
2005-04-27 16:27:53 +00:00
echo " $$ f " ; \
done ; \
echo "" ; \
echo " WARNING WARNING WARNING" ; \
fi
2003-02-04 16:35:12 +00:00
build: Execute ldconfig to build cache. (take two)
On some platforms a multiarch approach is used for libraries.
The build system does not take this into account and still
places libraries into the lib directory if no --libdir is
specified to configure. On initial startup this results in
libasteriskssl.so not being found, as it is not in the multiarch
lib directory. To make matters worse, options were being passed
to ldconfig on both Linux and FreeBSD that actually prevented
the rebuild of the cache.
* Fedora has a /usr/share/config.site that automatically tells
autoconf to use /usr/lib64 but CentOS does not. This logic was
copied to configure.ac and modified so systems like Ubuntu,
which still use /usr/lib for 64-bit systems, aren't affected.
Now that we have them in the correct directory...
In order for the system loader to find libasteriskssl and
libasteriskpj, one of 3 things has to happen...
- The linker cache must be rebuilt including the directory
where the libasterisk* libraries were installed. Only root
can rebuild the cache. This was busted.
- We have to link the asterisk binary with an rpath pointing
to the directrory where the libasterisk* libraries were
installed. This makes things very complicated and will happen
over the collective dead bodies of everyone who's had to
package a distribution with an rpath.
- Finally, you can start asterisk with LD_LIBRARY_PATH set to the
directrory where the libasterisk* libraries were installed.
There are no other options. So...
* The invokation of ldconfig has been moved from main/Makefile
to ASTTOPDIR/Makefile, the options have been removed, and
DESTDIR/ASTLIBDIR appended. If you aren't root, you will be
warned after the "Asterisk Installation Compete" banner that
you must re-run 'make install' as root, manually run
'ldconfig DESTDIR/ASTLIBDIR' as root, or run asterisk with
LD_LIBRARY_PATH.
ASTERISK-26705
Change-Id: I2a64b7c33a7d3e9bde20f47e3d3ab771977af982
2017-02-23 21:49:17 +00:00
ld-cache-update :
i f n e q ( $( LDCONFIG ) , )
2017-03-28 18:01:16 +00:00
i f e q ( $( DESTDIR ) , ) # DESTDIR means binary archive creation; ldconfig should be run on postinst
build: Execute ldconfig to build cache. (take two)
On some platforms a multiarch approach is used for libraries.
The build system does not take this into account and still
places libraries into the lib directory if no --libdir is
specified to configure. On initial startup this results in
libasteriskssl.so not being found, as it is not in the multiarch
lib directory. To make matters worse, options were being passed
to ldconfig on both Linux and FreeBSD that actually prevented
the rebuild of the cache.
* Fedora has a /usr/share/config.site that automatically tells
autoconf to use /usr/lib64 but CentOS does not. This logic was
copied to configure.ac and modified so systems like Ubuntu,
which still use /usr/lib for 64-bit systems, aren't affected.
Now that we have them in the correct directory...
In order for the system loader to find libasteriskssl and
libasteriskpj, one of 3 things has to happen...
- The linker cache must be rebuilt including the directory
where the libasterisk* libraries were installed. Only root
can rebuild the cache. This was busted.
- We have to link the asterisk binary with an rpath pointing
to the directrory where the libasterisk* libraries were
installed. This makes things very complicated and will happen
over the collective dead bodies of everyone who's had to
package a distribution with an rpath.
- Finally, you can start asterisk with LD_LIBRARY_PATH set to the
directrory where the libasterisk* libraries were installed.
There are no other options. So...
* The invokation of ldconfig has been moved from main/Makefile
to ASTTOPDIR/Makefile, the options have been removed, and
DESTDIR/ASTLIBDIR appended. If you aren't root, you will be
warned after the "Asterisk Installation Compete" banner that
you must re-run 'make install' as root, manually run
'ldconfig DESTDIR/ASTLIBDIR' as root, or run asterisk with
LD_LIBRARY_PATH.
ASTERISK-26705
Change-Id: I2a64b7c33a7d3e9bde20f47e3d3ab771977af982
2017-02-23 21:49:17 +00:00
@if [ $$ { EUID} -eq 0 ] ; then \
2017-03-28 18:01:16 +00:00
$( LDCONFIG) " $( ASTLIBDIR) / " ; \
build: Execute ldconfig to build cache. (take two)
On some platforms a multiarch approach is used for libraries.
The build system does not take this into account and still
places libraries into the lib directory if no --libdir is
specified to configure. On initial startup this results in
libasteriskssl.so not being found, as it is not in the multiarch
lib directory. To make matters worse, options were being passed
to ldconfig on both Linux and FreeBSD that actually prevented
the rebuild of the cache.
* Fedora has a /usr/share/config.site that automatically tells
autoconf to use /usr/lib64 but CentOS does not. This logic was
copied to configure.ac and modified so systems like Ubuntu,
which still use /usr/lib for 64-bit systems, aren't affected.
Now that we have them in the correct directory...
In order for the system loader to find libasteriskssl and
libasteriskpj, one of 3 things has to happen...
- The linker cache must be rebuilt including the directory
where the libasterisk* libraries were installed. Only root
can rebuild the cache. This was busted.
- We have to link the asterisk binary with an rpath pointing
to the directrory where the libasterisk* libraries were
installed. This makes things very complicated and will happen
over the collective dead bodies of everyone who's had to
package a distribution with an rpath.
- Finally, you can start asterisk with LD_LIBRARY_PATH set to the
directrory where the libasterisk* libraries were installed.
There are no other options. So...
* The invokation of ldconfig has been moved from main/Makefile
to ASTTOPDIR/Makefile, the options have been removed, and
DESTDIR/ASTLIBDIR appended. If you aren't root, you will be
warned after the "Asterisk Installation Compete" banner that
you must re-run 'make install' as root, manually run
'ldconfig DESTDIR/ASTLIBDIR' as root, or run asterisk with
LD_LIBRARY_PATH.
ASTERISK-26705
Change-Id: I2a64b7c33a7d3e9bde20f47e3d3ab771977af982
2017-02-23 21:49:17 +00:00
else \
echo " WARNING WARNING WARNING" ; \
echo "" ; \
echo " You cannot rebuild the system linker cache unless you are root. " ; \
2017-03-28 18:01:16 +00:00
echo " You MUST do one of the following..." ; \
build: Execute ldconfig to build cache. (take two)
On some platforms a multiarch approach is used for libraries.
The build system does not take this into account and still
places libraries into the lib directory if no --libdir is
specified to configure. On initial startup this results in
libasteriskssl.so not being found, as it is not in the multiarch
lib directory. To make matters worse, options were being passed
to ldconfig on both Linux and FreeBSD that actually prevented
the rebuild of the cache.
* Fedora has a /usr/share/config.site that automatically tells
autoconf to use /usr/lib64 but CentOS does not. This logic was
copied to configure.ac and modified so systems like Ubuntu,
which still use /usr/lib for 64-bit systems, aren't affected.
Now that we have them in the correct directory...
In order for the system loader to find libasteriskssl and
libasteriskpj, one of 3 things has to happen...
- The linker cache must be rebuilt including the directory
where the libasterisk* libraries were installed. Only root
can rebuild the cache. This was busted.
- We have to link the asterisk binary with an rpath pointing
to the directrory where the libasterisk* libraries were
installed. This makes things very complicated and will happen
over the collective dead bodies of everyone who's had to
package a distribution with an rpath.
- Finally, you can start asterisk with LD_LIBRARY_PATH set to the
directrory where the libasterisk* libraries were installed.
There are no other options. So...
* The invokation of ldconfig has been moved from main/Makefile
to ASTTOPDIR/Makefile, the options have been removed, and
DESTDIR/ASTLIBDIR appended. If you aren't root, you will be
warned after the "Asterisk Installation Compete" banner that
you must re-run 'make install' as root, manually run
'ldconfig DESTDIR/ASTLIBDIR' as root, or run asterisk with
LD_LIBRARY_PATH.
ASTERISK-26705
Change-Id: I2a64b7c33a7d3e9bde20f47e3d3ab771977af982
2017-02-23 21:49:17 +00:00
echo " * Re-run 'make install' as root. " ; \
2017-03-28 18:01:16 +00:00
echo " * Run 'ldconfig $( ASTLIBDIR) ' as root. " ; \
echo " * Run asterisk with 'LD_LIBRARY_PATH= $( ASTLIBDIR) asterisk' " ; \
build: Execute ldconfig to build cache. (take two)
On some platforms a multiarch approach is used for libraries.
The build system does not take this into account and still
places libraries into the lib directory if no --libdir is
specified to configure. On initial startup this results in
libasteriskssl.so not being found, as it is not in the multiarch
lib directory. To make matters worse, options were being passed
to ldconfig on both Linux and FreeBSD that actually prevented
the rebuild of the cache.
* Fedora has a /usr/share/config.site that automatically tells
autoconf to use /usr/lib64 but CentOS does not. This logic was
copied to configure.ac and modified so systems like Ubuntu,
which still use /usr/lib for 64-bit systems, aren't affected.
Now that we have them in the correct directory...
In order for the system loader to find libasteriskssl and
libasteriskpj, one of 3 things has to happen...
- The linker cache must be rebuilt including the directory
where the libasterisk* libraries were installed. Only root
can rebuild the cache. This was busted.
- We have to link the asterisk binary with an rpath pointing
to the directrory where the libasterisk* libraries were
installed. This makes things very complicated and will happen
over the collective dead bodies of everyone who's had to
package a distribution with an rpath.
- Finally, you can start asterisk with LD_LIBRARY_PATH set to the
directrory where the libasterisk* libraries were installed.
There are no other options. So...
* The invokation of ldconfig has been moved from main/Makefile
to ASTTOPDIR/Makefile, the options have been removed, and
DESTDIR/ASTLIBDIR appended. If you aren't root, you will be
warned after the "Asterisk Installation Compete" banner that
you must re-run 'make install' as root, manually run
'ldconfig DESTDIR/ASTLIBDIR' as root, or run asterisk with
LD_LIBRARY_PATH.
ASTERISK-26705
Change-Id: I2a64b7c33a7d3e9bde20f47e3d3ab771977af982
2017-02-23 21:49:17 +00:00
echo "" ; \
echo " WARNING WARNING WARNING" ; \
fi
e n d i f
2017-03-28 18:01:16 +00:00
e n d i f
export _oldlibdir =
export _oldmoddir =
i f e q ( $( findstring 64,$ ( HOST_CPU ) ) , 6 4 )
# Strip any trailing '/' so the dir and notdir functions work correctly
_current_libdir = $( patsubst %/,%,$( DESTDIR) $( ASTLIBDIR) )
# Only process if the paths end in lib64 or lib.
# If we're installing to lib64, check lib for orphans.
# If we're installing to lib, check lib64 for orphans.
# Otherwise, leave _oldlibdir empty.
ifeq ( $( notdir $( _current_libdir) ) ,lib64)
_oldlibdir = $( dir $( _current_libdir) ) lib
else ifeq ( $( notdir $( _current_libdir) ) ,lib)
_oldlibdir = $( dir $( _current_libdir) ) lib64
endif
build: Execute ldconfig to build cache. (take two)
On some platforms a multiarch approach is used for libraries.
The build system does not take this into account and still
places libraries into the lib directory if no --libdir is
specified to configure. On initial startup this results in
libasteriskssl.so not being found, as it is not in the multiarch
lib directory. To make matters worse, options were being passed
to ldconfig on both Linux and FreeBSD that actually prevented
the rebuild of the cache.
* Fedora has a /usr/share/config.site that automatically tells
autoconf to use /usr/lib64 but CentOS does not. This logic was
copied to configure.ac and modified so systems like Ubuntu,
which still use /usr/lib for 64-bit systems, aren't affected.
Now that we have them in the correct directory...
In order for the system loader to find libasteriskssl and
libasteriskpj, one of 3 things has to happen...
- The linker cache must be rebuilt including the directory
where the libasterisk* libraries were installed. Only root
can rebuild the cache. This was busted.
- We have to link the asterisk binary with an rpath pointing
to the directrory where the libasterisk* libraries were
installed. This makes things very complicated and will happen
over the collective dead bodies of everyone who's had to
package a distribution with an rpath.
- Finally, you can start asterisk with LD_LIBRARY_PATH set to the
directrory where the libasterisk* libraries were installed.
There are no other options. So...
* The invokation of ldconfig has been moved from main/Makefile
to ASTTOPDIR/Makefile, the options have been removed, and
DESTDIR/ASTLIBDIR appended. If you aren't root, you will be
warned after the "Asterisk Installation Compete" banner that
you must re-run 'make install' as root, manually run
'ldconfig DESTDIR/ASTLIBDIR' as root, or run asterisk with
LD_LIBRARY_PATH.
ASTERISK-26705
Change-Id: I2a64b7c33a7d3e9bde20f47e3d3ab771977af982
2017-02-23 21:49:17 +00:00
2017-03-28 18:01:16 +00:00
# Strip any trailing '/' so the dir and notdir functions work correctly
_current_moddir = $( patsubst %/,%,$( DESTDIR) $( ASTMODDIR) )
# Only process if the paths contain /lib64/ or /lib/.
# If we're installing to lib64, check lib for orphans.
# If we're installing to lib, check lib64 for orphans.
# Otherwise, leave _oldmoddir empty.
ifeq ( $( findstring /lib64/,$( _current_moddir) ) ,/lib64/)
_oldmoddir = $( subst /lib64/,/lib/,$( _current_moddir) )
else ifeq ( $( findstring /lib/,$( _current_moddir) ) ,/lib/)
_oldmoddir = $( subst /lib/,/lib64/,$( _current_moddir) )
endif
e n d i f
2017-02-27 18:25:01 +00:00
check-old-libdir :
2017-03-28 18:01:16 +00:00
@test -n " $( _oldlibdir) " -a -d " $( _oldlibdir) " || exit 0 ; \
oldfiles = ` find " $( _oldlibdir) " -name libasterisk* -print -quit -o \( -path *asterisk/modules/* -a -name *.so \) -print -quit 2>/dev/null` ; \
2017-02-27 18:25:01 +00:00
if [ " x $$ oldfiles " != "x" ] ; then \
echo " WARNING WARNING WARNING" ; \
echo "" ; \
echo " Installation is to: " ; \
echo " $( DESTDIR) $( ASTLIBDIR) " ; \
echo " but there are asterisk shared libraries in: " ; \
echo " $( _oldlibdir) " ; \
echo " or" ; \
echo " $( _oldlibdir) /asterisk/modules " ; \
echo "" ; \
echo " It is unlikely that asterisk will start." ; \
echo "" ; \
echo " You should do one of the following..." ; \
echo " * Run 'make uninstall' to remove the incorrect libraries" ; \
echo " then run 'make install' again." ; \
echo " * Manually remove the libraries from" ; \
echo " $( _oldlibdir) " ; \
echo " and run 'ldconfig' to rebuild the linker cache." ; \
echo "" ; \
echo " WARNING WARNING WARNING" ; \
fi
2008-02-26 18:10:20 +00:00
badshell :
2014-10-12 07:57:06 +00:00
i f n e q ( $( filter ~%,$ ( DESTDIR ) ) , )
2008-02-26 18:10:20 +00:00
@echo "Your shell doesn't do ~ expansion when expected (specifically, when doing \"make install DESTDIR=~/path\")."
@echo " Try replacing ~ with \$ $HOME , as in \"make install DESTDIR=\$ $HOME /path\". "
@exit 1
e n d i f
2011-08-25 15:30:46 +00:00
install : badshell bininstall datafiles
2005-09-30 14:48:41 +00:00
@if [ -x /usr/sbin/asterisk-post-install ] ; then \
2011-08-17 19:30:50 +00:00
/usr/sbin/asterisk-post-install " $( DESTDIR) " . ; \
2005-09-30 14:48:41 +00:00
fi
2012-01-30 21:21:16 +00:00
@echo " +---- Asterisk Installation Complete -------+"
2006-04-29 11:42:31 +00:00
@echo " + +"
@echo " + YOU MUST READ THE SECURITY DOCUMENT +"
@echo " + +"
2012-01-30 21:21:16 +00:00
@echo " + Asterisk has successfully been installed. +"
@echo " + If you would like to install the sample +"
2006-04-29 11:42:31 +00:00
@echo " + configuration files (overwriting any +"
2012-01-30 21:21:16 +00:00
@echo " + existing config files), run: +"
2006-04-29 11:42:31 +00:00
@echo " + +"
2015-10-30 18:22:23 +00:00
@echo " + For generic reference documentation: +"
@echo " + $( mK) samples + "
@echo " + +"
@echo " + For a sample basic PBX: +"
@echo " + $( mK) basic-pbx + "
@echo " + +"
2006-04-29 11:42:31 +00:00
@echo " + +"
@echo " +----------------- or ---------------------+"
@echo " + +"
@echo " + You can go ahead and install the asterisk +"
@echo " + program documentation now or later run: +"
@echo " + +"
2007-11-05 18:00:24 +00:00
@echo " + $( mK) progdocs + "
2006-04-29 11:42:31 +00:00
@echo " + +"
@echo " + **Note** This requires that you have +"
@echo " + doxygen installed on your local system +"
@echo " +-------------------------------------------+"
@$( MAKE) -s oldmodcheck
build: Execute ldconfig to build cache. (take two)
On some platforms a multiarch approach is used for libraries.
The build system does not take this into account and still
places libraries into the lib directory if no --libdir is
specified to configure. On initial startup this results in
libasteriskssl.so not being found, as it is not in the multiarch
lib directory. To make matters worse, options were being passed
to ldconfig on both Linux and FreeBSD that actually prevented
the rebuild of the cache.
* Fedora has a /usr/share/config.site that automatically tells
autoconf to use /usr/lib64 but CentOS does not. This logic was
copied to configure.ac and modified so systems like Ubuntu,
which still use /usr/lib for 64-bit systems, aren't affected.
Now that we have them in the correct directory...
In order for the system loader to find libasteriskssl and
libasteriskpj, one of 3 things has to happen...
- The linker cache must be rebuilt including the directory
where the libasterisk* libraries were installed. Only root
can rebuild the cache. This was busted.
- We have to link the asterisk binary with an rpath pointing
to the directrory where the libasterisk* libraries were
installed. This makes things very complicated and will happen
over the collective dead bodies of everyone who's had to
package a distribution with an rpath.
- Finally, you can start asterisk with LD_LIBRARY_PATH set to the
directrory where the libasterisk* libraries were installed.
There are no other options. So...
* The invokation of ldconfig has been moved from main/Makefile
to ASTTOPDIR/Makefile, the options have been removed, and
DESTDIR/ASTLIBDIR appended. If you aren't root, you will be
warned after the "Asterisk Installation Compete" banner that
you must re-run 'make install' as root, manually run
'ldconfig DESTDIR/ASTLIBDIR' as root, or run asterisk with
LD_LIBRARY_PATH.
ASTERISK-26705
Change-Id: I2a64b7c33a7d3e9bde20f47e3d3ab771977af982
2017-02-23 21:49:17 +00:00
@$( MAKE) -s ld-cache-update
2017-02-27 18:25:01 +00:00
@$( MAKE) -s check-old-libdir
2003-02-04 16:35:12 +00:00
2008-10-01 14:44:12 +00:00
isntall : install
2006-09-22 23:45:14 +00:00
upgrade : bininstall
2003-02-04 16:35:12 +00:00
2002-06-21 01:40:13 +00:00
2015-10-30 18:22:23 +00:00
# Install configuration files from the specified directory
# Parameters:
# (1) the configuration directory to install from
# (2) the extension to strip off
d e f i n e I N S T A L L _ C O N F I G S
@for x in configs/$( 1) /*$( 2) ; do \
dst = " $( DESTDIR) $( ASTETCDIR) /` $( BASENAME) $$ x $( 2) ` " ; \
2011-08-25 15:30:46 +00:00
if [ -f " $$ {dst} " ] ; then \
2004-11-19 14:04:57 +00:00
if [ " $( OVERWRITE) " = "y" ] ; then \
2011-08-25 15:30:46 +00:00
if cmp -s " $$ {dst} " " $$ x " ; then \
2004-11-20 06:47:33 +00:00
echo " Config file $$ x is unchanged " ; \
continue ; \
fi ; \
2011-08-25 15:30:46 +00:00
mv -f " $$ {dst} " " $$ {dst}.old " ; \
2004-11-19 14:04:57 +00:00
else \
echo " Skipping config file $$ x " ; \
continue ; \
fi ; \
2000-01-05 20:03:55 +00:00
fi ; \
2007-11-05 19:22:56 +00:00
echo " Installing file $$ x " ; \
2011-08-25 15:30:46 +00:00
$( INSTALL) -m 644 " $$ x " " $$ {dst} " ; \
2015-10-30 18:22:23 +00:00
done ; \
2010-05-05 00:22:32 +00:00
if [ " $( OVERWRITE) " = "y" ] ; then \
2010-07-23 13:26:41 +00:00
echo "Updating asterisk.conf" ; \
sed -e 's|^astetcdir.*$$|astetcdir => $(ASTETCDIR)|' \
2012-01-30 21:21:16 +00:00
-e 's|^astmoddir.*$$|astmoddir => $(ASTMODDIR)|' \
2010-05-05 20:48:15 +00:00
-e 's|^astvarlibdir.*$$|astvarlibdir => $(ASTVARLIBDIR)|' \
-e 's|^astdbdir.*$$|astdbdir => $(ASTDBDIR)|' \
-e 's|^astkeydir.*$$|astkeydir => $(ASTKEYDIR)|' \
-e 's|^astdatadir.*$$|astdatadir => $(ASTDATADIR)|' \
-e 's|^astagidir.*$$|astagidir => $(AGI_DIR)|' \
-e 's|^astspooldir.*$$|astspooldir => $(ASTSPOOLDIR)|' \
-e 's|^astrundir.*$$|astrundir => $(ASTVARRUNDIR)|' \
-e 's|^astlogdir.*$$|astlogdir => $(ASTLOGDIR)|' \
2012-09-11 18:09:22 +00:00
-e 's|^astsbindir.*$$|astsbindir => $(ASTSBINDIR)|' \
2011-08-17 19:30:50 +00:00
" $( DESTDIR) $( ASTCONFPATH) " > " $( DESTDIR) $( ASTCONFPATH) .tmp " ; \
$( INSTALL) -m 644 " $( DESTDIR) $( ASTCONFPATH) .tmp " " $( DESTDIR) $( ASTCONFPATH) " ; \
rm -f " $( DESTDIR) $( ASTCONFPATH) .tmp " ; \
2015-10-30 18:22:23 +00:00
fi
e n d e f
# XXX why *.adsi is installed first ?
adsi :
@echo Installing adsi config files...
$( INSTALL) -d " $( DESTDIR) $( ASTETCDIR) "
@for x in configs/samples/*.adsi; do \
dst = " $( DESTDIR) $( ASTETCDIR) /` $( BASENAME) $$ x` " ; \
if [ -f " $$ {dst} " ] ; then \
echo " Overwriting $$ x " ; \
else \
echo " Installing $$ x " ; \
fi ; \
$( INSTALL) -m 644 " $$ x " " $( DESTDIR) $( ASTETCDIR) /` $( BASENAME) $$ x` " ; \
done
samples : adsi
@echo Installing other config files...
$( call INSTALL_CONFIGS,samples,.sample)
2011-08-17 19:30:50 +00:00
$( INSTALL) -d " $( DESTDIR) $( ASTSPOOLDIR) /voicemail/default/1234/INBOX "
build_tools/make_sample_voicemail " $( DESTDIR) / $( ASTDATADIR) " " $( DESTDIR) / $( ASTSPOOLDIR) "
2008-07-10 20:56:20 +00:00
@for x in phoneprov/*; do \
dst = " $( DESTDIR) $( ASTDATADIR) / $$ x " ; \
2011-08-17 19:30:50 +00:00
if [ -f " $$ {dst} " ] ; then \
2008-07-10 20:56:20 +00:00
if [ " $( OVERWRITE) " = "y" ] ; then \
2011-08-17 19:30:50 +00:00
if cmp -s " $$ {dst} " " $$ x " ; then \
2008-07-10 20:56:20 +00:00
echo " Config file $$ x is unchanged " ; \
continue ; \
fi ; \
2011-08-17 19:30:50 +00:00
mv -f " $$ {dst} " " $$ {dst}.old " ; \
2008-07-10 20:56:20 +00:00
else \
echo " Skipping config file $$ x " ; \
continue ; \
fi ; \
fi ; \
echo " Installing file $$ x " ; \
2011-08-17 19:30:50 +00:00
$( INSTALL) -m 644 " $$ x " " $$ {dst} " ; \
2008-07-10 20:56:20 +00:00
done
2001-09-24 21:29:03 +00:00
2015-10-30 18:22:23 +00:00
basic-pbx :
@echo Installing basic-pbx config files...
$( call INSTALL_CONFIGS,basic-pbx)
2002-06-21 01:40:13 +00:00
webvmail :
2011-08-17 19:30:50 +00:00
@[ -d " $( DESTDIR) $( HTTP_DOCSDIR) / " ] || ( printf "http docs directory not found.\nUpdate assignment of variable HTTP_DOCSDIR in Makefile!\n" && exit 1 )
@[ -d " $( DESTDIR) $( HTTP_CGIDIR) " ] || ( printf "cgi-bin directory not found.\nUpdate assignment of variable HTTP_CGIDIR in Makefile!\n" && exit 1 )
$( INSTALL) -m 4755 contrib/scripts/vmail.cgi " $( DESTDIR) $( HTTP_CGIDIR) /vmail.cgi "
$( INSTALL) -d " $( DESTDIR) $( HTTP_DOCSDIR) /_asterisk "
2002-06-21 01:40:13 +00:00
for x in images/*.gif; do \
2011-08-17 19:30:50 +00:00
$( INSTALL) -m 644 $$ x " $( DESTDIR) $( HTTP_DOCSDIR) /_asterisk/ " ; \
2002-06-21 01:40:13 +00:00
done
2012-01-30 21:21:16 +00:00
@echo " +--------- Asterisk Web Voicemail ----------+"
2002-06-21 01:40:13 +00:00
@echo " + +"
@echo " + Asterisk Web Voicemail is installed in +"
2005-07-12 02:08:03 +00:00
@echo " + your cgi-bin directory: +"
@echo " + $( DESTDIR) $( HTTP_CGIDIR) "
@echo " + IT USES A SETUID ROOT PERL SCRIPT, SO +"
@echo " + IF YOU DON'T LIKE THAT, UNINSTALL IT! +"
@echo " + +"
@echo " + Other static items have been stored in: +"
@echo " + $( DESTDIR) $( HTTP_DOCSDIR) "
@echo " + +"
@echo " + If these paths do not match your httpd +"
@echo " + installation, correct the definitions +"
@echo " + in your Makefile of HTTP_CGIDIR and +"
@echo " + HTTP_DOCSDIR +"
2002-06-21 01:40:13 +00:00
@echo " + +"
2012-01-30 21:21:16 +00:00
@echo " +-------------------------------------------+"
2002-06-21 01:40:13 +00:00
2001-09-24 21:29:03 +00:00
progdocs :
2015-05-07 19:54:35 +00:00
# Note, Makefile conditionals must not be tabbed out. Wasted hours with that.
@cp doc/asterisk-ng-doxygen.in doc/asterisk-ng-doxygen
2012-10-13 15:06:39 +00:00
ifeq ($(DOXYGEN), : )
@echo "Doxygen is not installed. Please install and re-run the configuration script."
e l s e
ifeq ($(DOT), : )
@echo "DOT is not installed. Doxygen will not produce any diagrams. Please install and re-run the configuration script."
e l s e
# Enable DOT
2015-05-07 19:54:35 +00:00
@echo "HAVE_DOT = YES" >> doc/asterisk-ng-doxygen
2012-10-13 15:06:39 +00:00
e n d i f
# Set Doxygen PROJECT_NUMBER variable
2012-10-13 16:05:12 +00:00
i f n e q ( $( ASTERISKVERSION ) , U N K N O W N _ _ a n d _ p r o b a b l y _ u n s u p p o r t e d )
2015-05-07 19:54:35 +00:00
@echo " PROJECT_NUMBER = $( ASTERISKVERSION) " >> doc/asterisk-ng-doxygen
2012-10-13 16:05:12 +00:00
e l s e
echo "Asterisk Version is unknown, not configuring Doxygen PROJECT_NUMBER."
e n d i f
2015-05-07 19:54:35 +00:00
# Validate and auto-update local copy
@doxygen -u doc/asterisk-ng-doxygen
2012-10-13 15:06:39 +00:00
# Run Doxygen
2015-05-07 19:54:35 +00:00
@doxygen doc/asterisk-ng-doxygen
2012-10-13 15:06:39 +00:00
# Remove configuration backup file
2015-05-07 19:54:35 +00:00
@rm -f doc/asterisk-ng-doxygen.bak
2012-10-13 15:06:39 +00:00
e n d i f
2002-06-21 01:40:13 +00:00
2008-07-24 04:51:42 +00:00
install-logrotate :
2011-08-17 19:30:50 +00:00
if [ ! -d " $( DESTDIR) $( ASTETCDIR) /../logrotate.d " ] ; then \
$( INSTALL) -d " $( DESTDIR) $( ASTETCDIR) /../logrotate.d " ; \
2008-07-24 04:51:42 +00:00
fi
2008-07-24 05:21:00 +00:00
sed 's#__LOGDIR__#$(ASTLOGDIR)#g' < contrib/scripts/asterisk.logrotate | sed 's#__SBINDIR__#$(ASTSBINDIR)#g' > contrib/scripts/asterisk.logrotate.tmp
2011-08-17 19:30:50 +00:00
$( INSTALL) -m 0644 contrib/scripts/asterisk.logrotate.tmp " $( DESTDIR) $( ASTETCDIR) /../logrotate.d/asterisk "
2008-07-24 05:21:00 +00:00
rm -f contrib/scripts/asterisk.logrotate.tmp
2008-07-24 04:51:42 +00:00
2002-06-21 01:40:13 +00:00
config :
2016-07-18 09:14:59 +00:00
@if [ -f /etc/redhat-release -o -f /etc/fedora-release ] ; then \
2016-05-18 15:58:20 +00:00
./build_tools/install_subst contrib/init.d/rc.redhat.asterisk " $( DESTDIR) /etc/rc.d/init.d/asterisk " ; \
if [ ! -f " $( DESTDIR) /etc/sysconfig/asterisk " ] ; then \
$( INSTALL) -m 644 contrib/init.d/etc_default_asterisk " $( DESTDIR) /etc/sysconfig/asterisk " ; \
fi ; \
if [ -z " $( DESTDIR) " ] ; then \
/sbin/chkconfig --add asterisk ; \
fi ; \
elif [ -f /etc/debian_version ] ; then \
./build_tools/install_subst contrib/init.d/rc.debian.asterisk " $( DESTDIR) /etc/init.d/asterisk " ; \
if [ ! -f " $( DESTDIR) /etc/default/asterisk " ] ; then \
$( INSTALL) -m 644 contrib/init.d/etc_default_asterisk " $( DESTDIR) /etc/default/asterisk " ; \
fi ; \
if [ -z " $( DESTDIR) " ] ; then \
/usr/sbin/update-rc.d asterisk defaults 50 91 ; \
fi ; \
elif [ -f /etc/gentoo-release ] ; then \
./build_tools/install_subst contrib/init.d/rc.gentoo.asterisk " $( DESTDIR) /etc/init.d/asterisk " ; \
if [ -z " $( DESTDIR) " ] ; then \
/sbin/rc-update add asterisk default ; \
fi ; \
elif [ -f /etc/mandrake-release -o -f /etc/mandriva-release ] ; then \
./build_tools/install_subst contrib/init.d/rc.mandriva.asterisk " $( DESTDIR) /etc/rc.d/init.d/asterisk " ; \
if [ ! -f /etc/sysconfig/asterisk ] ; then \
$( INSTALL) -m 644 contrib/init.d/etc_default_asterisk " $( DESTDIR) /etc/sysconfig/asterisk " ; \
fi ; \
if [ -z " $( DESTDIR) " ] ; then \
/sbin/chkconfig --add asterisk ; \
fi ; \
elif [ -f /etc/SuSE-release -o -f /etc/novell-release ] ; then \
./build_tools/install_subst contrib/init.d/rc.suse.asterisk " $( DESTDIR) /etc/init.d/asterisk " ; \
if [ ! -f /etc/sysconfig/asterisk ] ; then \
$( INSTALL) -m 644 contrib/init.d/etc_default_asterisk " $( DESTDIR) /etc/sysconfig/asterisk " ; \
fi ; \
if [ -z " $( DESTDIR) " ] ; then \
/sbin/chkconfig --add asterisk ; \
fi ; \
elif [ -f /etc/arch-release -o -f /etc/arch-release ] ; then \
./build_tools/install_subst contrib/init.d/rc.archlinux.asterisk " $( DESTDIR) /etc/init.d/asterisk " ; \
elif [ -d " $( DESTDIR) /Library/LaunchDaemons " ] ; then \
if [ ! -f " $( DESTDIR) /Library/LaunchDaemons/org.asterisk.asterisk.plist " ] ; then \
./build_tools/install_subst contrib/init.d/org.asterisk.asterisk.plist " $( DESTDIR) /Library/LaunchDaemons/org.asterisk.asterisk.plist " ; \
fi ; \
if [ ! -f " $( DESTDIR) /Library/LaunchDaemons/org.asterisk.muted.plist " ] ; then \
./build_tools/install_subst contrib/init.d/org.asterisk.muted.plist " $( DESTDIR) /Library/LaunchDaemons/org.asterisk.muted.plist " ; \
fi ; \
elif [ -f /etc/slackware-version ] ; then \
echo "Slackware is not currently supported, although an init script does exist for it." ; \
2006-05-05 22:49:55 +00:00
else \
2016-05-18 15:58:20 +00:00
echo "We could not install init scripts for your distribution." ; \
2006-05-05 22:49:55 +00:00
fi
2002-06-21 01:40:13 +00:00
2006-06-07 20:54:30 +00:00
sounds :
$( MAKE) -C sounds all
2005-01-17 04:48:51 +00:00
# If the cleancount has been changed, force a make clean.
2012-01-30 21:21:16 +00:00
# .cleancount is the global clean count, and .lastclean is the
2005-04-01 21:18:39 +00:00
# last clean count we had
2005-01-17 04:48:51 +00:00
2013-04-15 17:26:49 +00:00
.lastclean : .cleancount
@$( MAKE) clean
2011-07-06 20:58:12 +00:00
@[ -f " $( DESTDIR) $( ASTDBDIR) /astdb.sqlite3 " ] || [ ! -f " $( DESTDIR) $( ASTDBDIR) /astdb " ] || [ ! -f menuselect.makeopts ] || grep -q MENUSELECT_UTILS = .*astdb2sqlite3 menuselect.makeopts || ( sed -i.orig -e's/MENUSELECT_UTILS=\(.*\)/MENUSELECT_UTILS=\1 astdb2sqlite3/' menuselect.makeopts && echo "Updating menuselect.makeopts to include astdb2sqlite3" && echo "Original version backed up to menuselect.makeopts.orig" )
2006-02-01 18:39:41 +00:00
2006-06-22 15:38:13 +00:00
$(SUBDIRS_UNINSTALL) :
build-system: Allow building with static pjproject
Background here:
http://lists.digium.com/pipermail/asterisk-dev/2016-January/075266.html
From CHANGES:
* To help insure that Asterisk is compiled and run with the same known
version of pjproject, a new option (--with-pjproject-bundled) has been
added to ./configure. When specified, the version of pjproject specified
in third-party/versions.mak will be downloaded and configured. When you
make Asterisk, the build process will also automatically build pjproject
and Asterisk will be statically linked to it. Once a particular version
of pjproject is configured and built, it won't be configured or built
again unless you run a 'make distclean'.
To facilitate testing, when 'make install' is run, the pjsua and pjsystest
utilities and the pjproject python bindings will be installed in
ASTDATADIR/third-party/pjproject.
The default behavior remains building with the shared pjproject
installation, if any.
Building:
All you have to do is include the --with-pjproject-bundled option on
the ./configure command line (and remove any existing --with-pjproject
option if specified). Everything else is automatic.
Behind the scenes:
The top-level Makefile was modified to include 'third-party' in the
list of MOD_SUBDIRS.
The third-party directory was created to contain any third party
packages that may be needed in the future. Its Makefile automatically
iterates over any subdirectories passing on targets.
The third-party/pjproject directory was created to house the pjproject
source distribution. Its Makefile contains targets to download, patch
configure, generate dependencies, compile libs, apps and python bindings,
sanitized build.mak and generate a symbols list.
When bootstrap.sh is run, it automatically includes the configure.m4
file in third-party/pjproject. This file has a macro to download and
conifgure pjproject and get and set PJPROJECT_INCLUDE, PJPROJECT_DIR
and PJPROJECT_BUNDLED. It also tests for the capabilities like
PJ_TRANSACTION_GRP_LOCK by parsing preprocessor output as opposed to
trying to compile. Of course, bootstrap.sh is only run once and the
configure file is incldued in the patch.
When configure is run with the new options, the macro in configure.m4
triggers the download, patch, conifgure and tests. No compilation is
performed at this time. The downloaded tarball is cached in /tmp so
it doesn't get downloaded again on a distclean.
When make is run in the top-level Asterisk source directory, it will
automatically descend all the subdirectories in third_party just as it
does for addons, apps, etc. The top-level Makefile makes sure that
the 'third-party' is built before 'main' so that dependencies from the
other directories are built first.
When main does build, a new shared library (libasteriskpj) is created that
links statically to the pjproject .a files and exports all their symbols.
The asterisk binary links to that, just as it does with libasteriskssl.
When Asterisk is installed, the pjsua and pjsystest apps, and the pjproject
python bindings are installed in ASTDATADIR/third-party/pjproject. This
will facilitate testing, including running the testsuite which will be
updated to check that directory for the pjsua module ahead of the system
python library.
Modules should continue to depend on pjproject if they use pjproject APIs
directly. They should not care about the implementation. No changes to any
res_pjsip modules were made.
Change-Id: Ia7a60c28c2e9ba9537c5570f933c1ebcb20a3103
2016-01-19 03:54:28 +00:00
+@DESTDIR= " $( DESTDIR) " ASTSBINDIR = " $( ASTSBINDIR) " ASTDATADIR = " $( ASTDATADIR) " $( SUBMAKE) -C $( @:-uninstall= ) uninstall
2006-06-22 15:38:13 +00:00
2012-01-30 21:21:16 +00:00
main-binuninstall :
+@DESTDIR= " $( DESTDIR) " ASTSBINDIR = " $( ASTSBINDIR) " ASTLIBDIR = " $( ASTLIBDIR) " $( SUBMAKE) -C main binuninstall
_uninstall : $( SUBDIRS_UNINSTALL ) main -binuninstall
rm -f " $( DESTDIR) $( ASTMODDIR) / " *
2017-03-28 18:01:16 +00:00
test -n " $( _oldmoddir) " -a -d " $( _oldmoddir) " && rm -f " $( _oldmoddir) / " * || :
2011-08-17 19:30:50 +00:00
rm -f " $( DESTDIR) $( ASTSBINDIR) /astgenkey "
rm -f " $( DESTDIR) $( ASTSBINDIR) /autosupport "
rm -rf " $( DESTDIR) $( ASTHEADERDIR) "
rm -rf " $( DESTDIR) $( ASTDATADIR) /firmware "
rm -f " $( DESTDIR) $( ASTMANDIR) /man8/asterisk.8 "
rm -f " $( DESTDIR) $( ASTMANDIR) /man8/astgenkey.8 "
rm -f " $( DESTDIR) $( ASTMANDIR) /man8/autosupport.8 "
rm -f " $( DESTDIR) $( ASTMANDIR) /man8/safe_asterisk.8 "
2014-09-18 15:07:12 +00:00
i f e q ( $( HAVE_DAHDI ) , 1 )
rm -f $( DESTDIR) $( DAHDI_UDEV_HOOK_DIR) /40-asterisk
e n d i f
2006-06-07 21:05:05 +00:00
$( MAKE) -C sounds uninstall
build: Execute ldconfig to build cache. (take two)
On some platforms a multiarch approach is used for libraries.
The build system does not take this into account and still
places libraries into the lib directory if no --libdir is
specified to configure. On initial startup this results in
libasteriskssl.so not being found, as it is not in the multiarch
lib directory. To make matters worse, options were being passed
to ldconfig on both Linux and FreeBSD that actually prevented
the rebuild of the cache.
* Fedora has a /usr/share/config.site that automatically tells
autoconf to use /usr/lib64 but CentOS does not. This logic was
copied to configure.ac and modified so systems like Ubuntu,
which still use /usr/lib for 64-bit systems, aren't affected.
Now that we have them in the correct directory...
In order for the system loader to find libasteriskssl and
libasteriskpj, one of 3 things has to happen...
- The linker cache must be rebuilt including the directory
where the libasterisk* libraries were installed. Only root
can rebuild the cache. This was busted.
- We have to link the asterisk binary with an rpath pointing
to the directrory where the libasterisk* libraries were
installed. This makes things very complicated and will happen
over the collective dead bodies of everyone who's had to
package a distribution with an rpath.
- Finally, you can start asterisk with LD_LIBRARY_PATH set to the
directrory where the libasterisk* libraries were installed.
There are no other options. So...
* The invokation of ldconfig has been moved from main/Makefile
to ASTTOPDIR/Makefile, the options have been removed, and
DESTDIR/ASTLIBDIR appended. If you aren't root, you will be
warned after the "Asterisk Installation Compete" banner that
you must re-run 'make install' as root, manually run
'ldconfig DESTDIR/ASTLIBDIR' as root, or run asterisk with
LD_LIBRARY_PATH.
ASTERISK-26705
Change-Id: I2a64b7c33a7d3e9bde20f47e3d3ab771977af982
2017-02-23 21:49:17 +00:00
i f n e q ( $( LDCONFIG ) , )
$( LDCONFIG) || :
e n d i f
2006-02-01 18:39:41 +00:00
2011-08-25 19:01:39 +00:00
uninstall : _uninstall
2012-01-30 21:21:16 +00:00
@echo " +--------- Asterisk Uninstall Complete -----+"
@echo " + Asterisk binaries, sounds, man pages, +"
@echo " + headers, modules, and firmware builds, +"
@echo " + have all been uninstalled. +"
2006-02-01 18:39:41 +00:00
@echo " + +"
@echo " + To remove ALL traces of Asterisk, +"
@echo " + including configuration, spool +"
@echo " + directories, and logs, run the following +"
@echo " + command: +"
@echo " + +"
2012-01-30 21:21:16 +00:00
@echo " + $( mK) uninstall-all + "
@echo " +-------------------------------------------+"
2006-02-01 18:39:41 +00:00
uninstall-all : _uninstall
2012-01-30 21:34:52 +00:00
rm -rf " $( DESTDIR) $( ASTMODDIR) "
2017-03-28 18:01:16 +00:00
test -n " $( _oldmoddir) " -a -d " $( _oldmoddir) " && rm -rf " $( _oldmoddir) " || :
2011-08-17 19:30:50 +00:00
rm -rf " $( DESTDIR) $( ASTVARLIBDIR) "
rm -rf " $( DESTDIR) $( ASTDATADIR) "
rm -rf " $( DESTDIR) $( ASTSPOOLDIR) "
rm -rf " $( DESTDIR) $( ASTETCDIR) "
rm -rf " $( DESTDIR) $( ASTLOGDIR) "
2006-04-24 17:11:45 +00:00
2006-11-11 15:33:06 +00:00
menuconfig : menuselect
2008-03-05 23:21:52 +00:00
cmenuconfig : cmenuselect
2007-03-15 23:56:10 +00:00
gmenuconfig : gmenuselect
2008-03-05 22:50:00 +00:00
nmenuconfig : nmenuselect
2008-06-28 14:34:07 +00:00
menuselect : menuselect /cmenuselect menuselect /nmenuselect menuselect /gmenuselect
@if [ -x menuselect/nmenuselect ] ; then \
$( MAKE) nmenuselect; \
elif [ -x menuselect/cmenuselect ] ; then \
$( MAKE) cmenuselect; \
elif [ -x menuselect/gmenuselect ] ; then \
$( MAKE) gmenuselect; \
2008-06-28 14:46:08 +00:00
else \
2008-06-28 14:56:56 +00:00
echo "No menuselect user interface found. Install ncurses," ; \
echo "newt or GTK libraries to build one and re-rerun" ; \
2011-01-12 15:59:28 +00:00
echo "'./configure' and 'make menuselect'." ; \
2008-06-28 14:34:07 +00:00
fi
2006-04-24 17:11:45 +00:00
2009-12-10 21:01:39 +00:00
cmenuselect : menuselect /cmenuselect menuselect -tree menuselect .makeopts
-@menuselect/cmenuselect menuselect.makeopts && ( echo "menuselect changes saved!" ; rm -f channels/h323/Makefile.ast main/asterisk) || echo "menuselect changes NOT saved!"
2008-03-05 23:21:52 +00:00
2009-12-10 21:01:39 +00:00
gmenuselect : menuselect /gmenuselect menuselect -tree menuselect .makeopts
-@menuselect/gmenuselect menuselect.makeopts && ( echo "menuselect changes saved!" ; rm -f channels/h323/Makefile.ast main/asterisk) || echo "menuselect changes NOT saved!"
2007-03-15 23:56:10 +00:00
2009-12-10 21:01:39 +00:00
nmenuselect : menuselect /nmenuselect menuselect -tree menuselect .makeopts
-@menuselect/nmenuselect menuselect.makeopts && ( echo "menuselect changes saved!" ; rm -f channels/h323/Makefile.ast main/asterisk) || echo "menuselect changes NOT saved!"
2008-03-05 22:50:00 +00:00
2007-12-18 08:20:17 +00:00
# options for make in menuselect/
2015-05-10 07:26:30 +00:00
MAKE_MENUSELECT = CC = " $( BUILD_CC) " CXX = " $( CXX) " LD = "" AR = "" RANLIB = "" \
2012-05-09 19:26:08 +00:00
CFLAGS = " $( BUILD_CFLAGS) " LDFLAGS = " $( BUILD_LDFLAGS) " \
$( MAKE) -C menuselect CONFIGURE_SILENT = "--silent"
2007-12-18 08:20:17 +00:00
2013-04-15 17:26:49 +00:00
menuselect/menuselect : menuselect /makeopts .lastclean
2009-06-09 18:08:53 +00:00
+$( MAKE_MENUSELECT) menuselect
2006-04-24 17:11:45 +00:00
2013-04-15 17:26:49 +00:00
menuselect/cmenuselect : menuselect /makeopts .lastclean
2009-06-09 18:08:53 +00:00
+$( MAKE_MENUSELECT) cmenuselect
2008-03-05 23:21:52 +00:00
2013-04-15 17:26:49 +00:00
menuselect/gmenuselect : menuselect /makeopts .lastclean
2009-06-09 18:08:53 +00:00
+$( MAKE_MENUSELECT) gmenuselect
2007-11-07 11:15:42 +00:00
2013-04-15 17:26:49 +00:00
menuselect/nmenuselect : menuselect /makeopts .lastclean
2009-06-09 18:08:53 +00:00
+$( MAKE_MENUSELECT) nmenuselect
2008-03-05 22:50:00 +00:00
2013-04-15 17:26:49 +00:00
menuselect/makeopts : makeopts .lastclean
2009-06-09 18:08:53 +00:00
+$( MAKE_MENUSELECT) makeopts
2007-03-15 23:56:10 +00:00
2017-03-24 12:43:05 +00:00
menuselect-tree : $( foreach dir ,$ ( filter -out main ,$ ( MOD_SUBDIRS ) ) ,$ ( wildcard $ ( dir ) /*.c ) $ ( wildcard $ ( dir ) /*.cc ) $ ( wildcard $ ( dir ) /*.xml ) ) build_tools /cflags .xml build_tools /cflags -devmode .xml sounds /sounds .xml utils /utils .xml agi /agi .xml configure makeopts
2006-08-21 02:11:39 +00:00
@echo "Generating input for menuselect ..."
2007-12-17 07:25:35 +00:00
@echo "<?xml version=\"1.0\"?>" > $@
@echo >> $@
@echo "<menu name=\"Asterisk Module and Build Option Selection\">" >> $@
2009-06-09 18:08:53 +00:00
+@for dir in $( sort $( filter-out main,$( MOD_SUBDIRS) ) ) ; do $( SILENTMAKE) -C $$ { dir} SUBDIR = $$ { dir} moduleinfo >> $@ ; done
2007-12-17 07:25:35 +00:00
@cat build_tools/cflags.xml >> $@
2009-06-09 18:08:53 +00:00
+@for dir in $( sort $( filter-out main,$( MOD_SUBDIRS) ) ) ; do $( SILENTMAKE) -C $$ { dir} SUBDIR = $$ { dir} makeopts >> $@ ; done
2008-03-19 17:15:14 +00:00
@if [ " ${ AST_DEVMODE } " = "yes" ] ; then \
cat build_tools/cflags-devmode.xml >> $@ ; \
fi
2009-10-22 19:33:32 +00:00
@cat utils/utils.xml >> $@
2009-10-23 16:40:30 +00:00
@cat agi/agi.xml >> $@
2007-12-17 07:25:35 +00:00
@cat sounds/sounds.xml >> $@
@echo "</menu>" >> $@
2006-06-22 15:38:13 +00:00
2013-04-22 14:58:53 +00:00
# We don't want to require Python or Pystache for every build, so this is its
# own target.
Update events to use Swagger 1.3 subtyping, and related aftermath
This patch started with the simple idea of changing the /events data
model to be more sane. The original model would send out events like:
{ "stasis_start": { "args": [], "channel": { ... } } }
The event discriminator was the field name instead of being a value in
the object, due to limitations in how Swagger 1.1 could model objects.
While technically sufficient in communicating event information, it was
really difficult to deal with in terms of client side JSON handling.
This patch takes advantage of a proposed extension[1] to Swagger which
allows type variance through the use of a discriminator field. This had
a domino effect that made this a surprisingly large patch.
[1]: https://groups.google.com/d/msg/wordnik-api/EC3rGajE0os/ey_5dBI_jWcJ
In changing the models, I also had to change the swagger_model.py
processor so it can handle the type discriminator and subtyping. I took
that a big step forward, and using that information to generate an
ari_model module, which can validate a JSON object against the Swagger
model.
The REST and WebSocket generators were changed to take advantage of the
validators. If compiled with AST_DEVMODE enabled, JSON objects that
don't match their corresponding models will not be sent out. For REST
API calls, a 500 Internal Server response is sent. For WebSockets, the
invalid JSON message is replaced with an error message.
Since this took over about half of the job of the existing JSON
generators, and the .to_json virtual function on messages took over the
other half, I reluctantly removed the generators.
The validators turned up all sorts of errors and inconsistencies in our
data models, and the code. These were cleaned up, with checks in the
code generator avoid some of the consistency problems in the future.
* The model for a channel snapshot was trimmed down to match the
information sent via AMI. Many of the field being sent were not
useful in the general case.
* The model for a bridge snapshot was updated to be more consistent
with the other ARI models.
Another impact of introducing subtyping was that the swagger-codegen
documentation generator was insufficient (at least until it catches up
with Swagger 1.2). I wanted it to be easier to generate docs for the API
anyways, so I ported the wiki pages to use the Asterisk Swagger
generator. In the process, I was able to clean up many of the model
links, which would occasionally give inconsistent results on the wiki. I
also added error responses to the wiki docs, making the wiki
documentation more complete.
Finally, since Stasis-HTTP will now be named Asterisk REST Interface
(ARI), any new functions and files I created carry the ari_ prefix. I
changed a few stasis_http references to ari where it was non-intrusive
and made sense.
(closes issue ASTERISK-21885)
Review: https://reviewboard.asterisk.org/r/2639/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-03 16:32:41 +00:00
ari-stubs :
2013-04-22 14:58:53 +00:00
ifeq ($(PYTHON), : )
@echo "--------------------------------------------------------------------------"
Update events to use Swagger 1.3 subtyping, and related aftermath
This patch started with the simple idea of changing the /events data
model to be more sane. The original model would send out events like:
{ "stasis_start": { "args": [], "channel": { ... } } }
The event discriminator was the field name instead of being a value in
the object, due to limitations in how Swagger 1.1 could model objects.
While technically sufficient in communicating event information, it was
really difficult to deal with in terms of client side JSON handling.
This patch takes advantage of a proposed extension[1] to Swagger which
allows type variance through the use of a discriminator field. This had
a domino effect that made this a surprisingly large patch.
[1]: https://groups.google.com/d/msg/wordnik-api/EC3rGajE0os/ey_5dBI_jWcJ
In changing the models, I also had to change the swagger_model.py
processor so it can handle the type discriminator and subtyping. I took
that a big step forward, and using that information to generate an
ari_model module, which can validate a JSON object against the Swagger
model.
The REST and WebSocket generators were changed to take advantage of the
validators. If compiled with AST_DEVMODE enabled, JSON objects that
don't match their corresponding models will not be sent out. For REST
API calls, a 500 Internal Server response is sent. For WebSockets, the
invalid JSON message is replaced with an error message.
Since this took over about half of the job of the existing JSON
generators, and the .to_json virtual function on messages took over the
other half, I reluctantly removed the generators.
The validators turned up all sorts of errors and inconsistencies in our
data models, and the code. These were cleaned up, with checks in the
code generator avoid some of the consistency problems in the future.
* The model for a channel snapshot was trimmed down to match the
information sent via AMI. Many of the field being sent were not
useful in the general case.
* The model for a bridge snapshot was updated to be more consistent
with the other ARI models.
Another impact of introducing subtyping was that the swagger-codegen
documentation generator was insufficient (at least until it catches up
with Swagger 1.2). I wanted it to be easier to generate docs for the API
anyways, so I ported the wiki pages to use the Asterisk Swagger
generator. In the process, I was able to clean up many of the model
links, which would occasionally give inconsistent results on the wiki. I
also added error responses to the wiki docs, making the wiki
documentation more complete.
Finally, since Stasis-HTTP will now be named Asterisk REST Interface
(ARI), any new functions and files I created carry the ari_ prefix. I
changed a few stasis_http references to ari where it was non-intrusive
and made sense.
(closes issue ASTERISK-21885)
Review: https://reviewboard.asterisk.org/r/2639/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-03 16:32:41 +00:00
@echo "--- Please install python to build ARI stubs ---"
2013-04-22 14:58:53 +00:00
@echo "--------------------------------------------------------------------------"
@false
e l s e
2015-04-29 11:17:00 +00:00
@$( INSTALL) -d doc/rest-api
Update events to use Swagger 1.3 subtyping, and related aftermath
This patch started with the simple idea of changing the /events data
model to be more sane. The original model would send out events like:
{ "stasis_start": { "args": [], "channel": { ... } } }
The event discriminator was the field name instead of being a value in
the object, due to limitations in how Swagger 1.1 could model objects.
While technically sufficient in communicating event information, it was
really difficult to deal with in terms of client side JSON handling.
This patch takes advantage of a proposed extension[1] to Swagger which
allows type variance through the use of a discriminator field. This had
a domino effect that made this a surprisingly large patch.
[1]: https://groups.google.com/d/msg/wordnik-api/EC3rGajE0os/ey_5dBI_jWcJ
In changing the models, I also had to change the swagger_model.py
processor so it can handle the type discriminator and subtyping. I took
that a big step forward, and using that information to generate an
ari_model module, which can validate a JSON object against the Swagger
model.
The REST and WebSocket generators were changed to take advantage of the
validators. If compiled with AST_DEVMODE enabled, JSON objects that
don't match their corresponding models will not be sent out. For REST
API calls, a 500 Internal Server response is sent. For WebSockets, the
invalid JSON message is replaced with an error message.
Since this took over about half of the job of the existing JSON
generators, and the .to_json virtual function on messages took over the
other half, I reluctantly removed the generators.
The validators turned up all sorts of errors and inconsistencies in our
data models, and the code. These were cleaned up, with checks in the
code generator avoid some of the consistency problems in the future.
* The model for a channel snapshot was trimmed down to match the
information sent via AMI. Many of the field being sent were not
useful in the general case.
* The model for a bridge snapshot was updated to be more consistent
with the other ARI models.
Another impact of introducing subtyping was that the swagger-codegen
documentation generator was insufficient (at least until it catches up
with Swagger 1.2). I wanted it to be easier to generate docs for the API
anyways, so I ported the wiki pages to use the Asterisk Swagger
generator. In the process, I was able to clean up many of the model
links, which would occasionally give inconsistent results on the wiki. I
also added error responses to the wiki docs, making the wiki
documentation more complete.
Finally, since Stasis-HTTP will now be named Asterisk REST Interface
(ARI), any new functions and files I created carry the ari_ prefix. I
changed a few stasis_http references to ari where it was non-intrusive
and made sense.
(closes issue ASTERISK-21885)
Review: https://reviewboard.asterisk.org/r/2639/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-03 16:32:41 +00:00
$( PYTHON) rest-api-templates/make_ari_stubs.py \
rest-api/resources.json .
2013-04-22 14:58:53 +00:00
e n d i f
2016-01-21 22:40:47 +00:00
check-alembic : makeopts
@find contrib/ast-db-manage/ -name '*.pyc' -delete
@ALEMBIC= $( ALEMBIC) build_tools/make_check_alembic config cdr voicemail >& 2
2009-10-23 14:02:42 +00:00
.PHONY : menuselect
.PHONY : main
.PHONY : sounds
.PHONY : clean
.PHONY : dist -clean
.PHONY : distclean
.PHONY : all
2012-01-17 19:45:19 +00:00
.PHONY : _all
2013-02-04 19:52:14 +00:00
.PHONY : full
.PHONY : _full
2009-10-23 14:02:42 +00:00
.PHONY : prereqs
.PHONY : uninstall
.PHONY : _uninstall
.PHONY : uninstall -all
.PHONY : dont -optimize
.PHONY : badshell
.PHONY : installdirs
.PHONY : validate -docs
.PHONY : _clean
Update events to use Swagger 1.3 subtyping, and related aftermath
This patch started with the simple idea of changing the /events data
model to be more sane. The original model would send out events like:
{ "stasis_start": { "args": [], "channel": { ... } } }
The event discriminator was the field name instead of being a value in
the object, due to limitations in how Swagger 1.1 could model objects.
While technically sufficient in communicating event information, it was
really difficult to deal with in terms of client side JSON handling.
This patch takes advantage of a proposed extension[1] to Swagger which
allows type variance through the use of a discriminator field. This had
a domino effect that made this a surprisingly large patch.
[1]: https://groups.google.com/d/msg/wordnik-api/EC3rGajE0os/ey_5dBI_jWcJ
In changing the models, I also had to change the swagger_model.py
processor so it can handle the type discriminator and subtyping. I took
that a big step forward, and using that information to generate an
ari_model module, which can validate a JSON object against the Swagger
model.
The REST and WebSocket generators were changed to take advantage of the
validators. If compiled with AST_DEVMODE enabled, JSON objects that
don't match their corresponding models will not be sent out. For REST
API calls, a 500 Internal Server response is sent. For WebSockets, the
invalid JSON message is replaced with an error message.
Since this took over about half of the job of the existing JSON
generators, and the .to_json virtual function on messages took over the
other half, I reluctantly removed the generators.
The validators turned up all sorts of errors and inconsistencies in our
data models, and the code. These were cleaned up, with checks in the
code generator avoid some of the consistency problems in the future.
* The model for a channel snapshot was trimmed down to match the
information sent via AMI. Many of the field being sent were not
useful in the general case.
* The model for a bridge snapshot was updated to be more consistent
with the other ARI models.
Another impact of introducing subtyping was that the swagger-codegen
documentation generator was insufficient (at least until it catches up
with Swagger 1.2). I wanted it to be easier to generate docs for the API
anyways, so I ported the wiki pages to use the Asterisk Swagger
generator. In the process, I was able to clean up many of the model
links, which would occasionally give inconsistent results on the wiki. I
also added error responses to the wiki docs, making the wiki
documentation more complete.
Finally, since Stasis-HTTP will now be named Asterisk REST Interface
(ARI), any new functions and files I created carry the ari_ prefix. I
changed a few stasis_http references to ari where it was non-intrusive
and made sense.
(closes issue ASTERISK-21885)
Review: https://reviewboard.asterisk.org/r/2639/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-03 16:32:41 +00:00
.PHONY : ari -stubs
2015-10-30 18:22:23 +00:00
.PHONY : basic -pbx
2016-01-21 22:40:47 +00:00
.PHONY : check -alembic
build: Execute ldconfig to build cache. (take two)
On some platforms a multiarch approach is used for libraries.
The build system does not take this into account and still
places libraries into the lib directory if no --libdir is
specified to configure. On initial startup this results in
libasteriskssl.so not being found, as it is not in the multiarch
lib directory. To make matters worse, options were being passed
to ldconfig on both Linux and FreeBSD that actually prevented
the rebuild of the cache.
* Fedora has a /usr/share/config.site that automatically tells
autoconf to use /usr/lib64 but CentOS does not. This logic was
copied to configure.ac and modified so systems like Ubuntu,
which still use /usr/lib for 64-bit systems, aren't affected.
Now that we have them in the correct directory...
In order for the system loader to find libasteriskssl and
libasteriskpj, one of 3 things has to happen...
- The linker cache must be rebuilt including the directory
where the libasterisk* libraries were installed. Only root
can rebuild the cache. This was busted.
- We have to link the asterisk binary with an rpath pointing
to the directrory where the libasterisk* libraries were
installed. This makes things very complicated and will happen
over the collective dead bodies of everyone who's had to
package a distribution with an rpath.
- Finally, you can start asterisk with LD_LIBRARY_PATH set to the
directrory where the libasterisk* libraries were installed.
There are no other options. So...
* The invokation of ldconfig has been moved from main/Makefile
to ASTTOPDIR/Makefile, the options have been removed, and
DESTDIR/ASTLIBDIR appended. If you aren't root, you will be
warned after the "Asterisk Installation Compete" banner that
you must re-run 'make install' as root, manually run
'ldconfig DESTDIR/ASTLIBDIR' as root, or run asterisk with
LD_LIBRARY_PATH.
ASTERISK-26705
Change-Id: I2a64b7c33a7d3e9bde20f47e3d3ab771977af982
2017-02-23 21:49:17 +00:00
.PHONY : ld -cache -update
2017-02-27 18:25:01 +00:00
.PHONY : check -old -libdir
2009-10-23 14:02:42 +00:00
.PHONY : $( SUBDIRS_INSTALL )
.PHONY : $( SUBDIRS_DIST_CLEAN )
.PHONY : $( SUBDIRS_CLEAN )
.PHONY : $( SUBDIRS_UNINSTALL )
.PHONY : $( SUBDIRS )
2008-07-30 15:32:14 +00:00
FORCE :