diff --git a/.gitignore b/.gitignore index 26c5c1cde91..9f4a871f17f 100644 --- a/.gitignore +++ b/.gitignore @@ -37,14 +37,15 @@ Makefile.in /tags /_build -build/_aux/ -build/libtool.m4 -build/ltoptions.m4 -build/ltsugar.m4 -build/ltversion.m4 -build/lt~obsolete.m4 - -BUILD +m4/_aux/ +m4/libtool.m4 +m4/ltoptions.m4 +m4/ltsugar.m4 +m4/ltversion.m4 +m4/lt~obsolete.m4 + +# common directory name for out-of-tree CMake builds +build Makefile Makefile-pl diff --git a/Makefile.am b/Makefile.am index 4e58362e89d..c1d31dd1da1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,7 +19,7 @@ # Local Macros # http://www.gnu.org/software/automake/manual/automake.html#Local-Macros -ACLOCAL_AMFLAGS = -I build +ACLOCAL_AMFLAGS = -I m4 export CCACHE_BASEDIR diff --git a/README.md b/README.md index 326f0f0f81f..8126906c99a 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,6 @@ plugins to build large scale web applications. ## DIRECTORY STRUCTURE ``` trafficserver ............. Top src dir -├── build ................. Custom macros for configure.ac ├── ci .................... Quality assurance and other CI tools and configs ├── configs ............... Configurations ├── contrib ............... Various contributed auxiliary pieces @@ -45,6 +44,8 @@ trafficserver ............. Top src dir ├── lib ................... │ ├── records ........... Library for config files │ └── yamlcpp ........... Library for YAML of C++ +├── m4 .................... Custom macros for configure.ac +├── mk .................... Includes for Makefiles ├── mgmt .................. JSONRPC server/management and tools ├── plugins ............... Stable core plugins │ └── experimental ...... Experimental core plugins diff --git a/ci/rat-regex.txt b/ci/rat-regex.txt index e6349cf1c6e..240a25a5bcf 100644 --- a/ci/rat-regex.txt +++ b/ci/rat-regex.txt @@ -1,6 +1,6 @@ ^BUILDS$ ^autom4te\.cache$ -^build$ +^m4$ ^build-aux$ ^body_factory$ ^config\.log$ diff --git a/configure.ac b/configure.ac index e780703276a..f93cd09f5d0 100644 --- a/configure.ac +++ b/configure.ac @@ -37,9 +37,9 @@ m4_define([TS_VERSION_N],[10000000]) AC_INIT([Apache Traffic Server],[TS_VERSION_S()],[dev@trafficserver.apache.org],[trafficserver],[https://trafficserver.apache.org]) AC_PREREQ([2.69]) -AC_CONFIG_AUX_DIR([build/_aux]) +AC_CONFIG_AUX_DIR([m4/_aux]) AC_CONFIG_SRCDIR([src/traffic_server/traffic_server.cc]) -AC_CONFIG_MACRO_DIR([build]) +AC_CONFIG_MACRO_DIR([m4]) # NOTE: we turn off portability warnings because the clang-tidy targets use # GNU make extensions to filter the sources list. diff --git a/example/plugins/c-api/Makefile.am b/example/plugins/c-api/Makefile.am index 0ac809a8bc3..26e9b22dfb3 100644 --- a/example/plugins/c-api/Makefile.am +++ b/example/plugins/c-api/Makefile.am @@ -14,8 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -include $(top_srcdir)/build/plugins.mk -include $(top_srcdir)/build/tidy.mk +include $(top_srcdir)/mk/plugins.mk +include $(top_srcdir)/mk/tidy.mk AM_CXXFLAGS += -Wno-unused-variable AM_LDFLAGS = $(TS_PLUGIN_LD_FLAGS) diff --git a/example/plugins/cpp-api/Makefile.am b/example/plugins/cpp-api/Makefile.am index 783dfed8885..658bec5f3e6 100644 --- a/example/plugins/cpp-api/Makefile.am +++ b/example/plugins/cpp-api/Makefile.am @@ -14,8 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -include $(top_srcdir)/build/plugins.mk -include $(top_srcdir)/build/tidy.mk +include $(top_srcdir)/mk/plugins.mk +include $(top_srcdir)/mk/tidy.mk AM_CXXFLAGS += -Wno-unused-variable AM_LDFLAGS = $(TS_PLUGIN_LD_FLAGS) diff --git a/iocore/aio/Makefile.am b/iocore/aio/Makefile.am index 4650e23ff79..0c237a2b58b 100644 --- a/iocore/aio/Makefile.am +++ b/iocore/aio/Makefile.am @@ -61,7 +61,7 @@ test_AIO_LDADD = \ $(top_builddir)/src/tscpp/util/libtscpputil.la \ @SWOC_LIBS@ @HWLOC_LIBS@ @YAMLCPP_LIBS@ -include $(top_srcdir)/build/tidy.mk +include $(top_srcdir)/mk/tidy.mk clang-tidy-local: $(DIST_SOURCES) $(CXX_Clang_Tidy) diff --git a/iocore/cache/Makefile.am b/iocore/cache/Makefile.am index b989eb5ff47..a0e37c55320 100644 --- a/iocore/cache/Makefile.am +++ b/iocore/cache/Makefile.am @@ -217,7 +217,7 @@ test_Update_header_SOURCES = \ $(test_main_SOURCES) \ ./test/test_Update_header.cc -include $(top_srcdir)/build/tidy.mk +include $(top_srcdir)/mk/tidy.mk clang-tidy-local: $(DIST_SOURCES) $(CXX_Clang_Tidy) diff --git a/iocore/dns/Makefile.am b/iocore/dns/Makefile.am index 13231acddd8..7df675225ca 100644 --- a/iocore/dns/Makefile.am +++ b/iocore/dns/Makefile.am @@ -50,7 +50,7 @@ libinkdns_a_SOURCES = \ # test_I_DNS.cc \ # test_P_DNS.cc -include $(top_srcdir)/build/tidy.mk +include $(top_srcdir)/mk/tidy.mk clang-tidy-local: $(DIST_SOURCES) $(CXX_Clang_Tidy) diff --git a/iocore/eventsystem/Makefile.am b/iocore/eventsystem/Makefile.am index aa07e3f2283..927473d6062 100644 --- a/iocore/eventsystem/Makefile.am +++ b/iocore/eventsystem/Makefile.am @@ -122,7 +122,7 @@ benchmark_ProxyAllocator_CPPFLAGS = $(test_CPP_FLAGS) benchmark_ProxyAllocator_LDFLAGS = $(test_LD_FLAGS) benchmark_ProxyAllocator_LDADD = $(test_LD_ADD) -include $(top_srcdir)/build/tidy.mk +include $(top_srcdir)/mk/tidy.mk clang-tidy-local: $(DIST_SOURCES) $(CXX_Clang_Tidy) diff --git a/iocore/hostdb/Makefile.am b/iocore/hostdb/Makefile.am index 13ab5f2a6b6..66f22ed7400 100644 --- a/iocore/hostdb/Makefile.am +++ b/iocore/hostdb/Makefile.am @@ -97,7 +97,7 @@ test_HostFile_SOURCES = \ HostFile.cc \ HostDBInfo.cc -include $(top_srcdir)/build/tidy.mk +include $(top_srcdir)/mk/tidy.mk clang-tidy-local: $(DIST_SOURCES) $(CXX_Clang_Tidy) diff --git a/iocore/net/Makefile.am b/iocore/net/Makefile.am index b567a359c62..4be4b81f249 100644 --- a/iocore/net/Makefile.am +++ b/iocore/net/Makefile.am @@ -245,7 +245,7 @@ libinknet_a_SOURCES += \ P_NetVCTest.h endif -include $(top_srcdir)/build/tidy.mk +include $(top_srcdir)/mk/tidy.mk clang-tidy-local: $(DIST_SOURCES) $(CXX_Clang_Tidy) diff --git a/iocore/net/quic/Makefile.am b/iocore/net/quic/Makefile.am index 2c6473aae99..c16d92d6a8f 100644 --- a/iocore/net/quic/Makefile.am +++ b/iocore/net/quic/Makefile.am @@ -73,7 +73,7 @@ TESTS = $(check_PROGRAMS) # # clang-tidy # -include $(top_srcdir)/build/tidy.mk +include $(top_srcdir)/mk/tidy.mk clang-tidy-local: $(DIST_SOURCES) $(CXX_Clang_Tidy) diff --git a/iocore/utils/Makefile.am b/iocore/utils/Makefile.am index 13115e35eec..f6a3846cb26 100644 --- a/iocore/utils/Makefile.am +++ b/iocore/utils/Makefile.am @@ -32,7 +32,7 @@ libinkutils_a_SOURCES = \ OneWayMultiTunnel.cc \ OneWayTunnel.cc -include $(top_srcdir)/build/tidy.mk +include $(top_srcdir)/mk/tidy.mk clang-tidy-local: $(DIST_SOURCES) $(CXX_Clang_Tidy) diff --git a/lib/fastlz/Makefile.am b/lib/fastlz/Makefile.am index af337173606..e738b8f81c4 100644 --- a/lib/fastlz/Makefile.am +++ b/lib/fastlz/Makefile.am @@ -17,7 +17,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -include $(top_srcdir)/build/tidy.mk +include $(top_srcdir)/mk/tidy.mk AM_CPPFLAGS += -I$(abs_top_srcdir)/lib/fastlz diff --git a/build/atomic.m4 b/m4/atomic.m4 similarity index 100% rename from build/atomic.m4 rename to m4/atomic.m4 diff --git a/build/ax_cc_for_build.m4 b/m4/ax_cc_for_build.m4 similarity index 100% rename from build/ax_cc_for_build.m4 rename to m4/ax_cc_for_build.m4 diff --git a/build/ax_check_openssl.m4 b/m4/ax_check_openssl.m4 similarity index 100% rename from build/ax_check_openssl.m4 rename to m4/ax_check_openssl.m4 diff --git a/build/ax_compare_version.m4 b/m4/ax_compare_version.m4 similarity index 100% rename from build/ax_compare_version.m4 rename to m4/ax_compare_version.m4 diff --git a/build/ax_compiler_vendor.m4 b/m4/ax_compiler_vendor.m4 similarity index 100% rename from build/ax_compiler_vendor.m4 rename to m4/ax_compiler_vendor.m4 diff --git a/build/ax_lib_curl.m4 b/m4/ax_lib_curl.m4 similarity index 100% rename from build/ax_lib_curl.m4 rename to m4/ax_lib_curl.m4 diff --git a/build/ax_path_generic.m4 b/m4/ax_path_generic.m4 similarity index 100% rename from build/ax_path_generic.m4 rename to m4/ax_path_generic.m4 diff --git a/build/ax_perl_modules.m4 b/m4/ax_perl_modules.m4 similarity index 100% rename from build/ax_perl_modules.m4 rename to m4/ax_perl_modules.m4 diff --git a/build/ax_require_defined.m4 b/m4/ax_require_defined.m4 similarity index 100% rename from build/ax_require_defined.m4 rename to m4/ax_require_defined.m4 diff --git a/build/ax_with_curses.m4 b/m4/ax_with_curses.m4 similarity index 100% rename from build/ax_with_curses.m4 rename to m4/ax_with_curses.m4 diff --git a/build/brotli.m4 b/m4/brotli.m4 similarity index 100% rename from build/brotli.m4 rename to m4/brotli.m4 diff --git a/build/cjose.m4 b/m4/cjose.m4 similarity index 100% rename from build/cjose.m4 rename to m4/cjose.m4 diff --git a/build/common.m4 b/m4/common.m4 similarity index 100% rename from build/common.m4 rename to m4/common.m4 diff --git a/build/crypto.m4 b/m4/crypto.m4 similarity index 100% rename from build/crypto.m4 rename to m4/crypto.m4 diff --git a/build/hiredis.m4 b/m4/hiredis.m4 similarity index 100% rename from build/hiredis.m4 rename to m4/hiredis.m4 diff --git a/build/jansson.m4 b/m4/jansson.m4 similarity index 100% rename from build/jansson.m4 rename to m4/jansson.m4 diff --git a/build/jemalloc.m4 b/m4/jemalloc.m4 similarity index 100% rename from build/jemalloc.m4 rename to m4/jemalloc.m4 diff --git a/build/libswoc.m4 b/m4/libswoc.m4 similarity index 100% rename from build/libswoc.m4 rename to m4/libswoc.m4 diff --git a/build/luajit.m4 b/m4/luajit.m4 similarity index 100% rename from build/luajit.m4 rename to m4/luajit.m4 diff --git a/build/lzma.m4 b/m4/lzma.m4 similarity index 100% rename from build/lzma.m4 rename to m4/lzma.m4 diff --git a/build/mimalloc.m4 b/m4/mimalloc.m4 similarity index 100% rename from build/mimalloc.m4 rename to m4/mimalloc.m4 diff --git a/build/network.m4 b/m4/network.m4 similarity index 100% rename from build/network.m4 rename to m4/network.m4 diff --git a/build/nuraft.m4 b/m4/nuraft.m4 similarity index 100% rename from build/nuraft.m4 rename to m4/nuraft.m4 diff --git a/build/pcre.m4 b/m4/pcre.m4 similarity index 100% rename from build/pcre.m4 rename to m4/pcre.m4 diff --git a/build/pkg.m4 b/m4/pkg.m4 similarity index 100% rename from build/pkg.m4 rename to m4/pkg.m4 diff --git a/build/quiche.m4 b/m4/quiche.m4 similarity index 100% rename from build/quiche.m4 rename to m4/quiche.m4 diff --git a/build/yaml-cpp.m4 b/m4/yaml-cpp.m4 similarity index 100% rename from build/yaml-cpp.m4 rename to m4/yaml-cpp.m4 diff --git a/build/zlib.m4 b/m4/zlib.m4 similarity index 100% rename from build/zlib.m4 rename to m4/zlib.m4 diff --git a/mgmt/Makefile.am b/mgmt/Makefile.am index 365a376634c..e2f6750f705 100644 --- a/mgmt/Makefile.am +++ b/mgmt/Makefile.am @@ -31,7 +31,7 @@ AM_CPPFLAGS += \ @YAMLCPP_INCLUDES@ \ $(TS_INCLUDES) -include $(top_srcdir)/build/tidy.mk +include $(top_srcdir)/mk/tidy.mk clang-tidy-local: $(DIST_SOURCES) $(CXX_Clang_Tidy) diff --git a/mgmt/api/Makefile.am b/mgmt/api/Makefile.am index a90c8d94e64..55b2b5d3f75 100644 --- a/mgmt/api/Makefile.am +++ b/mgmt/api/Makefile.am @@ -17,7 +17,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -include $(top_srcdir)/build/tidy.mk +include $(top_srcdir)/mk/tidy.mk SUBDIRS = include diff --git a/mgmt/config/Makefile.am b/mgmt/config/Makefile.am index 689b5ce4c9c..982ccb2334d 100644 --- a/mgmt/config/Makefile.am +++ b/mgmt/config/Makefile.am @@ -55,7 +55,7 @@ libconfigmanager_la_LIBADD = \ $(top_builddir)/src/tscore/libtscore.la -include $(top_srcdir)/build/tidy.mk +include $(top_srcdir)/mk/tidy.mk clang-tidy-local: $(DIST_SOURCES) $(CXX_Clang_Tidy) diff --git a/mgmt/rpc/Makefile.am b/mgmt/rpc/Makefile.am index e19ec91090a..a2572e4550c 100644 --- a/mgmt/rpc/Makefile.am +++ b/mgmt/rpc/Makefile.am @@ -175,7 +175,7 @@ $(shared_overridable_txn_vars_SOURCES): $(shared_rpc_ipc_client_SOURCES): echo "#include \"$(top_builddir)/src/shared/rpc/$@\"" >$@ -include $(top_srcdir)/build/tidy.mk +include $(top_srcdir)/mk/tidy.mk clang-tidy-local: $(DIST_SOURCES) $(CXX_Clang_Tidy) diff --git a/mgmt/utils/Makefile.am b/mgmt/utils/Makefile.am index 245539bba3e..77b08c16515 100644 --- a/mgmt/utils/Makefile.am +++ b/mgmt/utils/Makefile.am @@ -65,7 +65,7 @@ test_mgmt_utils_LDADD = \ $(top_builddir)/src/tscore/libtscore.la \ @SWOC_LIBS@ -include $(top_srcdir)/build/tidy.mk +include $(top_srcdir)/mk/tidy.mk clang-tidy-local: $(DIST_SOURCES) $(CXX_Clang_Tidy) diff --git a/build/plugins.mk b/mk/plugins.mk similarity index 100% rename from build/plugins.mk rename to mk/plugins.mk diff --git a/build/tidy.mk b/mk/tidy.mk similarity index 100% rename from build/tidy.mk rename to mk/tidy.mk diff --git a/plugins/Makefile.am b/plugins/Makefile.am index ec9f0107c31..fd9d430cc3d 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -16,8 +16,8 @@ # Add new plugins in alphabetic order, but keep experimental always at the bottom. -include $(top_srcdir)/build/plugins.mk -include $(top_srcdir)/build/tidy.mk +include $(top_srcdir)/mk/plugins.mk +include $(top_srcdir)/mk/tidy.mk check_PROGRAMS = noinst_LTLIBRARIES = diff --git a/proxy/Makefile.am b/proxy/Makefile.am index cd06f2fe6d6..449e176230e 100644 --- a/proxy/Makefile.am +++ b/proxy/Makefile.am @@ -16,7 +16,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -include $(top_srcdir)/build/tidy.mk +include $(top_srcdir)/mk/tidy.mk include private/Makefile.inc diff --git a/proxy/hdrs/Makefile.am b/proxy/hdrs/Makefile.am index 736e52865b0..1f1940cdfbd 100644 --- a/proxy/hdrs/Makefile.am +++ b/proxy/hdrs/Makefile.am @@ -16,7 +16,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -include $(top_srcdir)/build/tidy.mk +include $(top_srcdir)/mk/tidy.mk AM_CPPFLAGS += \ $(iocore_include_dirs) \ diff --git a/proxy/http/Makefile.am b/proxy/http/Makefile.am index d77d35a9aa9..e1d5d6ad659 100644 --- a/proxy/http/Makefile.am +++ b/proxy/http/Makefile.am @@ -16,7 +16,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -include $(top_srcdir)/build/tidy.mk +include $(top_srcdir)/mk/tidy.mk SUBDIRS = remap diff --git a/proxy/http/remap/Makefile.am b/proxy/http/remap/Makefile.am index c15a537f603..cae2797ab0c 100644 --- a/proxy/http/remap/Makefile.am +++ b/proxy/http/remap/Makefile.am @@ -16,7 +16,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -include $(top_srcdir)/build/tidy.mk +include $(top_srcdir)/mk/tidy.mk AM_CPPFLAGS += \ $(iocore_include_dirs) \ diff --git a/proxy/http2/Makefile.am b/proxy/http2/Makefile.am index d07c2c4b540..879867ba395 100644 --- a/proxy/http2/Makefile.am +++ b/proxy/http2/Makefile.am @@ -16,7 +16,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -include $(top_srcdir)/build/tidy.mk +include $(top_srcdir)/mk/tidy.mk AM_CPPFLAGS += \ $(iocore_include_dirs) \ diff --git a/proxy/http3/Makefile.am b/proxy/http3/Makefile.am index 5f60f70abba..3c7b777a3b7 100644 --- a/proxy/http3/Makefile.am +++ b/proxy/http3/Makefile.am @@ -106,7 +106,7 @@ test_qpack_SOURCES = \ # # clang-tidy # -include $(top_srcdir)/build/tidy.mk +include $(top_srcdir)/mk/tidy.mk clang-tidy-local: $(libhttp3_a_SOURCES) \ $(CXX_Clang_Tidy) diff --git a/proxy/logging/Makefile.am b/proxy/logging/Makefile.am index 5ef778c608e..f8b5db7741a 100644 --- a/proxy/logging/Makefile.am +++ b/proxy/logging/Makefile.am @@ -16,7 +16,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -include $(top_srcdir)/build/tidy.mk +include $(top_srcdir)/mk/tidy.mk AM_CPPFLAGS += \ $(iocore_include_dirs) \ diff --git a/proxy/shared/Makefile.am b/proxy/shared/Makefile.am index 6393cdae556..82b2c247866 100644 --- a/proxy/shared/Makefile.am +++ b/proxy/shared/Makefile.am @@ -16,7 +16,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -include $(top_srcdir)/build/tidy.mk +include $(top_srcdir)/mk/tidy.mk # Note that hdrs is targeted from ../Makefile.am noinst_LIBRARIES = \ diff --git a/src/Makefile.am b/src/Makefile.am index 8735301d48c..8e95c0c4a92 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -15,7 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -include $(top_srcdir)/build/tidy.mk +include $(top_srcdir)/mk/tidy.mk bin_PROGRAMS = check_PROGRAMS = diff --git a/src/records/Makefile.am b/src/records/Makefile.am index d9c012263ce..dbea41ecc21 100644 --- a/src/records/Makefile.am +++ b/src/records/Makefile.am @@ -16,7 +16,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -include $(top_srcdir)/build/tidy.mk +include $(top_srcdir)/mk/tidy.mk check_PROGRAMS = test_librecords test_librecords_on_eventsystem diff --git a/src/tscore/Makefile.am b/src/tscore/Makefile.am index 39caa509f76..a3fd55b0fe9 100644 --- a/src/tscore/Makefile.am +++ b/src/tscore/Makefile.am @@ -16,7 +16,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -include $(top_srcdir)/build/tidy.mk +include $(top_srcdir)/mk/tidy.mk noinst_PROGRAMS = CompileParseRules freelist_benchmark benchmark_shared_mutex check_PROGRAMS = test_geometry test_X509HostnameValidator test_tscore diff --git a/src/tscpp/api/Makefile.am b/src/tscpp/api/Makefile.am index bff43e127be..667a4222264 100644 --- a/src/tscpp/api/Makefile.am +++ b/src/tscpp/api/Makefile.am @@ -15,7 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -include $(top_srcdir)/build/tidy.mk +include $(top_srcdir)/mk/tidy.mk lib_LTLIBRARIES = libtscppapi.la diff --git a/src/tscpp/util/Makefile.am b/src/tscpp/util/Makefile.am index 35a1124d7bf..c268c30e40b 100644 --- a/src/tscpp/util/Makefile.am +++ b/src/tscpp/util/Makefile.am @@ -16,7 +16,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -include $(top_srcdir)/build/tidy.mk +include $(top_srcdir)/mk/tidy.mk check_PROGRAMS = test_tscpputil diff --git a/src/wccp/Makefile.am b/src/wccp/Makefile.am index 25151ae1608..497d308a209 100644 --- a/src/wccp/Makefile.am +++ b/src/wccp/Makefile.am @@ -17,7 +17,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -include $(top_srcdir)/build/tidy.mk +include $(top_srcdir)/mk/tidy.mk AM_CPPFLAGS += \ -I$(abs_top_srcdir)/include \ diff --git a/tests/Makefile.am b/tests/Makefile.am index f75e00b1a0f..1a89616995b 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -14,8 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -include $(top_srcdir)/build/plugins.mk -include $(top_srcdir)/build/tidy.mk +include $(top_srcdir)/mk/plugins.mk +include $(top_srcdir)/mk/tidy.mk noinst_LTLIBRARIES = noinst_PROGRAMS =