]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tests: use AM_CPPFILES to modify flags in unit tests
authorDan Fandrich <dan@coneharvesters.com>
Sun, 12 Mar 2023 23:58:26 +0000 (16:58 -0700)
committerDan Fandrich <dan@coneharvesters.com>
Mon, 13 Mar 2023 02:04:12 +0000 (19:04 -0700)
Using CPPFLAGS sometimes caused odd compile issues when building tests
with parallel make and AM_CPPFILES is the right flag, anyway.

Follow-up to cb7ed5a

Ref #10749

tests/unit/Makefile.am

index 88f69bba8b683ea943f46d8c3d335ab6ab55d34d..4f64ff5963423d0cb865f6c137539ea7702223af 100644 (file)
@@ -32,11 +32,11 @@ AUTOMAKE_OPTIONS = foreign nostdinc
 # $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
 # $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
 
-CPPFLAGS += -I$(top_srcdir)/include        \
-            -I$(top_builddir)/lib          \
-            -I$(top_srcdir)/lib            \
-            -I$(top_srcdir)/src            \
-            -I$(top_srcdir)/tests/libtest
+AM_CPPFLAGS = -I$(top_srcdir)/include        \
+              -I$(top_builddir)/lib          \
+              -I$(top_srcdir)/lib            \
+              -I$(top_srcdir)/src            \
+              -I$(top_srcdir)/tests/libtest
 
 EXTRA_DIST = Makefile.inc CMakeLists.txt README.md
 
@@ -49,7 +49,7 @@ LDADD = $(top_builddir)/src/libcurltool.la   \
         $(top_builddir)/lib/libcurlu.la      \
         @LDFLAGS@ @LIBCURL_LIBS@ @NSS_LIBS@
 
-CPPFLAGS += -DCURL_STATICLIB -DUNITTESTS
+AM_CPPFLAGS += -DCURL_STATICLIB -DUNITTESTS
 
 CHECKSRC = $(CS_$(V))
 CS_0 = @echo "  RUN     " $@;