From 4020a14d31646db55559d89b79ebd4e96fab4f27 Mon Sep 17 00:00:00 2001 From: Josiah VanderZee Date: Mon, 26 Jun 2023 11:50:42 -0500 Subject: [PATCH 1/8] Rename build/ to m4/ This fixes an issue on case-insensitive filesystems where the BUILD item in .gitignore causes the build/ directory to be ignored in git. It also opens up build/ for use as an out of source build directory, which is a very common idiom for CMake users. --- .gitignore | 12 +++---- Makefile.am | 2 +- configure.ac | 4 +-- example/plugins/c-api/Makefile.am | 4 +-- example/plugins/cpp-api/Makefile.am | 4 +-- iocore/aio/Makefile.am | 2 +- iocore/cache/Makefile.am | 2 +- iocore/dns/Makefile.am | 2 +- iocore/eventsystem/Makefile.am | 2 +- iocore/hostdb/Makefile.am | 2 +- iocore/net/Makefile.am | 2 +- iocore/net/quic/Makefile.am | 2 +- iocore/utils/Makefile.am | 2 +- lib/fastlz/Makefile.am | 2 +- {build => m4}/atomic.m4 | 0 {build => m4}/ax_cc_for_build.m4 | 0 {build => m4}/ax_check_openssl.m4 | 0 {build => m4}/ax_compare_version.m4 | 0 {build => m4}/ax_compiler_vendor.m4 | 0 {build => m4}/ax_lib_curl.m4 | 0 {build => m4}/ax_path_generic.m4 | 0 {build => m4}/ax_perl_modules.m4 | 0 {build => m4}/ax_require_defined.m4 | 0 {build => m4}/ax_with_curses.m4 | 0 {build => m4}/brotli.m4 | 0 {build => m4}/cjose.m4 | 0 {build => m4}/common.m4 | 0 {build => m4}/crypto.m4 | 0 {build => m4}/hiredis.m4 | 0 {build => m4}/jansson.m4 | 0 {build => m4}/jemalloc.m4 | 0 {build => m4}/libswoc.m4 | 0 {build => m4}/luajit.m4 | 0 {build => m4}/lzma.m4 | 0 {build => m4}/mimalloc.m4 | 0 {build => m4}/network.m4 | 0 {build => m4}/nuraft.m4 | 0 {build => m4}/pcre.m4 | 0 {build => m4}/pkg.m4 | 0 {build => m4}/plugins.mk | 0 {build => m4}/quiche.m4 | 0 m4/tcmalloc.m4 | 56 +++++++++++++++++++++++++++++ {build => m4}/tidy.mk | 0 {build => m4}/yaml-cpp.m4 | 0 {build => m4}/zlib.m4 | 0 mgmt/Makefile.am | 2 +- mgmt/api/Makefile.am | 2 +- mgmt/config/Makefile.am | 2 +- mgmt/rpc/Makefile.am | 2 +- mgmt/utils/Makefile.am | 2 +- plugins/Makefile.am | 4 +-- proxy/Makefile.am | 2 +- proxy/hdrs/Makefile.am | 2 +- proxy/http/Makefile.am | 2 +- proxy/http/remap/Makefile.am | 2 +- proxy/http2/Makefile.am | 2 +- proxy/http3/Makefile.am | 2 +- proxy/logging/Makefile.am | 2 +- proxy/shared/Makefile.am | 2 +- src/Makefile.am | 2 +- src/records/Makefile.am | 2 +- src/tscore/Makefile.am | 2 +- src/tscpp/api/Makefile.am | 2 +- src/tscpp/util/Makefile.am | 2 +- src/wccp/Makefile.am | 2 +- tests/Makefile.am | 4 +-- 66 files changed, 101 insertions(+), 45 deletions(-) rename {build => m4}/atomic.m4 (100%) rename {build => m4}/ax_cc_for_build.m4 (100%) rename {build => m4}/ax_check_openssl.m4 (100%) rename {build => m4}/ax_compare_version.m4 (100%) rename {build => m4}/ax_compiler_vendor.m4 (100%) rename {build => m4}/ax_lib_curl.m4 (100%) rename {build => m4}/ax_path_generic.m4 (100%) rename {build => m4}/ax_perl_modules.m4 (100%) rename {build => m4}/ax_require_defined.m4 (100%) rename {build => m4}/ax_with_curses.m4 (100%) rename {build => m4}/brotli.m4 (100%) rename {build => m4}/cjose.m4 (100%) rename {build => m4}/common.m4 (100%) rename {build => m4}/crypto.m4 (100%) rename {build => m4}/hiredis.m4 (100%) rename {build => m4}/jansson.m4 (100%) rename {build => m4}/jemalloc.m4 (100%) rename {build => m4}/libswoc.m4 (100%) rename {build => m4}/luajit.m4 (100%) rename {build => m4}/lzma.m4 (100%) rename {build => m4}/mimalloc.m4 (100%) rename {build => m4}/network.m4 (100%) rename {build => m4}/nuraft.m4 (100%) rename {build => m4}/pcre.m4 (100%) rename {build => m4}/pkg.m4 (100%) rename {build => m4}/plugins.mk (100%) rename {build => m4}/quiche.m4 (100%) create mode 100644 m4/tcmalloc.m4 rename {build => m4}/tidy.mk (100%) rename {build => m4}/yaml-cpp.m4 (100%) rename {build => m4}/zlib.m4 (100%) diff --git a/.gitignore b/.gitignore index 26c5c1cde91..a817b3dfd56 100644 --- a/.gitignore +++ b/.gitignore @@ -37,12 +37,12 @@ Makefile.in /tags /_build -build/_aux/ -build/libtool.m4 -build/ltoptions.m4 -build/ltsugar.m4 -build/ltversion.m4 -build/lt~obsolete.m4 +m4/_aux/ +m4/libtool.m4 +m4/ltoptions.m4 +m4/ltsugar.m4 +m4/ltversion.m4 +m4/lt~obsolete.m4 BUILD 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/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..81ad194919e 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)/m4/plugins.mk +include $(top_srcdir)/m4/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..d813b1bcb82 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)/m4/plugins.mk +include $(top_srcdir)/m4/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..765e558369a 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)/m4/tidy.mk clang-tidy-local: $(DIST_SOURCES) $(CXX_Clang_Tidy) diff --git a/iocore/cache/Makefile.am b/iocore/cache/Makefile.am index b989eb5ff47..d1faffe3acb 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)/m4/tidy.mk clang-tidy-local: $(DIST_SOURCES) $(CXX_Clang_Tidy) diff --git a/iocore/dns/Makefile.am b/iocore/dns/Makefile.am index 13231acddd8..8e1d60c12fb 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)/m4/tidy.mk clang-tidy-local: $(DIST_SOURCES) $(CXX_Clang_Tidy) diff --git a/iocore/eventsystem/Makefile.am b/iocore/eventsystem/Makefile.am index aa07e3f2283..175c00f6b2e 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)/m4/tidy.mk clang-tidy-local: $(DIST_SOURCES) $(CXX_Clang_Tidy) diff --git a/iocore/hostdb/Makefile.am b/iocore/hostdb/Makefile.am index 13ab5f2a6b6..17eb7d1a823 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)/m4/tidy.mk clang-tidy-local: $(DIST_SOURCES) $(CXX_Clang_Tidy) diff --git a/iocore/net/Makefile.am b/iocore/net/Makefile.am index b567a359c62..cd9ab476c3d 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)/m4/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..301a4d46c94 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)/m4/tidy.mk clang-tidy-local: $(DIST_SOURCES) $(CXX_Clang_Tidy) diff --git a/iocore/utils/Makefile.am b/iocore/utils/Makefile.am index 13115e35eec..71675e4031f 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)/m4/tidy.mk clang-tidy-local: $(DIST_SOURCES) $(CXX_Clang_Tidy) diff --git a/lib/fastlz/Makefile.am b/lib/fastlz/Makefile.am index af337173606..17932a6834f 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)/m4/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/plugins.mk b/m4/plugins.mk similarity index 100% rename from build/plugins.mk rename to m4/plugins.mk 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/m4/tcmalloc.m4 b/m4/tcmalloc.m4 new file mode 100644 index 00000000000..d8027ad7aeb --- /dev/null +++ b/m4/tcmalloc.m4 @@ -0,0 +1,56 @@ +dnl -------------------------------------------------------- -*- autoconf -*- +dnl Licensed to the Apache Software Foundation (ASF) under one or more +dnl contributor license agreements. See the NOTICE file distributed with +dnl this work for additional information regarding copyright ownership. +dnl The ASF licenses this file to You under the Apache License, Version 2.0 +dnl (the "License"); you may not use this file except in compliance with +dnl the License. You may obtain a copy of the License at +dnl +dnl http://www.apache.org/licenses/LICENSE-2.0 +dnl +dnl Unless required by applicable law or agreed to in writing, software +dnl distributed under the License is distributed on an "AS IS" BASIS, +dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +dnl See the License for the specific language governing permissions and +dnl limitations under the License. + +dnl +dnl tcmalloc.m4: Trafficserver's tcmalloc autoconf macros +dnl + +dnl This is kinda fugly, but need a way to both specify a directory and which +dnl of the many tcmalloc libraries to use ... +AC_DEFUN([TS_CHECK_TCMALLOC], [ +AC_ARG_WITH([tcmalloc-lib], + [AS_HELP_STRING([--with-tcmalloc-lib],[specify the tcmalloc library to use [default=tcmalloc]])], + [ + with_tcmalloc_lib="$withval" + ],[ + with_tcmalloc_lib="tcmalloc" + ] +) + +has_tcmalloc=0 +AC_ARG_WITH([tcmalloc], [AS_HELP_STRING([--with-tcmalloc=DIR],[use the tcmalloc library])], +[ + if test "$withval" != "no"; then + if test "x${has_jemalloc}" = "xyes"; then + AC_MSG_ERROR([Cannot compile with both tcmalloc and jemalloc]) + fi + if test "x${has_mimalloc}" = "xyes"; then + AC_MSG_ERROR([Cannot compile with both tcmalloc and mimalloc]) + fi + tcmalloc_have_libs=0 + if test "x$withval" != "xyes" && test "x$withval" != "x"; then + tcmalloc_ldflags="$withval/lib" + TS_ADDTO(LDFLAGS, [-L${tcmalloc_ldflags}]) + TS_ADDTO_RPATH(${tcmalloc_ldflags}) + fi + AC_SEARCH_LIBS([tc_cfree], ${with_tcmalloc_lib}, [tcmalloc_have_lib=1]) + if test "$tcmalloc_have_lib" != "0"; then + has_tcmalloc=1 + fi + fi +]) +AC_SUBST(has_tcmalloc) +]) diff --git a/build/tidy.mk b/m4/tidy.mk similarity index 100% rename from build/tidy.mk rename to m4/tidy.mk 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..89db36da69a 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)/m4/tidy.mk clang-tidy-local: $(DIST_SOURCES) $(CXX_Clang_Tidy) diff --git a/mgmt/api/Makefile.am b/mgmt/api/Makefile.am index a90c8d94e64..ab1a70aa38b 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)/m4/tidy.mk SUBDIRS = include diff --git a/mgmt/config/Makefile.am b/mgmt/config/Makefile.am index 689b5ce4c9c..185e585ccae 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)/m4/tidy.mk clang-tidy-local: $(DIST_SOURCES) $(CXX_Clang_Tidy) diff --git a/mgmt/rpc/Makefile.am b/mgmt/rpc/Makefile.am index e19ec91090a..028524553ec 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)/m4/tidy.mk clang-tidy-local: $(DIST_SOURCES) $(CXX_Clang_Tidy) diff --git a/mgmt/utils/Makefile.am b/mgmt/utils/Makefile.am index 245539bba3e..dcebe33ebbb 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)/m4/tidy.mk clang-tidy-local: $(DIST_SOURCES) $(CXX_Clang_Tidy) diff --git a/plugins/Makefile.am b/plugins/Makefile.am index ec9f0107c31..bd5acfc2a81 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)/m4/plugins.mk +include $(top_srcdir)/m4/tidy.mk check_PROGRAMS = noinst_LTLIBRARIES = diff --git a/proxy/Makefile.am b/proxy/Makefile.am index cd06f2fe6d6..c90961585cf 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)/m4/tidy.mk include private/Makefile.inc diff --git a/proxy/hdrs/Makefile.am b/proxy/hdrs/Makefile.am index 736e52865b0..d3449ec23ba 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)/m4/tidy.mk AM_CPPFLAGS += \ $(iocore_include_dirs) \ diff --git a/proxy/http/Makefile.am b/proxy/http/Makefile.am index d77d35a9aa9..0786a0246ba 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)/m4/tidy.mk SUBDIRS = remap diff --git a/proxy/http/remap/Makefile.am b/proxy/http/remap/Makefile.am index c15a537f603..9904d9e812e 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)/m4/tidy.mk AM_CPPFLAGS += \ $(iocore_include_dirs) \ diff --git a/proxy/http2/Makefile.am b/proxy/http2/Makefile.am index d07c2c4b540..90f6fd441c9 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)/m4/tidy.mk AM_CPPFLAGS += \ $(iocore_include_dirs) \ diff --git a/proxy/http3/Makefile.am b/proxy/http3/Makefile.am index 5f60f70abba..6b652dca400 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)/m4/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..d8b6c3ae115 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)/m4/tidy.mk AM_CPPFLAGS += \ $(iocore_include_dirs) \ diff --git a/proxy/shared/Makefile.am b/proxy/shared/Makefile.am index 6393cdae556..24b7ba56b60 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)/m4/tidy.mk # Note that hdrs is targeted from ../Makefile.am noinst_LIBRARIES = \ diff --git a/src/Makefile.am b/src/Makefile.am index 8735301d48c..532df6b9410 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)/m4/tidy.mk bin_PROGRAMS = check_PROGRAMS = diff --git a/src/records/Makefile.am b/src/records/Makefile.am index d9c012263ce..97fc50aa76c 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)/m4/tidy.mk check_PROGRAMS = test_librecords test_librecords_on_eventsystem diff --git a/src/tscore/Makefile.am b/src/tscore/Makefile.am index 39caa509f76..c5b1916c108 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)/m4/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..14a5df9c647 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)/m4/tidy.mk lib_LTLIBRARIES = libtscppapi.la diff --git a/src/tscpp/util/Makefile.am b/src/tscpp/util/Makefile.am index 35a1124d7bf..f07a9f7b502 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)/m4/tidy.mk check_PROGRAMS = test_tscpputil diff --git a/src/wccp/Makefile.am b/src/wccp/Makefile.am index 25151ae1608..9488e4b99f1 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)/m4/tidy.mk AM_CPPFLAGS += \ -I$(abs_top_srcdir)/include \ diff --git a/tests/Makefile.am b/tests/Makefile.am index f75e00b1a0f..7fa4d55862d 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)/m4/plugins.mk +include $(top_srcdir)/m4/tidy.mk noinst_LTLIBRARIES = noinst_PROGRAMS = From 103eb8a1dcfa97d139f46bbe9287b5536411758c Mon Sep 17 00:00:00 2001 From: Josiah VanderZee Date: Mon, 26 Jun 2023 11:56:16 -0500 Subject: [PATCH 2/8] Add build/ to .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index a817b3dfd56..38793d0df5b 100644 --- a/.gitignore +++ b/.gitignore @@ -45,6 +45,7 @@ m4/ltversion.m4 m4/lt~obsolete.m4 BUILD +build Makefile Makefile-pl From 4df596b2ddb748fe4e433e713ac73c2ddef0a894 Mon Sep 17 00:00:00 2001 From: Josiah VanderZee Date: Mon, 26 Jun 2023 11:59:29 -0500 Subject: [PATCH 3/8] Ignore m4/ in RAT instead of build/ --- ci/rat-regex.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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$ From 482b6e4b3a5289d6f96b6fd68230b189569e5133 Mon Sep 17 00:00:00 2001 From: Josiah VanderZee Date: Tue, 27 Jun 2023 06:38:59 -0500 Subject: [PATCH 4/8] Update README to reflect build -> m4 change --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 326f0f0f81f..adecf2c479b 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,7 @@ trafficserver ............. Top src dir ├── lib ................... │ ├── records ........... Library for config files │ └── yamlcpp ........... Library for YAML of C++ +├── m4 .................... Custom macros for configure.ac ├── mgmt .................. JSONRPC server/management and tools ├── plugins ............... Stable core plugins │ └── experimental ...... Experimental core plugins From db42426cf562dbbb4e4e887468c3e0bec850d28b Mon Sep 17 00:00:00 2001 From: Josiah VanderZee Date: Tue, 27 Jun 2023 09:40:37 -0500 Subject: [PATCH 5/8] Remove tcmalloc.m4 that was accidentally added --- m4/tcmalloc.m4 | 56 -------------------------------------------------- 1 file changed, 56 deletions(-) delete mode 100644 m4/tcmalloc.m4 diff --git a/m4/tcmalloc.m4 b/m4/tcmalloc.m4 deleted file mode 100644 index d8027ad7aeb..00000000000 --- a/m4/tcmalloc.m4 +++ /dev/null @@ -1,56 +0,0 @@ -dnl -------------------------------------------------------- -*- autoconf -*- -dnl Licensed to the Apache Software Foundation (ASF) under one or more -dnl contributor license agreements. See the NOTICE file distributed with -dnl this work for additional information regarding copyright ownership. -dnl The ASF licenses this file to You under the Apache License, Version 2.0 -dnl (the "License"); you may not use this file except in compliance with -dnl the License. You may obtain a copy of the License at -dnl -dnl http://www.apache.org/licenses/LICENSE-2.0 -dnl -dnl Unless required by applicable law or agreed to in writing, software -dnl distributed under the License is distributed on an "AS IS" BASIS, -dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -dnl See the License for the specific language governing permissions and -dnl limitations under the License. - -dnl -dnl tcmalloc.m4: Trafficserver's tcmalloc autoconf macros -dnl - -dnl This is kinda fugly, but need a way to both specify a directory and which -dnl of the many tcmalloc libraries to use ... -AC_DEFUN([TS_CHECK_TCMALLOC], [ -AC_ARG_WITH([tcmalloc-lib], - [AS_HELP_STRING([--with-tcmalloc-lib],[specify the tcmalloc library to use [default=tcmalloc]])], - [ - with_tcmalloc_lib="$withval" - ],[ - with_tcmalloc_lib="tcmalloc" - ] -) - -has_tcmalloc=0 -AC_ARG_WITH([tcmalloc], [AS_HELP_STRING([--with-tcmalloc=DIR],[use the tcmalloc library])], -[ - if test "$withval" != "no"; then - if test "x${has_jemalloc}" = "xyes"; then - AC_MSG_ERROR([Cannot compile with both tcmalloc and jemalloc]) - fi - if test "x${has_mimalloc}" = "xyes"; then - AC_MSG_ERROR([Cannot compile with both tcmalloc and mimalloc]) - fi - tcmalloc_have_libs=0 - if test "x$withval" != "xyes" && test "x$withval" != "x"; then - tcmalloc_ldflags="$withval/lib" - TS_ADDTO(LDFLAGS, [-L${tcmalloc_ldflags}]) - TS_ADDTO_RPATH(${tcmalloc_ldflags}) - fi - AC_SEARCH_LIBS([tc_cfree], ${with_tcmalloc_lib}, [tcmalloc_have_lib=1]) - if test "$tcmalloc_have_lib" != "0"; then - has_tcmalloc=1 - fi - fi -]) -AC_SUBST(has_tcmalloc) -]) From 864c487530a47b8ec6d99171ed796f5cf3a8d61e Mon Sep 17 00:00:00 2001 From: Josiah VanderZee Date: Wed, 28 Jun 2023 08:35:23 -0500 Subject: [PATCH 6/8] Move .mk files from m4/ to mk/ --- example/plugins/c-api/Makefile.am | 4 ++-- example/plugins/cpp-api/Makefile.am | 4 ++-- iocore/aio/Makefile.am | 2 +- iocore/cache/Makefile.am | 2 +- iocore/dns/Makefile.am | 2 +- iocore/eventsystem/Makefile.am | 2 +- iocore/hostdb/Makefile.am | 2 +- iocore/net/Makefile.am | 2 +- iocore/net/quic/Makefile.am | 2 +- iocore/utils/Makefile.am | 2 +- lib/fastlz/Makefile.am | 2 +- mgmt/Makefile.am | 2 +- mgmt/api/Makefile.am | 2 +- mgmt/config/Makefile.am | 2 +- mgmt/rpc/Makefile.am | 2 +- mgmt/utils/Makefile.am | 2 +- {m4 => mk}/plugins.mk | 0 {m4 => mk}/tidy.mk | 0 plugins/Makefile.am | 4 ++-- proxy/Makefile.am | 2 +- proxy/hdrs/Makefile.am | 2 +- proxy/http/Makefile.am | 2 +- proxy/http/remap/Makefile.am | 2 +- proxy/http2/Makefile.am | 2 +- proxy/http3/Makefile.am | 2 +- proxy/logging/Makefile.am | 2 +- proxy/shared/Makefile.am | 2 +- src/Makefile.am | 2 +- src/records/Makefile.am | 2 +- src/tscore/Makefile.am | 2 +- src/tscpp/api/Makefile.am | 2 +- src/tscpp/util/Makefile.am | 2 +- src/wccp/Makefile.am | 2 +- tests/Makefile.am | 4 ++-- 34 files changed, 36 insertions(+), 36 deletions(-) rename {m4 => mk}/plugins.mk (100%) rename {m4 => mk}/tidy.mk (100%) diff --git a/example/plugins/c-api/Makefile.am b/example/plugins/c-api/Makefile.am index 81ad194919e..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)/m4/plugins.mk -include $(top_srcdir)/m4/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 d813b1bcb82..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)/m4/plugins.mk -include $(top_srcdir)/m4/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 765e558369a..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)/m4/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 d1faffe3acb..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)/m4/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 8e1d60c12fb..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)/m4/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 175c00f6b2e..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)/m4/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 17eb7d1a823..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)/m4/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 cd9ab476c3d..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)/m4/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 301a4d46c94..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)/m4/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 71675e4031f..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)/m4/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 17932a6834f..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)/m4/tidy.mk +include $(top_srcdir)/mk/tidy.mk AM_CPPFLAGS += -I$(abs_top_srcdir)/lib/fastlz diff --git a/mgmt/Makefile.am b/mgmt/Makefile.am index 89db36da69a..e2f6750f705 100644 --- a/mgmt/Makefile.am +++ b/mgmt/Makefile.am @@ -31,7 +31,7 @@ AM_CPPFLAGS += \ @YAMLCPP_INCLUDES@ \ $(TS_INCLUDES) -include $(top_srcdir)/m4/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 ab1a70aa38b..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)/m4/tidy.mk +include $(top_srcdir)/mk/tidy.mk SUBDIRS = include diff --git a/mgmt/config/Makefile.am b/mgmt/config/Makefile.am index 185e585ccae..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)/m4/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 028524553ec..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)/m4/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 dcebe33ebbb..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)/m4/tidy.mk +include $(top_srcdir)/mk/tidy.mk clang-tidy-local: $(DIST_SOURCES) $(CXX_Clang_Tidy) diff --git a/m4/plugins.mk b/mk/plugins.mk similarity index 100% rename from m4/plugins.mk rename to mk/plugins.mk diff --git a/m4/tidy.mk b/mk/tidy.mk similarity index 100% rename from m4/tidy.mk rename to mk/tidy.mk diff --git a/plugins/Makefile.am b/plugins/Makefile.am index bd5acfc2a81..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)/m4/plugins.mk -include $(top_srcdir)/m4/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 c90961585cf..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)/m4/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 d3449ec23ba..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)/m4/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 0786a0246ba..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)/m4/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 9904d9e812e..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)/m4/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 90f6fd441c9..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)/m4/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 6b652dca400..3c7b777a3b7 100644 --- a/proxy/http3/Makefile.am +++ b/proxy/http3/Makefile.am @@ -106,7 +106,7 @@ test_qpack_SOURCES = \ # # clang-tidy # -include $(top_srcdir)/m4/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 d8b6c3ae115..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)/m4/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 24b7ba56b60..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)/m4/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 532df6b9410..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)/m4/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 97fc50aa76c..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)/m4/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 c5b1916c108..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)/m4/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 14a5df9c647..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)/m4/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 f07a9f7b502..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)/m4/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 9488e4b99f1..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)/m4/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 7fa4d55862d..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)/m4/plugins.mk -include $(top_srcdir)/m4/tidy.mk +include $(top_srcdir)/mk/plugins.mk +include $(top_srcdir)/mk/tidy.mk noinst_LTLIBRARIES = noinst_PROGRAMS = From d886d63069da7216bf5dd218736b11d0afa8719b Mon Sep 17 00:00:00 2001 From: Josiah VanderZee Date: Wed, 28 Jun 2023 12:25:51 -0500 Subject: [PATCH 7/8] Add mk directory to project tree in README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index adecf2c479b..8126906c99a 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,7 @@ trafficserver ............. Top src dir │ ├── 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 From 3c86c2e08c1d92d5c4ee398f8987def656ad8c0c Mon Sep 17 00:00:00 2001 From: Josiah VanderZee Date: Thu, 29 Jun 2023 05:57:43 -0500 Subject: [PATCH 8/8] Remove BUILD from .gitignore It looks like it was accidentally added, so this removes it. I also put in a comment explaining why build/ is now in the .gitignore. --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 38793d0df5b..9f4a871f17f 100644 --- a/.gitignore +++ b/.gitignore @@ -44,7 +44,7 @@ m4/ltsugar.m4 m4/ltversion.m4 m4/lt~obsolete.m4 -BUILD +# common directory name for out-of-tree CMake builds build Makefile