Skip to content

Commit

Permalink
build: move autotools/CMake-related files from project root
Browse files Browse the repository at this point in the history
Signed-off-by: László Várady <laszlo.varady@anno.io>
  • Loading branch information
MrAnno committed May 21, 2024
1 parent d216634 commit 810450d
Show file tree
Hide file tree
Showing 28 changed files with 49 additions and 50 deletions.
14 changes: 7 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ ltmain.sh
.cproject
.settings
Debug
m4/libtool.m4
m4/lt~obsolete.m4
m4/ltoptions.m4
m4/ltsugar.m4
m4/ltversion.m4
m4/pkg.m4
m4/ax*.m4
autotools/m4/libtool.m4
autotools/m4/lt~obsolete.m4
autotools/m4/ltoptions.m4
autotools/m4/ltsugar.m4
autotools/m4/ltversion.m4
autotools/m4/pkg.m4
autotools/m4/ax*.m4
/compile
.deps
/lib/cfg-grammar.h
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ endif()

include_directories(${CMAKE_CURRENT_BINARY_DIR})

add_subdirectory(Mk)
add_subdirectory(autotools/Mk)
add_subdirectory(scl)
add_subdirectory(lib)
add_subdirectory(modules)
Expand All @@ -478,7 +478,7 @@ add_subdirectory(persist-tool)
add_subdirectory(tests)
add_subdirectory(libtest)

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/syslog-ng-config.h.in ${CMAKE_CURRENT_BINARY_DIR}/syslog-ng-config.h)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/syslog-ng-config.h.in ${CMAKE_CURRENT_BINARY_DIR}/syslog-ng-config.h)

install(FILES ${CMAKE_CURRENT_BINARY_DIR}/syslog-ng-config.h DESTINATION include/syslog-ng)

Expand All @@ -500,7 +500,7 @@ set(PKG_CONFIG_INTERNAL_IVYKIS_CFLAGS ${IVYKIS_INCLUDE_DIRS})
set(libdir "\${libdir}")
set(includedir "\${includedir}")

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/syslog-ng.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/syslog-ng.pc)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/syslog-ng.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/syslog-ng.pc)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/syslog-ng.pc DESTINATION lib/pkgconfig)

include(print_config_summary)
Expand Down
22 changes: 11 additions & 11 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ if ENABLE_SANITIZER
LOG_COMPILER = $(top_srcdir)/scripts/test-grep.sh
endif

ACLOCAL_AMFLAGS = -I m4 --install
ACLOCAL_AMFLAGS = -I autotools/m4 --install

EXTRA_DIST = $(filter-out ${NODIST_BUILT_SOURCES},${BUILT_SOURCES}) VERSION.txt NEWS.md autogen.sh \
dist.conf dist.conf.in syslog-ng.pc.in \
syslog-ng-config.h.in \
autotools/dist.conf autotools/dist.conf.in autotools/syslog-ng.pc.in \
cmake/syslog-ng-config.h.in \
CONTRIBUTING.md \
sub-configure.sh \
syslog-ng.pc.cmake \
syslog-ng-native-connector.pc.cmake \
autotools/sub-configure.sh \
cmake/syslog-ng.pc.cmake \
cmake/syslog-ng-native-connector.pc.cmake \
syslog-ng-ctl/CMakeLists.txt \
requirements.txt \
dev-requirements.txt \
Expand All @@ -54,7 +54,7 @@ pkglibdir = $(libdir)/syslog-ng
pkglibexecdir = $(libexecdir)/syslog-ng

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = syslog-ng.pc
pkgconfig_DATA = autotools/syslog-ng.pc

AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir)/modules -I$(top_builddir)/lib -I$(top_builddir)/modules

Expand Down Expand Up @@ -210,7 +210,7 @@ install-exec-hook: ${INSTALL_EXEC_HOOKS}
uninstall-hook: ${UNINSTALL_HOOKS}

