trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bc...@apache.org
Subject [trafficserver] branch 8.0.x updated: Collapses the cmd/ build into one single build unit
Date Tue, 12 Jun 2018 21:14:47 GMT
This is an automated email from the ASF dual-hosted git repository.

bcall pushed a commit to branch 8.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/8.0.x by this push:
     new 5ff5fad  Collapses the cmd/ build into one single build unit
5ff5fad is described below

commit 5ff5fadca00ee42e01aef130dfec1894a234e4e5
Author: Leif Hedstrom <zwoop@apache.org>
AuthorDate: Wed Jun 6 16:26:51 2018 +0200

    Collapses the cmd/ build into one single build unit
    
    This allows make -j to build all of these things much efficiently,
    since it's seen as a single build unit. This is similar to how we
    already build the plugins/ directory.
    
    (cherry picked from commit 09e25db45bbb67934d657ab5ba38a8a45e8fdea2)
---
 cmd/Makefile.am                                    | 36 +++++++++------
 cmd/traffic_cache_tool/Makefile.am                 | 47 -------------------
 cmd/traffic_cache_tool/Makefile.inc                | 51 +++++++++++++++++++++
 cmd/traffic_crashlog/{Makefile.am => Makefile.inc} | 39 ++++++++--------
 cmd/traffic_ctl/{Makefile.am => Makefile.inc}      | 42 ++++++++---------
 cmd/traffic_layout/{Makefile.am => Makefile.inc}   | 45 +++++++++----------
 cmd/traffic_logcat/{Makefile.am => Makefile.inc}   | 23 +++++-----
 cmd/traffic_logstats/{Makefile.am => Makefile.inc} | 28 ++++++------
 cmd/traffic_logstats/tests/test_logstats_json      |  4 +-
 cmd/traffic_logstats/tests/test_logstats_summary   |  4 +-
 cmd/traffic_manager/{Makefile.am => Makefile.inc}  | 49 +++++++++-----------
 cmd/traffic_server/{Makefile.am => Makefile.inc}   | 52 ++++++++++------------
 cmd/traffic_top/{Makefile.am => Makefile.inc}      | 20 ++++-----
 cmd/traffic_via/{Makefile.am => Makefile.inc}      | 25 +++++------
 cmd/traffic_wccp/{Makefile.am => Makefile.inc}     | 33 +++++++-------
 configure.ac                                       | 11 -----
 16 files changed, 241 insertions(+), 268 deletions(-)

diff --git a/cmd/Makefile.am b/cmd/Makefile.am
index 3370dfb..5fc1b2e 100644
--- a/cmd/Makefile.am
+++ b/cmd/Makefile.am
@@ -15,20 +15,30 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-SUBDIRS = \
-	traffic_cache_tool \
-	traffic_crashlog \
-	traffic_ctl \
-	traffic_layout \
-	traffic_logcat \
-	traffic_logstats \
-	traffic_manager \
-	traffic_server \
-	traffic_top \
-	traffic_via
+include $(top_srcdir)/build/tidy.mk
 
-TESTS = $(check_PROGRAMS)
+bin_PROGRAMS =
+check_PROGRAMS =
+TESTS =
+
+include traffic_cache_tool/Makefile.inc
+include traffic_via/Makefile.inc
+include traffic_top/Makefile.inc
+include traffic_manager/Makefile.inc
+include traffic_server/Makefile.inc
+include traffic_logstats/Makefile.inc
+include traffic_crashlog/Makefile.inc
+include traffic_ctl/Makefile.inc
+include traffic_layout/Makefile.inc
+include traffic_logcat/Makefile.inc
 
 if BUILD_WCCP
-SUBDIRS += traffic_wccp
+include traffic_wccp/Makefile.inc
 endif
