You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2014/01/21 00:08:18 UTC

[39/50] git commit: TS-2498: add a build option to install the example plugins

TS-2498: add a build option to install the example plugins

Add the --enable--example-plugins build option to build example
plugins. The naming of this option follows the precedent of the
--enable-experimental-plugins option. The example plugins are always
built, but this option will also cause them to be installed, which
makes them easier to test.


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/9ca808b6
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/9ca808b6
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/9ca808b6

Branch: refs/heads/5.0.x
Commit: 9ca808b6720d5379c05418d9de539d591537c3a2
Parents: b25bce3
Author: James Peach <jp...@apache.org>
Authored: Tue Jan 14 20:42:40 2014 -0800
Committer: James Peach <jp...@apache.org>
Committed: Wed Jan 15 15:56:29 2014 -0800

----------------------------------------------------------------------
 CHANGES              |  2 ++
 ci/jenkins/jobs.yaml |  8 ++++----
 ci/regression        |  1 +
 configure.ac         | 14 ++++++++++++++
 example/Makefile.am  |  8 +++++++-
 5 files changed, 28 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9ca808b6/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index f3d260b..971c085 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 4.2.0
 
+  *) [TS-2498] Add a build option to install the example plugins.
+
   *) [TS-2484] Add API support for the two missing overridable APIs:
          proxy.config.http.cache.max_open_read_retries
          proxy.config.http.cache.open_read_retry_time

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9ca808b6/ci/jenkins/jobs.yaml
----------------------------------------------------------------------
diff --git a/ci/jenkins/jobs.yaml b/ci/jenkins/jobs.yaml
index 6d49047..a76ebe2 100644
--- a/ci/jenkins/jobs.yaml
+++ b/ci/jenkins/jobs.yaml
@@ -48,7 +48,7 @@
         - shell: |
             cd "${WORKSPACE}/build/${JOB_NAME}.${BUILD_NUMBER}"
             export DEB_BUILD_HARDENING
-            "${WORKSPACE}"/src/configure --prefix="${WORKSPACE}/install/${JOB_NAME}.${BUILD_NUMBER}" --enable-werror --enable-experimental-plugins $ENABLE_WCCP $ENABLE_DEBUG $ENABLE_EXPERIMENTAL
+            "${WORKSPACE}"/src/configure --prefix="${WORKSPACE}/install/${JOB_NAME}.${BUILD_NUMBER}" --enable-werror --enable-experimental-plugins --enable-example-plugins $ENABLE_WCCP $ENABLE_DEBUG $ENABLE_EXPERIMENTAL
             make -j2 V=1
             make check
             make install
@@ -71,7 +71,7 @@
             export CXX=clang++
             export CXXFLAGS="-Qunused-arguments -std=c++11"
             export WITH_LIBCPLUSPLUS=yes
-            "${WORKSPACE}"/src/configure --prefix="${WORKSPACE}/install/${JOB_NAME}.${BUILD_NUMBER}" --enable-werror --enable-experimental-plugins $ENABLE_WCCP $ENABLE_DEBUG $ENABLE_EXPERIMENTAL
+            "${WORKSPACE}"/src/configure --prefix="${WORKSPACE}/install/${JOB_NAME}.${BUILD_NUMBER}" --enable-werror --enable-experimental-plugins --enable-example-plugins $ENABLE_WCCP $ENABLE_DEBUG $ENABLE_EXPERIMENTAL
             make -j2 V=1
             make check
             make install
@@ -92,7 +92,7 @@
             ( cd "${WORKSPACE}/src" && git clean -dfxq  && autoreconf -fi )
         - shell: |
             cd "${WORKSPACE}/build/${JOB_NAME}.${BUILD_NUMBER}"
-            "${WORKSPACE}"/src/configure --prefix="${WORKSPACE}/install/${JOB_NAME}.${BUILD_NUMBER}" --enable-werror --enable-experimental-plugins $ENABLE_DEBUG
+            "${WORKSPACE}"/src/configure --prefix="${WORKSPACE}/install/${JOB_NAME}.${BUILD_NUMBER}" --enable-werror --enable-experimental-plugins --enable-example-plugins $ENABLE_DEBUG
             gmake -j2 V=1
             gmake check
             gmake install
@@ -119,7 +119,7 @@
             export CXXFLAGS=-m64
             export CPPFLAGS=-I/opt/omni/include
             export LDFLAGS="-L/opt/omni/lib/amd64 -R/opt/omni/lib/amd64"
-            "${WORKSPACE}"/src/configure --prefix="${WORKSPACE}/install/${JOB_NAME}.${BUILD_NUMBER}" --enable-werror --with-tcl=/opt/omni/lib/amd64 --enable-experimental-plugins $ENABLE_DEBUG $ENABLE_EXPERIMENTAL
+            "${WORKSPACE}"/src/configure --prefix="${WORKSPACE}/install/${JOB_NAME}.${BUILD_NUMBER}" --enable-werror --with-tcl=/opt/omni/lib/amd64 --enable-experimental-plugins --enable-example-plugins $ENABLE_DEBUG $ENABLE_EXPERIMENTAL
             gmake -j2 V=1
             gmake check
             gmake install

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9ca808b6/ci/regression
----------------------------------------------------------------------
diff --git a/ci/regression b/ci/regression
index 0728498..01acaaa 100755
--- a/ci/regression
+++ b/ci/regression
@@ -88,6 +88,7 @@ configure() {
       --prefix=$DSTROOT \
       --enable-debug \
       --enable-werror \
+      --enable-example-plugins \
       --enable-experimental-plugins \
       $(extras) \
       CC="$CC" \

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9ca808b6/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index fdc88ca..ebffa6f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -459,6 +459,20 @@ AC_ARG_ENABLE([experimental-plugins],
 AC_MSG_RESULT([$enable_experimental_plugins])
 AM_CONDITIONAL([BUILD_EXPERIMENTAL_PLUGINS], [ test "x${enable_experimental_plugins}" = "xyes" ])
 
+#
+# Example plugins. The example plugins are always built, but not always installed. Installing
+# them is useful for QA, but not useful for most users, so we default this to disabled.
+#
+
+AC_MSG_CHECKING([whether to install example plugins])
+AC_ARG_ENABLE([example-plugins],
+  [AS_HELP_STRING([--enable-example-plugins],[install example plugins])],
+  [],
+  [enable_example_plugins=no]
+)
+AC_MSG_RESULT([$enable_example_plugins])
+AM_CONDITIONAL([BUILD_EXAMPLE_PLUGINS], [ test "x${enable_example_plugins}" = "xyes" ])
+
 
 #
 # build c++ api

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9ca808b6/example/Makefile.am
----------------------------------------------------------------------
diff --git a/example/Makefile.am b/example/Makefile.am
index 024edd0..b79bbee 100644
--- a/example/Makefile.am
+++ b/example/Makefile.am
@@ -18,7 +18,7 @@ include $(top_srcdir)/build/plugins.mk
 
 AM_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
 
-noinst_LTLIBRARIES = \
+plugins = \
   add-header.la \
   append-transform.la \
   basic-auth.la \
@@ -41,6 +41,12 @@ noinst_LTLIBRARIES = \
   thread-1.la \
   version.la
 
+if BUILD_EXAMPLE_PLUGINS
+pkglib_LTLIBRARIES = $(plugins)
+else
+noinst_LTLIBRARIES = $(plugins)
+endif
+
 add_header_la_SOURCES = add-header/add-header.c
 append_transform_la_SOURCES = append-transform/append-transform.c
 basic_auth_la_SOURCES = basic-auth/basic-auth.c