populate-makefiles:
$(top_srcdir)/Mk/populate-makefiles.sh
$(top_srcdir)/autotools/Mk/populate-makefiles.sh

style-check:
$(top_srcdir)/scripts/style-checker.sh check $(top_srcdir)
Expand Down Expand Up @@ -248,9 +248,9 @@ $(install_moduleLTLIBRARIES): install-libLTLIBRARIES
install_loggenpluginLTLIBRARIES = install-loggenpluginLTLIBRARIES
$(install_loggenpluginLTLIBRARIES): install-libLTLIBRARIES

include Mk/lex-rules.am
include Mk/python-venv.am
include Mk/Makefile.am
include autotools/Mk/lex-rules.am
include autotools/Mk/python-venv.am
include autotools/Mk/Makefile.am
if ENABLE_TESTING
include libtest/Makefile.am
endif
Expand Down
12 changes: 0 additions & 12 deletions Mk/Makefile.am

This file was deleted.

4 changes: 2 additions & 2 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ autogen_submodules()

CONFIGURE_OPTS="--disable-shared --enable-static --with-pic"

$SED -e "s/@__CONFIGURE_OPTS__@/${CONFIGURE_OPTS}/g" ${origdir}/sub-configure.sh >configure.gnu
$SED -e "s/@__CONFIGURE_OPTS__@/${CONFIGURE_OPTS}/g" ${origdir}/autotools/sub-configure.sh >configure.gnu
cd "$origdir"
done
}
Expand All @@ -94,7 +94,7 @@ case `uname -s` in
esac

$LIBTOOLIZE --force --copy
aclocal -I m4 --install
aclocal -I autotools/m4 --install
$SED -i -e 's/PKG_PROG_PKG_CONFIG(\[0\.16\])/PKG_PROG_PKG_CONFIG([0.14])/g' aclocal.m4

include_automake_from_dir_if_exists debian
Expand Down
File renamed without changes.
12 changes: 12 additions & 0 deletions autotools/Mk/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
EXTRA_DIST += autotools/Mk/lex-rules.am \
autotools/Mk/find-top-builddir.sh \
autotools/Mk/populate-makefiles.sh \
autotools/Mk/subdir.mk \
autotools/Mk/CMakeLists.txt

tools_DATA = \
autotools/Mk/lex-rules.am \
lib/cfg-grammar.y

tools_SCRIPTS = \
lib/merge-grammar.py
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#! /bin/sh

root=$(cd $(dirname $0) && cd .. && pwd)
root=$(cd $(dirname $0) && cd ../.. && pwd)

populate() {
mfam="$1"
dir="$(dirname ${mfam})"
if [ "${dir}" != "." ] && [ "${dir}" != "${root}" ] && [ -d "${dir}" ]; then
echo "${root}/Mk/subdir.mk" "=>" "${dir}/Makefile"
ln -sf "${root}/Mk/subdir.mk" "${dir}/Makefile"
echo "${root}/autotools/Mk/subdir.mk" "=>" "${dir}/Makefile"
ln -sf "${root}/autotools/Mk/subdir.mk" "${dir}/Makefile"
fi
if [ -e "${root}/${dir}/Makefile.am" ]; then
incs=$(grep "^include" "${root}/${dir}/Makefile.am" | sed -e "s,^include ,,")
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion Mk/subdir.mk → autotools/Mk/subdir.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
top_srcdir = $(dir $(shell readlink ${MAKEFILE_LIST}))../
top_builddir = $(shell ${top_srcdir}/Mk/find-top-builddir.sh)
top_builddir = $(shell ${top_srcdir}/autotools/Mk/find-top-builddir.sh)

self = $(subst ${top_builddir}/,,${CURDIR})
self_sub = $(subst -,_,$(subst /,_,${self}))
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ dnl

AC_INIT([axosyslog], m4_esyscmd_s([scripts/version.sh]))
AC_CONFIG_SRCDIR([syslog-ng/main.c])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_MACRO_DIR([autotools/m4])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])

