From: Jan Engelhardt Date: Mon, 26 May 2025 10:26:28 +0000 (+0200) Subject: global: Fix wrong inheritance of AM_CFLAGS/AM_CPPFLAGS in target_CFLAGS X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=49f2c4d3365de502d705db28376bf41927a1a900;p=thirdparty%2Fdovecot%2Fcore.git global: Fix wrong inheritance of AM_CFLAGS/AM_CPPFLAGS in target_CFLAGS target_CFLAGS overrides AM_CFLAGS, not AM_CPPFLAGS, thus $(AM_CFLAGS), not $(AM_CPPFLAGS), is needed in target_CFLAGS. --- diff --git a/src/config/Makefile.am b/src/config/Makefile.am index 0117a1077e..efedcb93ca 100644 --- a/src/config/Makefile.am +++ b/src/config/Makefile.am @@ -102,7 +102,7 @@ test_libs = \ $(noinst_LTLIBRARIES) \ $(LIBDOVECOT) -test_config_parser_CFLAGS = $(AM_CPPFLAGS) +test_config_parser_CFLAGS = $(AM_CFLAGS) test_config_parser_SOURCES = test-config-parser.c test_config_parser_LDADD = $(test_libs) test_config_parser_DEPENDENCIES = $(LIBDOVECOT_DEPS) $(noinst_LTLIBRARIES) diff --git a/src/lib-dcrypt/Makefile.am b/src/lib-dcrypt/Makefile.am index d84dffb0e7..b3d85b813a 100644 --- a/src/lib-dcrypt/Makefile.am +++ b/src/lib-dcrypt/Makefile.am @@ -15,14 +15,13 @@ libdcrypt_la_SOURCES = \ istream-decrypt.c \ ostream-encrypt.c -libdcrypt_la_CFLAGS = $(AM_CPPFLAGS) +libdcrypt_la_CFLAGS = $(AM_CFLAGS) libdcrypt_openssl_static_la_SOURCES = dcrypt-openssl1.c dcrypt-openssl3.c libdcrypt_openssl_static_la_LDFLAGS = ../lib-ssl-iostream/libssl_iostream_openssl.la libdcrypt_openssl_static_la_LIBADD = $(SSL_LIBS) libdcrypt_openssl_static_la_DEPENDENCIES = ../lib-ssl-iostream/libssl_iostream_openssl.la -libdcrypt_openssl_static_la_CFLAGS = $(AM_CPPFLAGS) \ - $(SSL_CFLAGS) +libdcrypt_openssl_static_la_CFLAGS = $(AM_CFLAGS) $(SSL_CFLAGS) module_LTLIBRARIES += libdcrypt_openssl.la @@ -30,8 +29,7 @@ libdcrypt_openssl_la_SOURCES = dcrypt-openssl1.c dcrypt-openssl3.c libdcrypt_openssl_la_LDFLAGS = -module -avoid-version ../lib-ssl-iostream/libssl_iostream_openssl.la libdcrypt_openssl_la_LIBADD = $(SSL_LIBS) libdcrypt_openssl_la_DEPENDENCIES = ../lib-ssl-iostream/libssl_iostream_openssl.la -libdcrypt_openssl_la_CFLAGS = $(AM_CPPFLAGS) \ - $(SSL_CFLAGS) +libdcrypt_openssl_la_CFLAGS = $(AM_CFLAGS) $(SSL_CFLAGS) headers = \ dcrypt.h \ @@ -73,7 +71,7 @@ test_crypto_DEPENDENCIES = $(LIBDOVECOT_TEST_DEPS) if HAVE_WHOLE_ARCHIVE test_crypto_LDFLAGS = -export-dynamic -Wl,$(LD_WHOLE_ARCHIVE),../lib-var-expand/.libs/libvar_expand.a,../lib/.libs/liblib.a,../lib-json/.libs/libjson.a,../lib-ssl-iostream/.libs/libssl_iostream.a,$(LD_NO_WHOLE_ARCHIVE) endif -test_crypto_CFLAGS = $(AM_CPPFLAGS) -DDCRYPT_SRC_DIR=\"$(top_srcdir)/src/lib-dcrypt\" +test_crypto_CFLAGS = $(AM_CFLAGS) -DDCRYPT_SRC_DIR=\"$(top_srcdir)/src/lib-dcrypt\" test_crypto_SOURCES = $(libdcrypt_la_SOURCES) test-crypto.c test_stream_LDADD = $(LIBDOVECOT_TEST) @@ -81,5 +79,5 @@ test_stream_DEPENDENCIES = $(LIBDOVECOT_TEST_DEPS) if HAVE_WHOLE_ARCHIVE test_stream_LDFLAGS = -export-dynamic -Wl,$(LD_WHOLE_ARCHIVE),../lib-var-expand/.libs/libvar_expand.a,../lib/.libs/liblib.a,../lib-json/.libs/libjson.a,../lib-ssl-iostream/.libs/libssl_iostream.a,$(LD_NO_WHOLE_ARCHIVE) endif -test_stream_CFLAGS = $(AM_CPPFLAGS) -DDCRYPT_SRC_DIR=\"$(top_srcdir)/src/lib-dcrypt\" +test_stream_CFLAGS = $(AM_CFLAGS) -DDCRYPT_SRC_DIR=\"$(top_srcdir)/src/lib-dcrypt\" test_stream_SOURCES = $(libdcrypt_la_SOURCES) test-stream.c diff --git a/src/lib-dict-backend/Makefile.am b/src/lib-dict-backend/Makefile.am index 60a9382ed8..5404433ce7 100644 --- a/src/lib-dict-backend/Makefile.am +++ b/src/lib-dict-backend/Makefile.am @@ -46,7 +46,7 @@ LIBDICT_LDAP = libdict_ldap.la libdict_ldap_la_DEPENDENCIES = $(LIBDOVECOT_LDAP) $(LIBDOVECOT_DEPS) libdict_ldap_la_LDFLAGS = -module -avoid-version libdict_ldap_la_LIBADD = $(LIBDOVECOT_LDAP) $(LIBDOVECOT) -libdict_ldap_la_CPPFLAGS = $(AM_CPPFLAGS) -DPLUGIN_BUILD +libdict_ldap_la_CPPFLAGS = $(AM_CFLAGS) -DPLUGIN_BUILD libdict_ldap_la_SOURCES = $(ldap_sources) else if HAVE_LDAP @@ -97,7 +97,7 @@ test_programs = \ noinst_PROGRAMS = $(test_programs) -test_dict_sql_CFLAGS = $(AM_CPPFLAGS) -DDICT_SRC_DIR=\"$(top_srcdir)/src/lib-dict-backend\" +test_dict_sql_CFLAGS = $(AM_CFLAGS) -DDICT_SRC_DIR=\"$(top_srcdir)/src/lib-dict-backend\" test_dict_sql_SOURCES = \ test-dict-sql.c test_dict_sql_LDADD = \ diff --git a/src/lib-lua/Makefile.am b/src/lib-lua/Makefile.am index 1fbcbc6a1c..0e8a011ca9 100644 --- a/src/lib-lua/Makefile.am +++ b/src/lib-lua/Makefile.am @@ -71,7 +71,7 @@ noinst_PROGRAMS = $(test_programs) test_libs_ssl = ../lib-ssl-iostream/libssl_iostream_openssl.la test_lua_SOURCES = test-lua.c -test_lua_CFLAGS = $(AM_CPPFLAGS) $(BINARY_CFLAGS) +test_lua_CFLAGS = $(AM_CFLAGS) $(BINARY_CFLAGS) test_lua_LDFLAGS = $(BINARY_LDFLAGS) test_lua_LDADD = libdlua.la $(LIBDOVECOT) $(LUA_LIBS) test_lua_DEPENDENCIES = libdlua.la $(LIBDOVECOT_DEPS) @@ -92,7 +92,7 @@ test_lua_http_client_SOURCES = test-lua-http-client.c test_lua_http_client_LDADD = libdlua.la $(LIBDOVECOT) $(test_libs_ssl) $(LUA_LIBS) test_lua_http_client_DEPENDENCIES = libdlua.la $(LIBDOVECOT_DEPS) test_lua_http_client_CFLAGS = \ - $(AM_CPPFLAGS) \ + $(AM_CFLAGS) \ $(DOVECOT_BINARY_CFLAGS) \ -DTEST_LUA_SCRIPT_DIR=\"$(abs_top_srcdir)/src/lib-lua\" diff --git a/src/lib-var-expand-crypt/Makefile.am b/src/lib-var-expand-crypt/Makefile.am index d62a948d4f..dcf501c921 100644 --- a/src/lib-var-expand-crypt/Makefile.am +++ b/src/lib-var-expand-crypt/Makefile.am @@ -36,7 +36,7 @@ if HAVE_WHOLE_ARCHIVE test_var_expand_crypt_LDFLAGS = -export-dynamic -Wl,$(LD_WHOLE_ARCHIVE),../lib/.libs/liblib.a,../lib-json/.libs/libjson.a,../lib-ssl-iostream/.libs/libssl_iostream.a,$(LD_NO_WHOLE_ARCHIVE) endif -test_var_expand_crypt_CFLAGS = $(AM_CPPFLAGS) \ +test_var_expand_crypt_CFLAGS = $(AM_CFLAGS) \ -DDCRYPT_BUILD_DIR=\"$(top_builddir)/src/lib-dcrypt\" check-local: diff --git a/src/plugins/mail-crypt/Makefile.am b/src/plugins/mail-crypt/Makefile.am index 07a16a279e..e867edc54a 100644 --- a/src/plugins/mail-crypt/Makefile.am +++ b/src/plugins/mail-crypt/Makefile.am @@ -78,7 +78,7 @@ test_fs_crypt_DEPENDENCIES = $(LIBDOVECOT_DEPS) \ fs-crypt.lo \ mail-crypt-global-key.lo test_fs_crypt_LDFLAGS = $(DOVECOT_BINARY_LDFLAGS) -test_fs_crypt_CFLAGS = $(AM_CPPFLAGS) $(DOVECOT_BINARY_CFLAGS) -Dtop_builddir=\"$(top_builddir)\" +test_fs_crypt_CFLAGS = $(AM_CFLAGS) $(DOVECOT_BINARY_CFLAGS) -Dtop_builddir=\"$(top_builddir)\" test_mail_global_key_SOURCES = \ test-mail-global-key.c \ @@ -87,7 +87,7 @@ test_mail_global_key_SOURCES = \ test_mail_global_key_LDADD = $(LIBDOVECOT) test_mail_global_key_DEPENDENCIES = $(LIBDOVECOT_DEPS) test_mail_global_key_LDFLAGS = $(DOVECOT_BINARY_LDFLAGS) -test_mail_global_key_CFLAGS = $(AM_CPPFLAGS) $(DOVECOT_BINARY_CFLAGS) -Dtop_builddir=\"$(top_builddir)\" +test_mail_global_key_CFLAGS = $(AM_CFLAGS) $(DOVECOT_BINARY_CFLAGS) -Dtop_builddir=\"$(top_builddir)\" test_mail_key_SOURCES = \ test-mail-key.c \ @@ -98,7 +98,7 @@ test_mail_key_SOURCES = \ test_mail_key_LDADD = $(LIBDOVECOT_STORAGE) $(LIBDOVECOT) test_mail_key_DEPENDENCIES = $(LIBDOVECOT_DEPS) $(LIBDOVECOT_STORAGE_DEPS) test_mail_key_LDFLAGS = $(DOVECOT_BINARY_LDFLAGS) -test_mail_key_CFLAGS = $(AM_CPPFLAGS) $(DOVECOT_BINARY_CFLAGS) -Dtop_builddir=\"$(top_builddir)\" +test_mail_key_CFLAGS = $(AM_CFLAGS) $(DOVECOT_BINARY_CFLAGS) -Dtop_builddir=\"$(top_builddir)\" noinst_HEADERS = \ crypt-settings.h \ diff --git a/src/plugins/push-notification/Makefile.am b/src/plugins/push-notification/Makefile.am index dfe0b57ce9..083f735f17 100644 --- a/src/plugins/push-notification/Makefile.am +++ b/src/plugins/push-notification/Makefile.am @@ -74,7 +74,7 @@ pkginc_libdir = $(pkgincludedir) pkginc_lib_HEADERS = $(headers) if HAVE_LUA -lib22_push_notification_lua_plugin_la_CFLAGS = $(AM_CPPFLAGS) \ +lib22_push_notification_lua_plugin_la_CFLAGS = $(AM_CFLAGS) \ -I$(top_srcdir)/src/lib-lua \ -I$(top_srcdir)/src/plugins/mail-lua \ $(LUA_CFLAGS)