+
+TESTS += \
+	$(check_PROGRAMS)
+
+clang-tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
+	$(CC_Clang_Tidy)
diff --git a/cmd/traffic_cache_tool/Makefile.am b/cmd/traffic_cache_tool/Makefile.am
deleted file mode 100644
index c8c4c36..0000000
--- a/cmd/traffic_cache_tool/Makefile.am
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# Cache Tool Makefile
-#
-#  Licensed to the Apache Software Foundation (ASF) under one
-#  or more contributor license agreements.  See the NOTICE file
-#  distributed with this work for additional information
-#  regarding copyright ownership.  The ASF licenses this file
-#  to you under the Apache License, Version 2.0 (the
-#  "License"); you may not use this file except in compliance
-#  with the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-#  limitations under the License.
-
-	
-include $(top_srcdir)/build/tidy.mk
-
-AM_CPPFLAGS = -I $(top_srcdir)/lib -D__STDC_FORMAT_MACROS
-
-noinst_PROGRAMS = traffic_cache_tool
-
-traffic_cache_tool_SOURCES = CacheDefs.h CacheDefs.cc CacheTool.cc File.h File.cc Command.h
Command.cc CacheScan.h CacheScan.cc
-traffic_cache_tool_LDADD = \
-	$(top_builddir)/lib/ts/.libs/ink_assert.o \
-	$(top_builddir)/lib/ts/.libs/ink_code.o \
-	$(top_builddir)/lib/ts/.libs/ink_error.o \
-	$(top_builddir)/lib/ts/.libs/ink_file.o \
-	$(top_builddir)/lib/ts/.libs/ink_memory.o \
-	$(top_builddir)/lib/ts/.libs/ink_string.o \
-	$(top_builddir)/lib/ts/.libs/BufferWriterFormat.o \
-	$(top_builddir)/lib/ts/.libs/TextView.o \
-	$(top_builddir)/lib/tsconfig/.libs/Errata.o \
-	$(top_builddir)/lib/ts/.libs/Regex.o \
-	$(top_builddir)/lib/ts/.libs/CryptoHash.o \
-	$(top_builddir)/lib/ts/.libs/MMH.o \
-	@OPENSSL_LIBS@ @LIBPCRE@ @LIBTCL@
-	
-
-all-am: Makefile $(PROGRAMS)
-
-clang-tidy-local: $(DIST_SOURCES)
-	$(CXX_Clang_Tidy)
diff --git a/cmd/traffic_cache_tool/Makefile.inc b/cmd/traffic_cache_tool/Makefile.inc
new file mode 100644
index 0000000..71c5d1f
--- /dev/null
+++ b/cmd/traffic_cache_tool/Makefile.inc
@@ -0,0 +1,51 @@
+#
+# Cache Tool Makefile
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+
+bin_PROGRAMS += traffic_cache_tool/traffic_cache_tool
+
+traffic_cache_tool_traffic_cache_tool_CPPFLAGS = \
+    $(AM_CPPFLAGS) \
+    -I $(top_srcdir)/lib \
+    -D__STDC_FORMAT_MACROS
+
+traffic_cache_tool_traffic_cache_tool_SOURCES = \
+    traffic_cache_tool/CacheDefs.h \
+    traffic_cache_tool/CacheDefs.cc \
+    traffic_cache_tool/CacheTool.cc \
+    traffic_cache_tool/File.h \
+    traffic_cache_tool/File.cc \
+    traffic_cache_tool/Command.h \
+    traffic_cache_tool/Command.cc \
+    traffic_cache_tool/CacheScan.h \
+    traffic_cache_tool/CacheScan.cc
+
+traffic_cache_tool_traffic_cache_tool_LDADD = \
+    $(top_builddir)/lib/ts/.libs/ink_assert.o \
+    $(top_builddir)/lib/ts/.libs/ink_code.o \
+    $(top_builddir)/lib/ts/.libs/ink_error.o \
+    $(top_builddir)/lib/ts/.libs/ink_file.o \
+    $(top_builddir)/lib/ts/.libs/ink_memory.o \
+    $(top_builddir)/lib/ts/.libs/ink_string.o \
+    $(top_builddir)/lib/ts/.libs/BufferWriterFormat.o \
+    $(top_builddir)/lib/ts/.libs/TextView.o \
+    $(top_builddir)/lib/tsconfig/.libs/Errata.o \
+    $(top_builddir)/lib/ts/.libs/Regex.o \
+    $(top_builddir)/lib/ts/.libs/CryptoHash.o \
+    $(top_builddir)/lib/ts/.libs/MMH.o \
+    @OPENSSL_LIBS@ @LIBPCRE@ @LIBTCL@
diff --git a/cmd/traffic_crashlog/Makefile.am b/cmd/traffic_crashlog/Makefile.inc
similarity index 63%
rename from cmd/traffic_crashlog/Makefile.am
rename to cmd/traffic_crashlog/Makefile.inc
index cd8305f..90f8add 100644
--- a/cmd/traffic_crashlog/Makefile.am
+++ b/cmd/traffic_crashlog/Makefile.inc
@@ -15,26 +15,28 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-bin_PROGRAMS = traffic_crashlog
+bin_PROGRAMS += traffic_crashlog/traffic_crashlog
 
-AM_CPPFLAGS += \
-	$(iocore_include_dirs) \
-	-I$(abs_top_srcdir)/lib \
-	-I$(abs_top_srcdir)/lib/records \
-	-I$(abs_top_srcdir)/mgmt \
-	-I$(abs_top_srcdir)/mgmt/utils \
-	-I$(abs_top_srcdir)/mgmt/api/include \
-	$(TS_INCLUDES)
+traffic_crashlog_traffic_crashlog_CPPFLAGS = \
+    $(AM_CPPFLAGS) \
+    $(iocore_include_dirs) \
+    -I$(abs_top_srcdir)/lib \
+    -I$(abs_top_srcdir)/lib/records \
+    -I$(abs_top_srcdir)/mgmt \
+    -I$(abs_top_srcdir)/mgmt/utils \
+    -I$(abs_top_srcdir)/mgmt/api/include \
+    $(TS_INCLUDES)
 
