buildfix for srcdir != builddir

automake doesn't support wildcards.
See https://www.gnu.org/software/automake/manual/html_node/Wildcards.html
for details.

Use the GNU make $(wildcard ) extension.

Note: this breaks with non-GNU make
This commit is contained in:
Tilman Keskinöz 2025-05-22 18:59:56 +02:00
parent 0caf30679f
commit 7660125da6
No known key found for this signature in database
GPG Key ID: 6E2CAEEFF1331ECE
2 changed files with 21 additions and 20 deletions

View File

@ -42,7 +42,7 @@ AC_PREFIX_DEFAULT([/usr/local/modsecurity])
# General automake options. # General automake options.
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects]) AM_INIT_AUTOMAKE([-Wall foreign subdir-objects])
# Check for dependencies (C++, AR, Lex, Yacc and Make) # Check for dependencies (C++, AR, Lex, Yacc and Make)

View File

@ -68,21 +68,21 @@ libmodsecurity_includesub_actions_HEADERS = \
noinst_HEADERS = \ noinst_HEADERS = \
actions/*.h \ $(wildcard actions/*.h) \
actions/ctl/*.h \ $(wildcard actions/ctl/*.h) \
actions/data/*.h \ $(wildcard actions/data/*.h) \
actions/disruptive/*.h \ $(wildcard actions/disruptive/*.h) \
actions/transformations/*.h \ $(wildcard actions/transformations/*.h) \
debug_log/*.h \ $(wildcard debug_log/*.h) \
audit_log/writer/*.h \ $(wildcard audit_log/writer/*.h) \
collection/backend/*.h \ $(wildcard collection/backend/*.h) \
operators/*.h \ $(wildcard operators/*.h) \
parser/*.h \ $(wildcard parser/*.h) \
request_body_processor/*.h \ $(wildcard request_body_processor/*.h) \
utils/*.h \ $(wildcard utils/*.h) \
variables/*.h \ $(wildcard variables/*.h) \
engine/*.h \ $(wildcard engine/*.h) \
*.h $(wildcard *.h)
ENGINES = \ ENGINES = \
@ -308,13 +308,14 @@ libmodsecurity_la_CFLAGS =
libmodsecurity_la_CPPFLAGS = \ libmodsecurity_la_CPPFLAGS = \
-I.. \ -I$(top_srcdir) \
-I$(top_builddir) \
-g \ -g \
-I../others \ -I$(top_srcdir)/others \
-I../others/mbedtls/include \ -I$(top_srcdir)/others/mbedtls/include \
-fPIC \ -fPIC \
-O3 \ -O3 \
-I../headers \ -I$(top_srcdir)/headers \
$(CURL_CFLAGS) \ $(CURL_CFLAGS) \
$(GEOIP_CFLAGS) \ $(GEOIP_CFLAGS) \
$(GLOBAL_CPPFLAGS) \ $(GLOBAL_CPPFLAGS) \