Skip to content

Commit 7660125

Browse files
author
Tilman Keskinöz
committed
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
1 parent 0caf306 commit 7660125

File tree

2 files changed

+21
-20
lines changed

2 files changed

+21
-20
lines changed

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ AC_PREFIX_DEFAULT([/usr/local/modsecurity])
4242

4343

4444
# General automake options.
45-
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
45+
AM_INIT_AUTOMAKE([-Wall foreign subdir-objects])
4646

4747

4848
# Check for dependencies (C++, AR, Lex, Yacc and Make)

src/Makefile.am

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -68,21 +68,21 @@ libmodsecurity_includesub_actions_HEADERS = \
6868

6969

7070
noinst_HEADERS = \
71-
actions/*.h \
72-
actions/ctl/*.h \
73-
actions/data/*.h \
74-
actions/disruptive/*.h \
75-
actions/transformations/*.h \
76-
debug_log/*.h \
77-
audit_log/writer/*.h \
78-
collection/backend/*.h \
79-
operators/*.h \
80-
parser/*.h \
81-
request_body_processor/*.h \
82-
utils/*.h \
83-
variables/*.h \
84-
engine/*.h \
85-
*.h
71+
$(wildcard actions/*.h) \
72+
$(wildcard actions/ctl/*.h) \
73+
$(wildcard actions/data/*.h) \
74+
$(wildcard actions/disruptive/*.h) \
75+
$(wildcard actions/transformations/*.h) \
76+
$(wildcard debug_log/*.h) \
77+
$(wildcard audit_log/writer/*.h) \
78+
$(wildcard collection/backend/*.h) \
79+
$(wildcard operators/*.h) \
80+
$(wildcard parser/*.h) \
81+
$(wildcard request_body_processor/*.h) \
82+
$(wildcard utils/*.h) \
83+
$(wildcard variables/*.h) \
84+
$(wildcard engine/*.h) \
85+
$(wildcard *.h)
8686

8787

8888
ENGINES = \
@@ -308,13 +308,14 @@ libmodsecurity_la_CFLAGS =
308308

309309

310310
libmodsecurity_la_CPPFLAGS = \
311-
-I.. \
311+
-I$(top_srcdir) \
312+
-I$(top_builddir) \
312313
-g \
313-
-I../others \
314-
-I../others/mbedtls/include \
314+
-I$(top_srcdir)/others \
315+
-I$(top_srcdir)/others/mbedtls/include \
315316
-fPIC \
316317
-O3 \
317-
-I../headers \
318+
-I$(top_srcdir)/headers \
318319
$(CURL_CFLAGS) \
319320
$(GEOIP_CFLAGS) \
320321
$(GLOBAL_CPPFLAGS) \

0 commit comments

Comments
 (0)