-AM_LDFLAGS += \
-	@OPENSSL_LDFLAGS@
+traffic_crashlog_traffic_crashlog_LDFLAGS = \
+    $(AM_LDFLAGS) \
+    @OPENSSL_LDFLAGS@
 
-traffic_crashlog_SOURCES = \
-	procinfo.cc \
-	traffic_crashlog.cc \
-	traffic_crashlog.h
+traffic_crashlog_traffic_crashlog_SOURCES = \
+	traffic_crashlog/procinfo.cc \
+	traffic_crashlog/traffic_crashlog.cc \
+	traffic_crashlog/traffic_crashlog.h
 
-traffic_crashlog_LDADD = \
+traffic_crashlog_traffic_crashlog_LDADD = \
 	$(top_builddir)/lib/records/librecords_p.a \
 	$(top_builddir)/mgmt/libmgmt_p.la \
 	$(top_builddir)/proxy/shared/libUglyLogStubs.a \
@@ -42,8 +44,3 @@ traffic_crashlog_LDADD = \
 	$(top_builddir)/mgmt/api/libtsmgmt.la \
 	$(top_builddir)/lib/ts/libtsutil.la \
 	@LIBTCL@ @HWLOC_LIBS@
-
-include $(top_srcdir)/build/tidy.mk
-
-clang-tidy-local: $(DIST_SOURCES)
-	$(CXX_Clang_Tidy)
diff --git a/cmd/traffic_ctl/Makefile.am b/cmd/traffic_ctl/Makefile.inc
similarity index 67%
rename from cmd/traffic_ctl/Makefile.am
rename to cmd/traffic_ctl/Makefile.inc
index b9d8424..23dca97 100644
--- a/cmd/traffic_ctl/Makefile.am
+++ b/cmd/traffic_ctl/Makefile.inc
@@ -17,27 +17,28 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-AM_CPPFLAGS += \
-	$(iocore_include_dirs) \
-	-I$(abs_top_srcdir)/lib \
-	-I$(abs_top_srcdir)/lib/records \
-	-I$(abs_top_srcdir)/mgmt \
-	-I$(abs_top_srcdir)/mgmt/api/include \
-	$(TS_INCLUDES)
+bin_PROGRAMS += traffic_ctl/traffic_ctl
 
-bin_PROGRAMS = traffic_ctl
+traffic_ctl_traffic_ctl_CPPFLAGS = \
+    $(AM_CPPFLAGS) \
+    $(iocore_include_dirs) \
+    -I$(abs_top_srcdir)/lib \
+    -I$(abs_top_srcdir)/lib/records \
+    -I$(abs_top_srcdir)/mgmt \
+    -I$(abs_top_srcdir)/mgmt/api/include \
+    $(TS_INCLUDES)
 
-traffic_ctl_SOURCES = \
-	alarm.cc \
-	config.cc \
-	metric.cc \
-	plugin.cc \
-	server.cc \
-	storage.cc \
-	host.cc \
-	traffic_ctl.cc
+traffic_ctl_traffic_ctl_SOURCES = \
+	traffic_ctl/alarm.cc \
+	traffic_ctl/config.cc \
+	traffic_ctl/metric.cc \
+	traffic_ctl/plugin.cc \
+	traffic_ctl/server.cc \
+	traffic_ctl/storage.cc \
+	traffic_ctl/host.cc \
+	traffic_ctl/traffic_ctl.cc
 
-traffic_ctl_LDADD = \
+traffic_ctl_traffic_ctl_LDADD = \
 	$(top_builddir)/lib/records/librecords_p.a \
 	$(top_builddir)/mgmt/libmgmt_p.la \
 	$(top_builddir)/iocore/eventsystem/libinkevent.a \
@@ -45,8 +46,3 @@ traffic_ctl_LDADD = \
 	$(top_builddir)/mgmt/api/libtsmgmt.la \
 	$(top_builddir)/lib/ts/libtsutil.la \
 	@LIBTCL@ @HWLOC_LIBS@
-
-include $(top_srcdir)/build/tidy.mk
-
-clang-tidy-local: $(DIST_SOURCES)
-	$(CXX_Clang_Tidy)
diff --git a/cmd/traffic_layout/Makefile.am b/cmd/traffic_layout/Makefile.inc
similarity index 61%
rename from cmd/traffic_layout/Makefile.am
rename to cmd/traffic_layout/Makefile.inc
index ccae509..eaeacf9 100644
--- a/cmd/traffic_layout/Makefile.am
+++ b/cmd/traffic_layout/Makefile.inc
@@ -15,37 +15,34 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-bin_PROGRAMS = traffic_layout
+bin_PROGRAMS += traffic_layout/traffic_layout
 
