build-sys: Use AM_CPPFLAGS instead of AM_CFLAGS for preprocessor arguments
authorJavier Jardón <jjardon@gnome.org>
Sat, 26 Oct 2013 22:26:12 +0000 (23:26 +0100)
committerTanu Kaskinen <tanu.kaskinen@linux.intel.com>
Thu, 26 Jun 2014 10:43:23 +0000 (13:43 +0300)
As the automake documentation says:

AM_CPPFLAGS: The contents of this variable are passed to every compilation
    that invokes the C preprocessor; it is a list of arguments to the preprocessor.
    For instance, -I and -D options should be listed here

AM_CFLAGS: This is the variable the Makefile.am author can use to pass in
    additional C compiler flags.

http://www.gnu.org/software/automake/manual/html_node/Program-Variables.html

src/Makefile.am

index d7ef395b06b1d021f6e1791d0458b223192191ff..c5fea5dc0157dfcc325799de5e2bf3a02999c370 100644 (file)
@@ -46,11 +46,11 @@ AM_CPPFLAGS = \
        -I$(top_srcdir)/src/modules \
        -I$(top_builddir)/src/modules \
        -DPA_ALSA_PATHS_DIR=\"$(alsapathsdir)\" \
-       -DPA_ALSA_PROFILE_SETS_DIR=\"$(alsaprofilesetsdir)\"
-AM_CFLAGS = \
-       $(PTHREAD_CFLAGS) \
+       -DPA_ALSA_PROFILE_SETS_DIR=\"$(alsaprofilesetsdir)\" \
        -DPA_SRCDIR=\"$(abs_srcdir)\" \
        -DPA_BUILDDIR=\"$(abs_builddir)\"
+AM_CFLAGS = \
+       $(PTHREAD_CFLAGS)
 AM_CXXFLAGS = $(AM_CFLAGS)
 SERVER_CFLAGS = -D__INCLUDED_FROM_PULSE_AUDIO