dnl ***************************************************************************
Expand Down Expand Up @@ -68,10 +68,10 @@ dnl Initial setup

ostype=`uname -s`

if test -r $srcdir/dist.conf; then
if test -r $srcdir/autotools/dist.conf; then
# read defaults, dist.conf does not change
# values for parameters that are already set
. $srcdir/dist.conf
. $srcdir/autotools/dist.conf
fi

if test -z "$RELEASE_TAG"; then
Expand Down Expand Up @@ -1709,7 +1709,7 @@ CFLAGS=$old_CFLAGS


if test "x$enable_native" = "xyes" -o "x$enable_native" = "xauto"; then
AC_CONFIG_FILES([syslog-ng-native-connector.pc])
AC_CONFIG_FILES([autotools/syslog-ng-native-connector.pc])
fi

dnl ***************************************************************************
Expand Down Expand Up @@ -2366,9 +2366,9 @@ AC_SUBST(XSL_STYLESHEET)
AX_PREFIX_CONFIG_H(syslog-ng-config.h, "SYSLOG_NG")
AX_VALGRIND_CHECK

AC_OUTPUT(dist.conf
AC_OUTPUT(autotools/dist.conf
Makefile
syslog-ng.pc
autotools/syslog-ng.pc
libtest/syslog-ng-test.pc
scripts/update-patterndb
scripts/syslog-ng-update-virtualenv
Expand Down
2 changes: 1 addition & 1 deletion modules/native/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if (ENABLE_NATIVE)
set(PKG_CONFIG_LIBDIR "\${exec_prefix}/lib")
set(PKG_CONFIG_LIBS "-L\${libdir} -lsyslog-ng-native-connector")

configure_file (${PROJECT_SOURCE_DIR}/syslog-ng-native-connector.pc.cmake ${PROJECT_BINARY_DIR}/syslog-ng-native-connector.pc)
configure_file (${PROJECT_SOURCE_DIR}/cmake/syslog-ng-native-connector.pc.cmake ${PROJECT_BINARY_DIR}/syslog-ng-native-connector.pc)
install(FILES ${PROJECT_BINARY_DIR}/syslog-ng-native-connector.pc
DESTINATION lib/pkgconfig
COMPONENT native-connector)
Expand Down
2 changes: 1 addition & 1 deletion modules/native/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ modules_native_libsyslog_ng_native_connector_a_SOURCES = \
modules/native/parser.c \
modules/native/parser.h

pkgconfig_DATA += syslog-ng-native-connector.pc
pkgconfig_DATA += autotools/syslog-ng-native-connector.pc

modules_native_libsyslog_ng_native_connector_a_CPPFLAGS = \
$(AM_CPPFLAGS) -fPIC \
Expand Down
5 changes: 2 additions & 3 deletions tests/copyright/policy
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ tests/copyright/policy$
lib/cfg-lex\.[ch]$
tgz2build
autom4te\.cache
m4
Mk
autotools
.*\.(a|bin|class|css|dirstamp|html|idx|jar|js|o|la|lai|lo|MF|persist|Plo|Po|pc|pyc|so|so\.0\.0\.0|soT|spec|trs)$
(.*/)?Makefile$
doc/man
Expand Down Expand Up @@ -154,7 +153,7 @@ lib/tests/test_zone\.c
###########################################################################
LGPLv2.1+_SSL
autogen\.sh$
sub-configure\.sh$
autotools/sub-configure\.sh$
configure\.ac$
Makefile\.am$
lib/(compat|str-repr|timeutils|control|debugger|filter|logproto|multi-line|parser|rewrite|stats|template|tests|transport|logmsg|value-pairs|secret-storage|logthrdest|logthrsource|ack-tracker|signal-slot-connector|[^/]*$)
Expand Down

0 comments on commit 810450d

Please sign in to comment.