-AM_CPPFLAGS += \
-	$(iocore_include_dirs) \
-	-I$(abs_top_srcdir)/lib \
-	-I$(abs_top_srcdir)/lib/records \
-	-I$(abs_top_srcdir)/mgmt \
-	-I$(abs_top_srcdir)/mgmt/utils \
-	$(TS_INCLUDES)
+traffic_layout_traffic_layout_CPPFLAGS = \
+    $(AM_CPPFLAGS) \
+    $(iocore_include_dirs) \
+    -I$(abs_top_srcdir)/lib \
+    -I$(abs_top_srcdir)/lib/records \
+    -I$(abs_top_srcdir)/mgmt \
+    -I$(abs_top_srcdir)/mgmt/utils \
+    $(TS_INCLUDES)
 
-AM_LDFLAGS += \
-	@OPENSSL_LDFLAGS@
+traffic_layout_traffic_layout_LDFLAGS =	\
+    $(AM_LDFLAGS) \
+    @OPENSSL_LDFLAGS@
 
-traffic_layout_SOURCES = \
-	traffic_layout.cc \
-	file_system.cc \
-	file_system.h \
-	engine.cc \
-	engine.h \
-	info.cc \
-	info.h
+traffic_layout_traffic_layout_SOURCES = \
+	traffic_layout/traffic_layout.cc \
+	traffic_layout/file_system.cc \
+	traffic_layout/file_system.h \
+	traffic_layout/engine.cc \
+	traffic_layout/engine.h \
+	traffic_layout/info.cc \
+	traffic_layout/info.h
 
-traffic_layout_LDADD = \
+traffic_layout_traffic_layout_LDADD = \
 	$(top_builddir)/lib/records/librecords_p.a \
 	$(top_builddir)/mgmt/libmgmt_p.la \
 	$(top_builddir)/proxy/shared/libUglyLogStubs.a \
 	$(top_builddir)/iocore/eventsystem/libinkevent.a \
 	$(top_builddir)/lib/ts/libtsutil.la \
 	@LIBTCL@ @HWLOC_LIBS@
-
-include $(top_srcdir)/build/tidy.mk
-
-clang-tidy-local: $(DIST_SOURCES)
-	$(CXX_Clang_Tidy)
diff --git a/cmd/traffic_logcat/Makefile.am b/cmd/traffic_logcat/Makefile.inc
similarity index 81%
rename from cmd/traffic_logcat/Makefile.am
rename to cmd/traffic_logcat/Makefile.inc
index ad171e4..f46c098 100644
--- a/cmd/traffic_logcat/Makefile.am
+++ b/cmd/traffic_logcat/Makefile.inc
@@ -17,7 +17,10 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-AM_CPPFLAGS += \
+bin_PROGRAMS += traffic_logcat/traffic_logcat
+
+traffic_logcat_traffic_logcat_CPPFLAGS = \
+    $(AM_CPPFLAGS) \
 	$(iocore_include_dirs) \
 	-I$(abs_top_srcdir)/lib \
 	-I$(abs_top_srcdir)/lib/records \
@@ -28,10 +31,10 @@ AM_CPPFLAGS += \
 	-I$(abs_top_srcdir)/mgmt/utils \
 	$(TS_INCLUDES)
 
-bin_PROGRAMS = traffic_logcat
+traffic_logcat_traffic_logcat_SOURCES = \
+    traffic_logcat/logcat.cc
 
-traffic_logcat_SOURCES = logcat.cc
-traffic_logcat_LDADD = \
+traffic_logcat_traffic_logcat_LDADD = \
 	$(top_builddir)/proxy/logging/liblogging.a \
 	$(top_builddir)/proxy/shared/libdiagsconfig.a \
 	$(top_builddir)/proxy/shared/libUglyLogStubs.a \
@@ -42,19 +45,15 @@ traffic_logcat_LDADD = \
 	$(top_builddir)/lib/bindings/libbindings.la
 
 if BUILD_LUAJIT
-traffic_logcat_LDADD += \
+traffic_logcat_traffic_logcat_LDADD += \
 	$(top_builddir)/lib/luajit/src/libluajit.a
 endif
 
-traffic_logcat_LDADD += \
+traffic_logcat_traffic_logcat_LDADD += \
 	@LIBTCL@ @HWLOC_LIBS@\
 	@LIBPROFILER@ -lm
 
 if SYSTEM_LUAJIT
-traffic_logcat_LDADD += @LIBLUAJIT@
+traffic_logcat_traffic_logcat_LDADD += \
+    @LIBLUAJIT@
 endif
-
-include $(top_srcdir)/build/tidy.mk
-
-clang-tidy-local: $(DIST_SOURCES)
-	$(CXX_Clang_Tidy)
diff --git a/cmd/traffic_logstats/Makefile.am b/cmd/traffic_logstats/Makefile.inc
similarity index 76%
rename from cmd/traffic_logstats/Makefile.am
rename to cmd/traffic_logstats/Makefile.inc
index b643e5b..347c005 100644
--- a/cmd/traffic_logstats/Makefile.am
+++ b/cmd/traffic_logstats/Makefile.inc
@@ -17,7 +17,10 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-AM_CPPFLAGS += \
+bin_PROGRAMS += traffic_logstats/traffic_logstats
+
+traffic_logstats_traffic_logstats_CPPFLAGS = \
+    $(AM_CPPFLAGS) \
 	$(iocore_include_dirs) \
 	-I$(abs_top_srcdir)/lib \
 	-I$(abs_top_srcdir)/lib/records \
@@ -28,14 +31,14 @@ AM_CPPFLAGS += \
 	-I$(abs_top_srcdir)/mgmt/utils \
 	$(TS_INCLUDES)
 
-bin_PROGRAMS = traffic_logstats
+TESTS += \
+	traffic_logstats/tests/test_logstats_json \
+	traffic_logstats/tests/test_logstats_summary
 
-TESTS = \
-	tests/test_logstats_json \
-	tests/test_logstats_summary
+traffic_logstats_traffic_logstats_SOURCES = \
+    traffic_logstats/logstats.cc
 
-traffic_logstats_SOURCES = logstats.cc
-traffic_logstats_LDADD = \
+traffic_logstats_traffic_logstats_LDADD = \
 	$(top_builddir)/proxy/logging/liblogging.a \
 	$(top_builddir)/proxy/shared/libdiagsconfig.a \
 	$(top_builddir)/proxy/shared/libUglyLogStubs.a \
@@ -46,19 +49,14 @@ traffic_logstats_LDADD = \
 	$(top_builddir)/lib/bindings/libbindings.la
 
 if BUILD_LUAJIT
-traffic_logstats_LDADD += \
+traffic_logstats_traffic_logstats_LDADD += \
   $(top_builddir)/lib/luajit/src/libluajit.a
 endif
 
-traffic_logstats_LDADD += \
+traffic_logstats_traffic_logstats_LDADD += \
   @LIBTCL@ @HWLOC_LIBS@ \
   @LIBPROFILER@ -lm
 
 if SYSTEM_LUAJIT
-traffic_logstats_LDADD += @LIBLUAJIT@
+traffic_logstats_traffic_logstats_LDADD += @LIBLUAJIT@
 endif
-
-include $(top_srcdir)/build/tidy.mk
-
-clang-tidy-local: $(DIST_SOURCES)
-	$(CXX_Clang_Tidy)
diff --git a/cmd/traffic_logstats/tests/test_logstats_json b/cmd/traffic_logstats/tests/test_logstats_json
index 4676db9..413ad42 100755
--- a/cmd/traffic_logstats/tests/test_logstats_json
+++ b/cmd/traffic_logstats/tests/test_logstats_json
@@ -20,9 +20,9 @@ set -e # exit on error
 
 TMPDIR=${TMPDIR:-/tmp}
 tmpfile=$(mktemp "$TMPDIR/logstats.XXXXXX")
-srcdir=$(cd $srcdir && pwd)
+srcdir=$(cd $srcdir && pwd)/traffic_logstats
 
 # Note that the JSON has a timestamp in it that we have to filter out ...
-./traffic_logstats --log_file "$srcdir/tests/logstats.blog" --json | fgrep -v 'timestamp'
| fgrep -v 'symbol xid' > "$tmpfile"
+./traffic_logstats/traffic_logstats --log_file "$srcdir/tests/logstats.blog" --json | fgrep
-v 'timestamp' | fgrep -v 'symbol xid' >"$tmpfile"
 diff "$tmpfile" "$srcdir/tests/logstats.json"
 rm -f -- "$tmpfile"
diff --git a/cmd/traffic_logstats/tests/test_logstats_summary b/cmd/traffic_logstats/tests/test_logstats_summary
index 75e3cc6..a7c32e6 100755
--- a/cmd/traffic_logstats/tests/test_logstats_summary
+++ b/cmd/traffic_logstats/tests/test_logstats_summary
@@ -22,8 +22,8 @@ TMPDIR=${TMPDIR:-/tmp}
 tmpfile=$(mktemp "$TMPDIR/logstats.XXXXXX")
 
 # Automake sets $srcdir.
-srcdir=$(cd $srcdir && pwd)
+srcdir=$(cd $srcdir && pwd)/traffic_logstats
 
-./traffic_logstats --log_file "$srcdir/tests/logstats.blog" --summary | fgrep -v 'symbol
xid' > "$tmpfile"
+./traffic_logstats/traffic_logstats --log_file "$srcdir/tests/logstats.blog" --summary |
fgrep -v 'symbol xid' >"$tmpfile"
 diff "$tmpfile" "$srcdir/tests/logstats.summary"
 rm -f -- "$tmpfile"
diff --git a/cmd/traffic_manager/Makefile.am b/cmd/traffic_manager/Makefile.inc
similarity index 72%
rename from cmd/traffic_manager/Makefile.am
rename to cmd/traffic_manager/Makefile.inc
index 9152614..e7b8374 100644
--- a/cmd/traffic_manager/Makefile.am
+++ b/cmd/traffic_manager/Makefile.inc
@@ -15,10 +15,10 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-bin_PROGRAMS = traffic_manager
+bin_PROGRAMS += traffic_manager/traffic_manager
 
-AM_CPPFLAGS += \
-	$(LUAJIT_CPPFLAGS) \
+traffic_manager_traffic_manager_CPPFLAGS = \
+    $(AM_CPPFLAGS) \
 	$(iocore_include_dirs) \
 	-I$(abs_top_srcdir)/lib/records \
 	-I$(abs_top_srcdir)/proxy/hdrs \
@@ -31,58 +31,53 @@ AM_CPPFLAGS += \
 	$(TS_INCLUDES)
 
 if BUILD_LUAJIT
-AM_CPPFLAGS += \
+traffic_manager_traffic_manager_CPPFLAGS += \
 	-I$(abs_top_srcdir)/lib/luajit/src
 endif
 
-AM_LDFLAGS += \
+traffic_manager_traffic_manager_LDFLAGS = \
+    $(AM_LDFLAGS) \
 	@OPENSSL_LDFLAGS@
 
-traffic_manager_SOURCES = \
-	AddConfigFilesHere.cc \
-	traffic_manager.cc
+traffic_manager_traffic_manager_SOURCES = \
+	traffic_manager/AddConfigFilesHere.cc \
+	traffic_manager/traffic_manager.cc
 
-traffic_manager_LDADD = \
+traffic_manager_traffic_manager_LDADD = \
 	$(top_builddir)/mgmt/api/libmgmtapilocal.la \
 	$(top_builddir)/mgmt/libmgmt_lm.la \
 	$(top_builddir)/proxy/hdrs/libhdrs.a \
 	$(top_builddir)/lib/ts/libtsutil.la \
 	$(top_builddir)/iocore/eventsystem/libinkevent.a \
 	$(top_builddir)/lib/records/librecords_lm.a \
-	$(top_builddir)/proxy/shared/libdiagsconfig.a
+	$(top_builddir)/proxy/shared/libdiagsconfig.a \
+   	$(LIBUNWIND_LIBS) \
+	@LIBPCRE@ @LIBTCL@ @LIBCAP@ @HWLOC_LIBS@ \
+	-lm
 
-AM_LDFLAGS += \
+if BUILD_LUAJIT
+traffic_manager_traffic_manager_LDFLAGS += \
+    $(AM_LDFLAGS) \
 	$(LUAJIT_LDFLAGS)
+endif
 
 if SYSTEM_LUAJIT
-traffic_manager_LDADD +=\
+traffic_manager_traffic_manager_LDADD += \
 	@LIBLUAJIT@
 endif
 
-traffic_manager_LDADD +=\
-	$(LIBUNWIND_LIBS) \
-	@LIBPCRE@ @LIBTCL@ @LIBCAP@ @HWLOC_LIBS@ \
-	-lm
-
 # Must do it this way or the dependencies aren't detected.
 if BUILD_WCCP
-
-traffic_manager_LDADD += \
+traffic_manager_traffic_manager_LDADD += \
 	$(top_builddir)/lib/wccp/libwccp.a \
 	$(top_builddir)/lib/tsconfig/libtsconfig.la \
 	@OPENSSL_LIBS@
-
 endif
 
-traffic_manager_LDADD += \
+traffic_manager_traffic_manager_LDADD += \
 	$(top_builddir)/lib/bindings/libbindings.la
 
 if BUILD_LUAJIT
-traffic_manager_LDADD += \
+traffic_manager_traffic_manager_LDADD += \
 	$(top_builddir)/lib/luajit/src/libluajit.a
 endif
-
-include $(top_srcdir)/build/tidy.mk
-
-clang-tidy-local: $(DIST_SOURCES)
-	$(CXX_Clang_Tidy)
diff --git a/cmd/traffic_server/Makefile.am b/cmd/traffic_server/Makefile.inc
similarity index 75%
rename from cmd/traffic_server/Makefile.am
rename to cmd/traffic_server/Makefile.inc
index dd5f4c0..9eeac17 100644
--- a/cmd/traffic_server/Makefile.am
+++ b/cmd/traffic_server/Makefile.inc
@@ -17,7 +17,10 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-AM_CPPFLAGS += \
+bin_PROGRAMS += traffic_server/traffic_server
+
+traffic_server_traffic_server_CPPFLAGS = \
+	$(AM_CPPFLAGS) \
 	$(iocore_include_dirs) \
 	-I$(abs_top_srcdir)/lib/records \
 	-I$(abs_top_srcdir)/proxy \
@@ -32,28 +35,26 @@ AM_CPPFLAGS += \
 	$(TS_INCLUDES) \
 	@OPENSSL_INCLUDES@
 
-bin_PROGRAMS = traffic_server
-
-traffic_server_SOURCES = \
-	CoreUtils.cc \
-	CoreUtils.h \
-	Crash.cc \
-	EventName.cc \
-	EventName.h \
-	FetchSM.cc \
-	FetchSM.h \
-	HostStatus.cc \
-	InkAPI.cc \
-	InkIOCoreAPI.cc \
-	SocksProxy.cc \
-	traffic_server.cc
+traffic_server_traffic_server_SOURCES = \
+	traffic_server/CoreUtils.cc \
+	traffic_server/CoreUtils.h \
+	traffic_server/Crash.cc \
+	traffic_server/EventName.cc \
+	traffic_server/EventName.h \
+	traffic_server/FetchSM.cc \
+	traffic_server/FetchSM.h \
+	traffic_server/HostStatus.cc \
+	traffic_server/InkAPI.cc \
+	traffic_server/InkIOCoreAPI.cc \
+	traffic_server/SocksProxy.cc \
+	traffic_server/traffic_server.cc
 
 if BUILD_TESTS
-traffic_server_SOURCES += \
-	InkAPITest.cc
+traffic_server_traffic_server_SOURCES += \
+	traffic_server/InkAPITest.cc
 endif
 
-traffic_server_LDADD = \
+traffic_server_traffic_server_LDADD = \
 	$(top_builddir)/proxy/http/libhttp.a \
 	$(top_builddir)/proxy/http/remap/libhttp_remap.a \
 	$(top_builddir)/proxy/http/remap/libhttp_remap.a \
@@ -75,11 +76,11 @@ traffic_server_LDADD = \
 
 # ToDo: When we remove this, we hould merge the two _LDADD rules here
 if BUILD_LUAJIT
-traffic_server_LDADD += \
+traffic_server_traffic_server_LDADD += \
 	$(top_builddir)/lib/luajit/src/libluajit.a
 endif
 
-traffic_server_LDADD += \
+traffic_server_traffic_server_LDADD += \
 	$(top_builddir)/iocore/net/libinknet.a \
 	$(top_builddir)/iocore/eventsystem/libinkevent.a \
 	$(top_builddir)/lib/records/librecords_p.a \
@@ -96,16 +97,11 @@ traffic_server_LDADD += \
 	-lm
 
 if BUILD_LUAJIT
-traffic_server_LDADD += $(LUAJIT:%=$(top_builddir)/lib/luajit/src/%)
+traffic_server_traffic_server_LDADD += $(LUAJIT:%=$(top_builddir)/lib/luajit/src/%)
 endif
 
 if SYSTEM_LUAJIT
-traffic_server_LDADD += @LIBLUAJIT@
+traffic_server_traffic_server_LDADD += @LIBLUAJIT@
 endif
 
 versiondir = $(pkgsysconfdir)
-
-include $(top_srcdir)/build/tidy.mk
-
-clang-tidy-local: $(noinst_HEADERS) $(traffic_server_SOURCES)
-	$(CXX_Clang_Tidy)
diff --git a/cmd/traffic_top/Makefile.am b/cmd/traffic_top/Makefile.inc
similarity index 85%
rename from cmd/traffic_top/Makefile.am
rename to cmd/traffic_top/Makefile.inc
index ad0eb90..2a969c1 100644
--- a/cmd/traffic_top/Makefile.am
+++ b/cmd/traffic_top/Makefile.inc
@@ -18,7 +18,10 @@
 # We only build traffic_top if libcurses and libcurl are available.
 if BUILD_TRAFFIC_TOP
 
-AM_CPPFLAGS += \
+bin_PROGRAMS += traffic_top/traffic_top
+
+traffic_top_traffic_top_CPPFLAGS = \
+    $(AM_CPPFLAGS) \
 	$(iocore_include_dirs) \
 	-I$(abs_top_srcdir)/lib \
 	-I$(abs_top_srcdir)/lib/records \
@@ -28,15 +31,15 @@ AM_CPPFLAGS += \
 	@CURL_CFLAGS@ \
 	@CURSES_CFLAGS@
 
-AM_LDFLAGS += \
+traffic_top_traffic_top_LDFLAGS = \
+    $(AM_LDFLAGS) \
 	@CURSES_LDFLAGS@ \
 	@OPENSSL_LDFLAGS@
 
-bin_PROGRAMS = traffic_top
-
-traffic_top_SOURCES = traffic_top.cc
+traffic_top_traffic_top_SOURCES = \
+    traffic_top/traffic_top.cc
 
-traffic_top_LDADD = \
+traffic_top_traffic_top_LDADD = \
 	$(top_builddir)/lib/records/librecords_p.a \
 	$(top_builddir)/mgmt/libmgmt_p.la \
 	$(top_builddir)/iocore/eventsystem/libinkevent.a \
@@ -48,8 +51,3 @@ traffic_top_LDADD = \
 	@LIBTCL@ @HWLOC_LIBS@
 
 endif
-
-include $(top_srcdir)/build/tidy.mk
-
-clang-tidy-local: $(DIST_SOURCES)
-	$(CXX_Clang_Tidy)
diff --git a/cmd/traffic_via/Makefile.am b/cmd/traffic_via/Makefile.inc
similarity index 77%
rename from cmd/traffic_via/Makefile.am
rename to cmd/traffic_via/Makefile.inc
index 63475c9..1ce8c71 100644
--- a/cmd/traffic_via/Makefile.am
+++ b/cmd/traffic_via/Makefile.inc
@@ -17,28 +17,25 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-AM_CPPFLAGS += \
+bin_PROGRAMS += traffic_via/traffic_via
+
+traffic_via_traffic_via_CPPFLAGS = \
+    $(AM_CPPFLAGS) \
 	$(iocore_include_dirs) \
 	-I$(abs_top_srcdir)/lib \
 	-I$(abs_top_srcdir)/mgmt/api/include \
 	$(TS_INCLUDES)
 
-AM_LDFLAGS += \
+traffic_via_traffic_via_LDFLAGS = \
+    $(AM_LDFLAGS) \
 	@OPENSSL_LDFLAGS@
 
-bin_PROGRAMS = traffic_via
-
-traffic_via_SOURCES = \
-	traffic_via.cc
+traffic_via_traffic_via_SOURCES = \
+	traffic_via/traffic_via.cc
 
-traffic_via_LDADD = \
+traffic_via_traffic_via_LDADD = \
 	$(top_builddir)/lib/ts/libtsutil.la \
 	@LIBPCRE@
 
-TESTS = \
-	test_traffic_via
-
-include $(top_srcdir)/build/tidy.mk
-
-clang-tidy-local: $(DIST_SOURCES)
-	$(CXX_Clang_Tidy)
+TESTS += \
+	traffic_via/test_traffic_via
diff --git a/cmd/traffic_wccp/Makefile.am b/cmd/traffic_wccp/Makefile.inc
similarity index 69%
rename from cmd/traffic_wccp/Makefile.am
rename to cmd/traffic_wccp/Makefile.inc
index fcc5b1b..119347b 100644
--- a/cmd/traffic_wccp/Makefile.am
+++ b/cmd/traffic_wccp/Makefile.inc
@@ -17,30 +17,27 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-AM_CPPFLAGS += \
-	$(iocore_include_dirs) \
-	-I$(abs_top_srcdir)/lib \
-	-I$(abs_top_srcdir)/lib/records \
-	-I$(abs_top_srcdir)/lib/wccp \
-	$(TS_INCLUDES) \
-	@OPENSSL_INCLUDES@
+bin_PROGRAMS += traffic_wccp/traffic_wccp
 
-AM_LDFLAGS += \
-	@OPENSSL_LDFLAGS@
+traffic_wccp_traffic_wccp_CPPFLAGS = \
+    $(AM_CPPFLAGS) \
+    $(iocore_include_dirs) \
+    -I$(abs_top_srcdir)/lib \
+    -I$(abs_top_srcdir)/lib/records \
+    -I$(abs_top_srcdir)/lib/wccp \
+    $(TS_INCLUDES) \
+    @OPENSSL_INCLUDES@
 
-bin_PROGRAMS = traffic_wccp
+traffic_wccp_traffic_wccp_LDFLAGS = \
+    $(AM_LDFLAGS) \
+    @OPENSSL_LDFLAGS@
 
-traffic_wccp_SOURCES = \
-	wccp_client.cc
+traffic_wccp_traffic_wccp_SOURCES = \
+	traffic_wccp/wccp_client.cc
 
-traffic_wccp_LDADD = \
+traffic_wccp_traffic_wccp_LDADD = \
 	$(top_builddir)/lib/tsconfig/libtsconfig.la \
 	$(top_builddir)/lib/wccp/libwccp.a \
 	$(top_builddir)/lib/ts/libtsutil.la \
 	$(top_builddir)/lib/luajit/src/libluajit.a \
 	@OPENSSL_LIBS@
-
-include $(top_srcdir)/build/tidy.mk
-
-clang-tidy-local: $(DIST_SOURCES)
-	$(CXX_Clang_Tidy)
diff --git a/configure.ac b/configure.ac
index e0c41da..cbdfc5c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2028,17 +2028,6 @@ AS_IF([test "x$RPATH" != "x"], [
 AC_CONFIG_FILES([
   Makefile
   cmd/Makefile
-  cmd/traffic_cache_tool/Makefile
-  cmd/traffic_crashlog/Makefile
-  cmd/traffic_ctl/Makefile
-  cmd/traffic_layout/Makefile
-  cmd/traffic_logcat/Makefile
-  cmd/traffic_logstats/Makefile
-  cmd/traffic_manager/Makefile
-  cmd/traffic_server/Makefile
-  cmd/traffic_top/Makefile
-  cmd/traffic_via/Makefile
-  cmd/traffic_wccp/Makefile
   doc/Makefile
   doc/ext/local-config.py
   doc/uml/Makefile

-- 
To stop receiving notification emails like this one, please contact
bcall@apache.org.

Mime
View raw message