From 7d19d5560d9b5637f7b13a43b039f538535f3996 Mon Sep 17 00:00:00 2001
From: Nathan Yee <nyee32@schedmd.com>
Date: Mon, 1 Jul 2013 11:57:00 -0700
Subject: [PATCH] Changed the Makefile.ams to use the AM_CPPFLAGS instead of
 the INCLUDE variable rpmlint was complaining about them

---
 contribs/pam/Makefile.am                                 | 3 +--
 src/api/Makefile.am                                      | 2 +-
 src/common/Makefile.am                                   | 2 +-
 src/database/Makefile.am                                 | 2 +-
 src/db_api/Makefile.am                                   | 2 +-
 src/plugins/accounting_storage/common/Makefile.am        | 2 +-
 src/plugins/accounting_storage/filetxt/Makefile.am       | 2 +-
 src/plugins/accounting_storage/mysql/Makefile.am         | 2 +-
 src/plugins/accounting_storage/none/Makefile.am          | 2 +-
 src/plugins/accounting_storage/pgsql/Makefile.am         | 2 +-
 src/plugins/accounting_storage/slurmdbd/Makefile.am      | 2 +-
 src/plugins/acct_gather_energy/ipmi/Makefile.am          | 2 +-
 src/plugins/acct_gather_energy/none/Makefile.am          | 2 +-
 src/plugins/acct_gather_energy/rapl/Makefile.am          | 2 +-
 src/plugins/acct_gather_filesystem/lustre/Makefile.am    | 2 +-
 src/plugins/acct_gather_filesystem/none/Makefile.am      | 2 +-
 src/plugins/acct_gather_infiniband/none/Makefile.am      | 2 +-
 src/plugins/acct_gather_infiniband/ofed/Makefile.am      | 2 +-
 src/plugins/acct_gather_profile/hdf5/Makefile.am         | 2 +-
 src/plugins/acct_gather_profile/hdf5/sh5util/Makefile.am | 2 +-
 src/plugins/acct_gather_profile/none/Makefile.am         | 2 +-
 src/plugins/auth/authd/Makefile.am                       | 2 +-
 src/plugins/auth/munge/Makefile.am                       | 2 +-
 src/plugins/auth/none/Makefile.am                        | 2 +-
 src/plugins/checkpoint/aix/Makefile.am                   | 2 +-
 src/plugins/checkpoint/blcr/Makefile.am                  | 5 ++---
 src/plugins/checkpoint/none/Makefile.am                  | 2 +-
 src/plugins/checkpoint/ompi/Makefile.am                  | 2 +-
 src/plugins/checkpoint/poe/Makefile.am                   | 2 +-
 src/plugins/crypto/munge/Makefile.am                     | 2 +-
 src/plugins/crypto/openssl/Makefile.am                   | 2 +-
 src/plugins/ext_sensors/none/Makefile.am                 | 2 +-
 src/plugins/ext_sensors/rrd/Makefile.am                  | 2 +-
 src/plugins/gres/gpu/Makefile.am                         | 2 +-
 src/plugins/gres/mic/Makefile.am                         | 2 +-
 src/plugins/gres/nic/Makefile.am                         | 2 +-
 src/plugins/job_submit/all_partitions/Makefile.am        | 2 +-
 src/plugins/job_submit/cnode/Makefile.am                 | 2 +-
 src/plugins/job_submit/defaults/Makefile.am              | 2 +-
 src/plugins/job_submit/logging/Makefile.am               | 2 +-
 src/plugins/job_submit/lua/Makefile.am                   | 4 ++--
 src/plugins/job_submit/partition/Makefile.am             | 2 +-
 src/plugins/jobacct_gather/aix/Makefile.am               | 2 +-
 src/plugins/jobacct_gather/cgroup/Makefile.am            | 2 +-
 src/plugins/jobacct_gather/linux/Makefile.am             | 2 +-
 src/plugins/jobacct_gather/none/Makefile.am              | 2 +-
 src/plugins/jobcomp/filetxt/Makefile.am                  | 2 +-
 src/plugins/jobcomp/mysql/Makefile.am                    | 2 +-
 src/plugins/jobcomp/none/Makefile.am                     | 2 +-
 src/plugins/jobcomp/pgsql/Makefile.am                    | 5 ++---
 src/plugins/jobcomp/script/Makefile.am                   | 2 +-
 src/plugins/launch/aprun/Makefile.am                     | 2 +-
 src/plugins/launch/poe/Makefile.am                       | 2 +-
 src/plugins/launch/runjob/Makefile.am                    | 2 +-
 src/plugins/launch/slurm/Makefile.am                     | 2 +-
 src/plugins/mpi/lam/Makefile.am                          | 2 +-
 src/plugins/mpi/mpich1_p4/Makefile.am                    | 2 +-
 src/plugins/mpi/mpich1_shmem/Makefile.am                 | 2 +-
 src/plugins/mpi/mpichgm/Makefile.am                      | 2 +-
 src/plugins/mpi/mpichmx/Makefile.am                      | 2 +-
 src/plugins/mpi/mvapich/Makefile.am                      | 2 +-
 src/plugins/mpi/none/Makefile.am                         | 2 +-
 src/plugins/mpi/openmpi/Makefile.am                      | 2 +-
 src/plugins/mpi/pmi2/Makefile.am                         | 2 +-
 src/plugins/preempt/partition_prio/Makefile.am           | 2 +-
 src/plugins/preempt/qos/Makefile.am                      | 2 +-
 src/plugins/priority/basic/Makefile.am                   | 2 +-
 src/plugins/priority/multifactor/Makefile.am             | 2 +-
 src/plugins/proctrack/aix/Makefile.am                    | 2 +-
 src/plugins/proctrack/cgroup/Makefile.am                 | 2 +-
 src/plugins/proctrack/linuxproc/Makefile.am              | 2 +-
 src/plugins/proctrack/lua/Makefile.am                    | 4 ++--
 src/plugins/proctrack/pgid/Makefile.am                   | 2 +-
 src/plugins/proctrack/sgi_job/Makefile.am                | 2 +-
 src/plugins/sched/backfill/Makefile.am                   | 2 +-
 src/plugins/sched/builtin/Makefile.am                    | 2 +-
 src/plugins/sched/hold/Makefile.am                       | 2 +-
 src/plugins/sched/wiki/Makefile.am                       | 2 +-
 src/plugins/sched/wiki2/Makefile.am                      | 2 +-
 src/plugins/select/bluegene/Makefile.am                  | 2 +-
 src/plugins/select/bluegene/ba/Makefile.am               | 2 +-
 src/plugins/select/bluegene/ba_bgq/Makefile.am           | 2 +-
 src/plugins/select/bluegene/bl/Makefile.am               | 2 +-
 src/plugins/select/bluegene/bl_bgq/Makefile.am           | 2 +-
 src/plugins/select/bluegene/sfree/Makefile.am            | 2 +-
 src/plugins/select/cons_res/Makefile.am                  | 2 +-
 src/plugins/select/cray/Makefile.am                      | 2 +-
 src/plugins/select/cray/libalps/Makefile.am              | 2 +-
 src/plugins/select/cray/libemulate/Makefile.am           | 2 +-
 src/plugins/select/linear/Makefile.am                    | 2 +-
 src/plugins/select/serial/Makefile.am                    | 2 +-
 src/plugins/switch/none/Makefile.am                      | 2 +-
 src/plugins/switch/nrt/Makefile.am                       | 2 +-
 src/plugins/switch/nrt/libpermapi/Makefile.am            | 2 +-
 src/plugins/task/affinity/Makefile.am                    | 2 +-
 src/plugins/task/cgroup/Makefile.am                      | 2 +-
 src/plugins/task/none/Makefile.am                        | 2 +-
 src/plugins/topology/3d_torus/Makefile.am                | 2 +-
 src/plugins/topology/node_rank/Makefile.am               | 2 +-
 src/plugins/topology/none/Makefile.am                    | 2 +-
 src/plugins/topology/tree/Makefile.am                    | 2 +-
 src/sacct/Makefile.am                                    | 2 +-
 src/sacctmgr/Makefile.am                                 | 2 +-
 src/salloc/Makefile.am                                   | 2 +-
 src/sattach/Makefile.am                                  | 2 +-
 src/sbatch/Makefile.am                                   | 2 +-
 src/sbcast/Makefile.am                                   | 2 +-
 src/scancel/Makefile.am                                  | 2 +-
 src/scontrol/Makefile.am                                 | 2 +-
 src/sdiag/Makefile.am                                    | 2 +-
 src/sinfo/Makefile.am                                    | 2 +-
 src/slurmctld/Makefile.am                                | 2 +-
 src/slurmd/common/Makefile.am                            | 2 +-
 src/slurmd/slurmd/Makefile.am                            | 4 ++--
 src/slurmd/slurmstepd/Makefile.am                        | 2 +-
 src/slurmdbd/Makefile.am                                 | 2 +-
 src/smap/Makefile.am                                     | 2 +-
 src/sprio/Makefile.am                                    | 2 +-
 src/squeue/Makefile.am                                   | 2 +-
 src/sreport/Makefile.am                                  | 2 +-
 src/srun/Makefile.am                                     | 2 +-
 src/srun/libsrun/Makefile.am                             | 2 +-
 src/srun_cr/Makefile.am                                  | 2 +-
 src/sshare/Makefile.am                                   | 2 +-
 src/sstat/Makefile.am                                    | 2 +-
 src/strigger/Makefile.am                                 | 2 +-
 src/sview/Makefile.am                                    | 2 +-
 testsuite/slurm_unit/api/Makefile.am                     | 2 +-
 testsuite/slurm_unit/api/manual/Makefile.am              | 2 +-
 testsuite/slurm_unit/common/Makefile.am                  | 2 +-
 130 files changed, 135 insertions(+), 138 deletions(-)

diff --git a/contribs/pam/Makefile.am b/contribs/pam/Makefile.am
index 25c3a2f1ff6..799c7e63d26 100644
--- a/contribs/pam/Makefile.am
+++ b/contribs/pam/Makefile.am
@@ -4,8 +4,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-AM_CPPFLAGS = -fPIC
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -fPIC -I$(top_srcdir) -I$(top_srcdir)/src/common
 PLUGIN_FLAGS = -module --export-dynamic -avoid-version
 
 pkglibdir = $(PAM_DIR)
diff --git a/src/api/Makefile.am b/src/api/Makefile.am
index d78c4d53889..f5ef0ff0064 100644
--- a/src/api/Makefile.am
+++ b/src/api/Makefile.am
@@ -3,7 +3,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-INCLUDES = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 
 if WITH_GNU_LD
 VERSION_SCRIPT = \
diff --git a/src/common/Makefile.am b/src/common/Makefile.am
index 1ff1fe6d8b1..a0d6325328c 100644
--- a/src/common/Makefile.am
+++ b/src/common/Makefile.am
@@ -18,7 +18,7 @@ build_unsetenv_src = unsetenv.c unsetenv.h
 extra_unsetenv_src =
 endif
 
-INCLUDES     = -I$(top_srcdir) $(BG_INCLUDES) $(HWLOC_CPPFLAGS)
+AM_CPPFLAGS     = -I$(top_srcdir) $(BG_INCLUDES) $(HWLOC_CPPFLAGS)
 
 noinst_PROGRAMS = libcommon.o libeio.o libspank.o
 # This is needed if compiling on windows
diff --git a/src/database/Makefile.am b/src/database/Makefile.am
index 8bd82e8da16..46bcf4636e0 100644
--- a/src/database/Makefile.am
+++ b/src/database/Makefile.am
@@ -2,7 +2,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 if WITH_MYSQL
 MYSQL_LIB = libslurm_mysql.la
diff --git a/src/db_api/Makefile.am b/src/db_api/Makefile.am
index 4b392b53201..246a6c6c670 100644
--- a/src/db_api/Makefile.am
+++ b/src/db_api/Makefile.am
@@ -3,7 +3,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-INCLUDES = -I$(top_srcdir)
+AM_CPPFLAGS = -I$(top_srcdir)
 
 if WITH_GNU_LD
 VERSION_SCRIPT = \
diff --git a/src/plugins/accounting_storage/common/Makefile.am b/src/plugins/accounting_storage/common/Makefile.am
index 92545763292..53a6071dece 100644
--- a/src/plugins/accounting_storage/common/Makefile.am
+++ b/src/plugins/accounting_storage/common/Makefile.am
@@ -3,7 +3,7 @@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
 
-INCLUDES = -I$(top_srcdir)
+AM_CPPFLAGS = -I$(top_srcdir)
 
 # making a .la
 
diff --git a/src/plugins/accounting_storage/filetxt/Makefile.am b/src/plugins/accounting_storage/filetxt/Makefile.am
index 85a83d5eb88..72a37a48a93 100644
--- a/src/plugins/accounting_storage/filetxt/Makefile.am
+++ b/src/plugins/accounting_storage/filetxt/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = accounting_storage_filetxt.la
 
diff --git a/src/plugins/accounting_storage/mysql/Makefile.am b/src/plugins/accounting_storage/mysql/Makefile.am
index a884637904f..d7cfbb3784e 100644
--- a/src/plugins/accounting_storage/mysql/Makefile.am
+++ b/src/plugins/accounting_storage/mysql/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 AS_MYSQL_SOURCES = accounting_storage_mysql.c accounting_storage_mysql.h \
 		as_mysql_acct.c as_mysql_acct.h \
diff --git a/src/plugins/accounting_storage/none/Makefile.am b/src/plugins/accounting_storage/none/Makefile.am
index 338e0c6a5ae..a6da95f3338 100644
--- a/src/plugins/accounting_storage/none/Makefile.am
+++ b/src/plugins/accounting_storage/none/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = accounting_storage_none.la
 
diff --git a/src/plugins/accounting_storage/pgsql/Makefile.am b/src/plugins/accounting_storage/pgsql/Makefile.am
index d8b11af8d68..b77f560c800 100644
--- a/src/plugins/accounting_storage/pgsql/Makefile.am
+++ b/src/plugins/accounting_storage/pgsql/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 AS_PG_SOURCES= accounting_storage_pgsql.c accounting_storage_pgsql.h \
 	       as_pg_common.c as_pg_common.h \
diff --git a/src/plugins/accounting_storage/slurmdbd/Makefile.am b/src/plugins/accounting_storage/slurmdbd/Makefile.am
index c52d160847f..8f5b20855ab 100644
--- a/src/plugins/accounting_storage/slurmdbd/Makefile.am
+++ b/src/plugins/accounting_storage/slurmdbd/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = accounting_storage_slurmdbd.la
 
diff --git a/src/plugins/acct_gather_energy/ipmi/Makefile.am b/src/plugins/acct_gather_energy/ipmi/Makefile.am
index c1215800c8c..7ec336c4604 100644
--- a/src/plugins/acct_gather_energy/ipmi/Makefile.am
+++ b/src/plugins/acct_gather_energy/ipmi/Makefile.am
@@ -5,7 +5,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common $(FREEIPMI_CPPFLAGS)
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(FREEIPMI_CPPFLAGS)
 
 if BUILD_IPMI
 
diff --git a/src/plugins/acct_gather_energy/none/Makefile.am b/src/plugins/acct_gather_energy/none/Makefile.am
index 332a904aab5..337661fd814 100644
--- a/src/plugins/acct_gather_energy/none/Makefile.am
+++ b/src/plugins/acct_gather_energy/none/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = acct_gather_energy_none.la
 
diff --git a/src/plugins/acct_gather_energy/rapl/Makefile.am b/src/plugins/acct_gather_energy/rapl/Makefile.am
index d671bdf4c79..e13073a8037 100644
--- a/src/plugins/acct_gather_energy/rapl/Makefile.am
+++ b/src/plugins/acct_gather_energy/rapl/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = acct_gather_energy_rapl.la
 
diff --git a/src/plugins/acct_gather_filesystem/lustre/Makefile.am b/src/plugins/acct_gather_filesystem/lustre/Makefile.am
index 476e129af73..529727eedb9 100644
--- a/src/plugins/acct_gather_filesystem/lustre/Makefile.am
+++ b/src/plugins/acct_gather_filesystem/lustre/Makefile.am
@@ -5,7 +5,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
diff --git a/src/plugins/acct_gather_filesystem/none/Makefile.am b/src/plugins/acct_gather_filesystem/none/Makefile.am
index 18bf771ecf0..007d84d340a 100644
--- a/src/plugins/acct_gather_filesystem/none/Makefile.am
+++ b/src/plugins/acct_gather_filesystem/none/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = acct_gather_filesystem_none.la
 
diff --git a/src/plugins/acct_gather_infiniband/none/Makefile.am b/src/plugins/acct_gather_infiniband/none/Makefile.am
index d7f212edf5a..69d851fcbf6 100644
--- a/src/plugins/acct_gather_infiniband/none/Makefile.am
+++ b/src/plugins/acct_gather_infiniband/none/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = acct_gather_infiniband_none.la
 
diff --git a/src/plugins/acct_gather_infiniband/ofed/Makefile.am b/src/plugins/acct_gather_infiniband/ofed/Makefile.am
index ad77d8bf6ec..e54c4662337 100644
--- a/src/plugins/acct_gather_infiniband/ofed/Makefile.am
+++ b/src/plugins/acct_gather_infiniband/ofed/Makefile.am
@@ -5,7 +5,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 if BUILD_OFED
 
diff --git a/src/plugins/acct_gather_profile/hdf5/Makefile.am b/src/plugins/acct_gather_profile/hdf5/Makefile.am
index e19b873b9bf..0d3d6f7df53 100644
--- a/src/plugins/acct_gather_profile/hdf5/Makefile.am
+++ b/src/plugins/acct_gather_profile/hdf5/Makefile.am
@@ -6,7 +6,7 @@ PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
 # Do not put a link to common here.  src/common contains an mpi.h which
 # hdf5 could of been installed with a link to the generic mpi.h.
-INCLUDES = -I$(top_srcdir)
+AM_CPPFLAGS = -I$(top_srcdir)
 
 # cpu/core energy accounting plugin.
 HDF5_SOURCES = acct_gather_profile_hdf5.c
diff --git a/src/plugins/acct_gather_profile/hdf5/sh5util/Makefile.am b/src/plugins/acct_gather_profile/hdf5/sh5util/Makefile.am
index dadb2a81f90..9d3ac00725f 100644
--- a/src/plugins/acct_gather_profile/hdf5/sh5util/Makefile.am
+++ b/src/plugins/acct_gather_profile/hdf5/sh5util/Makefile.am
@@ -5,7 +5,7 @@ AUTOMAKE_OPTIONS = foreign
 
 # Do not put a link to common here.  src/common contains an mpi.h which
 # hdf5 could of been installed with a link to the generic mpi.h.
-INCLUDES = -I$(top_srcdir) -I../
+AM_CPPFLAGS = -I$(top_srcdir) -I../
 
 SHDF5_SOURCES = sh5util.c
 
diff --git a/src/plugins/acct_gather_profile/none/Makefile.am b/src/plugins/acct_gather_profile/none/Makefile.am
index cc5d507772b..451caab5069 100644
--- a/src/plugins/acct_gather_profile/none/Makefile.am
+++ b/src/plugins/acct_gather_profile/none/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = acct_gather_profile_none.la
 
diff --git a/src/plugins/auth/authd/Makefile.am b/src/plugins/auth/authd/Makefile.am
index 6d943cf1926..7e44d895476 100644
--- a/src/plugins/auth/authd/Makefile.am
+++ b/src/plugins/auth/authd/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 # Add your plugin to this line, following the naming conventions.
 if WITH_AUTHD
diff --git a/src/plugins/auth/munge/Makefile.am b/src/plugins/auth/munge/Makefile.am
index baafe57d001..ebf4c04b657 100644
--- a/src/plugins/auth/munge/Makefile.am
+++ b/src/plugins/auth/munge/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common $(MUNGE_CPPFLAGS)
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(MUNGE_CPPFLAGS)
 
 # Add your plugin to this line, following the naming conventions.
 if WITH_MUNGE
diff --git a/src/plugins/auth/none/Makefile.am b/src/plugins/auth/none/Makefile.am
index 238a90d1a14..8a597828954 100644
--- a/src/plugins/auth/none/Makefile.am
+++ b/src/plugins/auth/none/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = auth_none.la
 
diff --git a/src/plugins/checkpoint/aix/Makefile.am b/src/plugins/checkpoint/aix/Makefile.am
index 071c72dbf2a..514efc76500 100644
--- a/src/plugins/checkpoint/aix/Makefile.am
+++ b/src/plugins/checkpoint/aix/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 # AIX checkpoint plugin.
 if HAVE_AIX
diff --git a/src/plugins/checkpoint/blcr/Makefile.am b/src/plugins/checkpoint/blcr/Makefile.am
index f00b96bb38a..5059996a256 100644
--- a/src/plugins/checkpoint/blcr/Makefile.am
+++ b/src/plugins/checkpoint/blcr/Makefile.am
@@ -2,12 +2,11 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-AM_CPPFLAGS = -DPKGLIBEXECDIR=\"$(pkglibexecdir)\"
+AM_CPPFLAGS = -DPKGLIBEXECDIR=\"$(pkglibexecdir)\" \
+	-I$(top_srcdir) -I$(top_srcdir)/src/common
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
-
 if WITH_BLCR
 pkglib_LTLIBRARIES = checkpoint_blcr.la
 checkpoint_blcr_la_SOURCES = checkpoint_blcr.c
diff --git a/src/plugins/checkpoint/none/Makefile.am b/src/plugins/checkpoint/none/Makefile.am
index 1ce67ad0608..bb4cd44805f 100644
--- a/src/plugins/checkpoint/none/Makefile.am
+++ b/src/plugins/checkpoint/none/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = checkpoint_none.la
 
diff --git a/src/plugins/checkpoint/ompi/Makefile.am b/src/plugins/checkpoint/ompi/Makefile.am
index e2f5f74b594..29ad130db93 100644
--- a/src/plugins/checkpoint/ompi/Makefile.am
+++ b/src/plugins/checkpoint/ompi/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = checkpoint_ompi.la
 
diff --git a/src/plugins/checkpoint/poe/Makefile.am b/src/plugins/checkpoint/poe/Makefile.am
index 2911e177700..4e631728fbf 100644
--- a/src/plugins/checkpoint/poe/Makefile.am
+++ b/src/plugins/checkpoint/poe/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 # POE checkpoint plugin.
 if DONT_BUILD
diff --git a/src/plugins/crypto/munge/Makefile.am b/src/plugins/crypto/munge/Makefile.am
index 12d0f74d97e..c4a9bee49ac 100644
--- a/src/plugins/crypto/munge/Makefile.am
+++ b/src/plugins/crypto/munge/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common $(MUNGE_CPPFLAGS)
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(MUNGE_CPPFLAGS)
 
 # Add your plugin to this line, following the naming conventions.
 if WITH_MUNGE
diff --git a/src/plugins/crypto/openssl/Makefile.am b/src/plugins/crypto/openssl/Makefile.am
index 3765f8fb9a0..b997cae66a7 100644
--- a/src/plugins/crypto/openssl/Makefile.am
+++ b/src/plugins/crypto/openssl/Makefile.am
@@ -10,7 +10,7 @@ endif
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) $(SSL_CPPFLAGS) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) $(SSL_CPPFLAGS) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = $(openssl_lib)
 
diff --git a/src/plugins/ext_sensors/none/Makefile.am b/src/plugins/ext_sensors/none/Makefile.am
index 1c88177d565..adac0555c8e 100644
--- a/src/plugins/ext_sensors/none/Makefile.am
+++ b/src/plugins/ext_sensors/none/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = ext_sensors_none.la
 
diff --git a/src/plugins/ext_sensors/rrd/Makefile.am b/src/plugins/ext_sensors/rrd/Makefile.am
index 36a5c1fbf47..c8c25b14d26 100644
--- a/src/plugins/ext_sensors/rrd/Makefile.am
+++ b/src/plugins/ext_sensors/rrd/Makefile.am
@@ -2,7 +2,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common  $(RRDTOOL_CPPFLAGS)
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common  $(RRDTOOL_CPPFLAGS)
 
 if BUILD_RRD
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
diff --git a/src/plugins/gres/gpu/Makefile.am b/src/plugins/gres/gpu/Makefile.am
index 58f5c1ce308..8b8196b69ab 100644
--- a/src/plugins/gres/gpu/Makefile.am
+++ b/src/plugins/gres/gpu/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common $(HWLOC_CPPFLAGS)
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(HWLOC_CPPFLAGS)
 
 pkglib_LTLIBRARIES = gres_gpu.la
 
diff --git a/src/plugins/gres/mic/Makefile.am b/src/plugins/gres/mic/Makefile.am
index 3c145cf6afe..cfad49e4a02 100644
--- a/src/plugins/gres/mic/Makefile.am
+++ b/src/plugins/gres/mic/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common $(HWLOC_CPPFLAGS)
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(HWLOC_CPPFLAGS)
 
 pkglib_LTLIBRARIES = gres_mic.la
 
diff --git a/src/plugins/gres/nic/Makefile.am b/src/plugins/gres/nic/Makefile.am
index 93d288a5737..674ed3abf0c 100644
--- a/src/plugins/gres/nic/Makefile.am
+++ b/src/plugins/gres/nic/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common $(HWLOC_CPPFLAGS)
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(HWLOC_CPPFLAGS)
 
 pkglib_LTLIBRARIES = gres_nic.la
 
diff --git a/src/plugins/job_submit/all_partitions/Makefile.am b/src/plugins/job_submit/all_partitions/Makefile.am
index c9a6e0ecf0b..e1f56a1664c 100644
--- a/src/plugins/job_submit/all_partitions/Makefile.am
+++ b/src/plugins/job_submit/all_partitions/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = job_submit_all_partitions.la
 
diff --git a/src/plugins/job_submit/cnode/Makefile.am b/src/plugins/job_submit/cnode/Makefile.am
index 871cbe5184c..0a0e897a9e9 100644
--- a/src/plugins/job_submit/cnode/Makefile.am
+++ b/src/plugins/job_submit/cnode/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = job_submit_cnode.la
 
diff --git a/src/plugins/job_submit/defaults/Makefile.am b/src/plugins/job_submit/defaults/Makefile.am
index ff2506d09f1..e7182cf8fc5 100644
--- a/src/plugins/job_submit/defaults/Makefile.am
+++ b/src/plugins/job_submit/defaults/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = job_submit_defaults.la
 
diff --git a/src/plugins/job_submit/logging/Makefile.am b/src/plugins/job_submit/logging/Makefile.am
index 3f0290da36d..0326d122048 100644
--- a/src/plugins/job_submit/logging/Makefile.am
+++ b/src/plugins/job_submit/logging/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = job_submit_logging.la
 
diff --git a/src/plugins/job_submit/lua/Makefile.am b/src/plugins/job_submit/lua/Makefile.am
index dd7f354d3c4..2a94e23d64a 100644
--- a/src/plugins/job_submit/lua/Makefile.am
+++ b/src/plugins/job_submit/lua/Makefile.am
@@ -2,10 +2,10 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-AM_CPPFLAGS = -DDEFAULT_SCRIPT_DIR=\"$(sysconfdir)\"
+AM_CPPFLAGS = -DDEFAULT_SCRIPT_DIR=\"$(sysconfdir)\" \
+	-I$(top_srcdir) -I$(top_srcdir)/src/common $(lua_CFLAGS)
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common $(lua_CFLAGS)
 
 if HAVE_LUA
  
diff --git a/src/plugins/job_submit/partition/Makefile.am b/src/plugins/job_submit/partition/Makefile.am
index 7db6073e1d1..c6aef859c10 100644
--- a/src/plugins/job_submit/partition/Makefile.am
+++ b/src/plugins/job_submit/partition/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = job_submit_partition.la
 
diff --git a/src/plugins/jobacct_gather/aix/Makefile.am b/src/plugins/jobacct_gather/aix/Makefile.am
index 97f8ebfb4d5..1a9ccc3f146 100644
--- a/src/plugins/jobacct_gather/aix/Makefile.am
+++ b/src/plugins/jobacct_gather/aix/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = jobacct_gather_aix.la
 
diff --git a/src/plugins/jobacct_gather/cgroup/Makefile.am b/src/plugins/jobacct_gather/cgroup/Makefile.am
index 5f9a70cecd6..50a6e0c859c 100644
--- a/src/plugins/jobacct_gather/cgroup/Makefile.am
+++ b/src/plugins/jobacct_gather/cgroup/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = jobacct_gather_cgroup.la
 
diff --git a/src/plugins/jobacct_gather/linux/Makefile.am b/src/plugins/jobacct_gather/linux/Makefile.am
index 68d280a3741..a8ae60858b8 100644
--- a/src/plugins/jobacct_gather/linux/Makefile.am
+++ b/src/plugins/jobacct_gather/linux/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = jobacct_gather_linux.la
 
diff --git a/src/plugins/jobacct_gather/none/Makefile.am b/src/plugins/jobacct_gather/none/Makefile.am
index 84ec9ffdac0..412fdf81e46 100644
--- a/src/plugins/jobacct_gather/none/Makefile.am
+++ b/src/plugins/jobacct_gather/none/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = jobacct_gather_none.la
 
diff --git a/src/plugins/jobcomp/filetxt/Makefile.am b/src/plugins/jobcomp/filetxt/Makefile.am
index dc958ba7f7c..aff5faddcd9 100644
--- a/src/plugins/jobcomp/filetxt/Makefile.am
+++ b/src/plugins/jobcomp/filetxt/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = jobcomp_filetxt.la
 
diff --git a/src/plugins/jobcomp/mysql/Makefile.am b/src/plugins/jobcomp/mysql/Makefile.am
index 5b01a39a918..962b9fe6944 100644
--- a/src/plugins/jobcomp/mysql/Makefile.am
+++ b/src/plugins/jobcomp/mysql/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 if WITH_MYSQL
 pkglib_LTLIBRARIES = jobcomp_mysql.la
diff --git a/src/plugins/jobcomp/none/Makefile.am b/src/plugins/jobcomp/none/Makefile.am
index fa713024073..82ed6f232ca 100644
--- a/src/plugins/jobcomp/none/Makefile.am
+++ b/src/plugins/jobcomp/none/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = jobcomp_none.la
 
diff --git a/src/plugins/jobcomp/pgsql/Makefile.am b/src/plugins/jobcomp/pgsql/Makefile.am
index 456a272e67f..9ea9e3724ac 100644
--- a/src/plugins/jobcomp/pgsql/Makefile.am
+++ b/src/plugins/jobcomp/pgsql/Makefile.am
@@ -1,12 +1,11 @@
 # Makefile for jobcomp/pgsql plugin
 
-AM_CPPFLAGS = $(PGSQL_CFLAGS)
+AM_CPPFLAGS = $(PGSQL_CFLAGS) \
+	-I$(top_srcdir) -I$(top_srcdir)/src/common
 AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
-
 if WITH_PGSQL
 pkglib_LTLIBRARIES = jobcomp_pgsql.la
 
diff --git a/src/plugins/jobcomp/script/Makefile.am b/src/plugins/jobcomp/script/Makefile.am
index d96c907882a..c6f1f953fb8 100644
--- a/src/plugins/jobcomp/script/Makefile.am
+++ b/src/plugins/jobcomp/script/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = jobcomp_script.la
 
diff --git a/src/plugins/launch/aprun/Makefile.am b/src/plugins/launch/aprun/Makefile.am
index fa0acc59483..4de9130db4f 100644
--- a/src/plugins/launch/aprun/Makefile.am
+++ b/src/plugins/launch/aprun/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = launch_aprun.la
 
diff --git a/src/plugins/launch/poe/Makefile.am b/src/plugins/launch/poe/Makefile.am
index af07975882d..fa20600b3c1 100644
--- a/src/plugins/launch/poe/Makefile.am
+++ b/src/plugins/launch/poe/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = launch_poe.la
 
diff --git a/src/plugins/launch/runjob/Makefile.am b/src/plugins/launch/runjob/Makefile.am
index 43edff4664d..9812e8a57df 100644
--- a/src/plugins/launch/runjob/Makefile.am
+++ b/src/plugins/launch/runjob/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common $(BG_INCLUDES)
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(BG_INCLUDES)
 
 pkglib_LTLIBRARIES = launch_runjob.la
 
diff --git a/src/plugins/launch/slurm/Makefile.am b/src/plugins/launch/slurm/Makefile.am
index 80b3e9b7153..cd585bdc4ed 100644
--- a/src/plugins/launch/slurm/Makefile.am
+++ b/src/plugins/launch/slurm/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = launch_slurm.la
 
diff --git a/src/plugins/mpi/lam/Makefile.am b/src/plugins/mpi/lam/Makefile.am
index 5b71327ba03..d9e6af44d25 100644
--- a/src/plugins/mpi/lam/Makefile.am
+++ b/src/plugins/mpi/lam/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = mpi_lam.la
 
diff --git a/src/plugins/mpi/mpich1_p4/Makefile.am b/src/plugins/mpi/mpich1_p4/Makefile.am
index b0344b998bd..ae22d173de2 100644
--- a/src/plugins/mpi/mpich1_p4/Makefile.am
+++ b/src/plugins/mpi/mpich1_p4/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = mpi_mpich1_p4.la
 
diff --git a/src/plugins/mpi/mpich1_shmem/Makefile.am b/src/plugins/mpi/mpich1_shmem/Makefile.am
index 63000a35f1a..489e5f2f7c5 100644
--- a/src/plugins/mpi/mpich1_shmem/Makefile.am
+++ b/src/plugins/mpi/mpich1_shmem/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = mpi_mpich1_shmem.la
 
diff --git a/src/plugins/mpi/mpichgm/Makefile.am b/src/plugins/mpi/mpichgm/Makefile.am
index 5db34be7885..cbeb0964c97 100644
--- a/src/plugins/mpi/mpichgm/Makefile.am
+++ b/src/plugins/mpi/mpichgm/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = mpi_mpichgm.la
 
diff --git a/src/plugins/mpi/mpichmx/Makefile.am b/src/plugins/mpi/mpichmx/Makefile.am
index 42bfd8727e4..47a2611c3c8 100644
--- a/src/plugins/mpi/mpichmx/Makefile.am
+++ b/src/plugins/mpi/mpichmx/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = mpi_mpichmx.la
 
diff --git a/src/plugins/mpi/mvapich/Makefile.am b/src/plugins/mpi/mvapich/Makefile.am
index 05fb7c5ec20..1a0ab1c84e8 100644
--- a/src/plugins/mpi/mvapich/Makefile.am
+++ b/src/plugins/mpi/mvapich/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = mpi_mvapich.la
 
diff --git a/src/plugins/mpi/none/Makefile.am b/src/plugins/mpi/none/Makefile.am
index 005df962e6b..2b4ace0f397 100644
--- a/src/plugins/mpi/none/Makefile.am
+++ b/src/plugins/mpi/none/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = mpi_none.la
 
diff --git a/src/plugins/mpi/openmpi/Makefile.am b/src/plugins/mpi/openmpi/Makefile.am
index 44d705345b9..ea0a0d3d7b3 100644
--- a/src/plugins/mpi/openmpi/Makefile.am
+++ b/src/plugins/mpi/openmpi/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = mpi_openmpi.la
 
diff --git a/src/plugins/mpi/pmi2/Makefile.am b/src/plugins/mpi/pmi2/Makefile.am
index f14adb673f9..d1851349009 100644
--- a/src/plugins/mpi/pmi2/Makefile.am
+++ b/src/plugins/mpi/pmi2/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic 
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = mpi_pmi2.la
 
diff --git a/src/plugins/preempt/partition_prio/Makefile.am b/src/plugins/preempt/partition_prio/Makefile.am
index 9053dc56097..8c69124fe3f 100644
--- a/src/plugins/preempt/partition_prio/Makefile.am
+++ b/src/plugins/preempt/partition_prio/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = preempt_partition_prio.la
 
diff --git a/src/plugins/preempt/qos/Makefile.am b/src/plugins/preempt/qos/Makefile.am
index 9ed16cd4ee0..77d712bd5cb 100644
--- a/src/plugins/preempt/qos/Makefile.am
+++ b/src/plugins/preempt/qos/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = preempt_qos.la
 
diff --git a/src/plugins/priority/basic/Makefile.am b/src/plugins/priority/basic/Makefile.am
index cd7b44668af..a9005771736 100644
--- a/src/plugins/priority/basic/Makefile.am
+++ b/src/plugins/priority/basic/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = priority_basic.la
 
diff --git a/src/plugins/priority/multifactor/Makefile.am b/src/plugins/priority/multifactor/Makefile.am
index 52783a1b9f7..8ccb9eba4d4 100644
--- a/src/plugins/priority/multifactor/Makefile.am
+++ b/src/plugins/priority/multifactor/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = priority_multifactor.la
 
diff --git a/src/plugins/proctrack/aix/Makefile.am b/src/plugins/proctrack/aix/Makefile.am
index e0ffda3bf20..3e820cf40fe 100644
--- a/src/plugins/proctrack/aix/Makefile.am
+++ b/src/plugins/proctrack/aix/Makefile.am
@@ -5,7 +5,7 @@ AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -Wl,-bI:$(PROCTRACKDIR)/proctrackext.exp\
 		-module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = proctrack_aix.la
 
diff --git a/src/plugins/proctrack/cgroup/Makefile.am b/src/plugins/proctrack/cgroup/Makefile.am
index bed4f1339d2..7012a6c443e 100644
--- a/src/plugins/proctrack/cgroup/Makefile.am
+++ b/src/plugins/proctrack/cgroup/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = proctrack_cgroup.la
 
diff --git a/src/plugins/proctrack/linuxproc/Makefile.am b/src/plugins/proctrack/linuxproc/Makefile.am
index bb07731f0f2..6e350d6c91f 100644
--- a/src/plugins/proctrack/linuxproc/Makefile.am
+++ b/src/plugins/proctrack/linuxproc/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = proctrack_linuxproc.la
 
diff --git a/src/plugins/proctrack/lua/Makefile.am b/src/plugins/proctrack/lua/Makefile.am
index 0a6496c1013..c9fd3d0ba3e 100644
--- a/src/plugins/proctrack/lua/Makefile.am
+++ b/src/plugins/proctrack/lua/Makefile.am
@@ -2,10 +2,10 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-AM_CPPFLAGS = -DDEFAULT_SCRIPT_DIR=\"$(sysconfdir)\"
+AM_CPPFLAGS = -DDEFAULT_SCRIPT_DIR=\"$(sysconfdir)\" \
+	-I$(top_srcdir) -I$(top_srcdir)/src/common $(lua_CFLAGS)
 
 PLUGIN_FLAGS = - -module -avoid-version --export-dynamic
-INCLUDES     = -I$(top_srcdir) -I$(top_srcdir)/src/common $(lua_CFLAGS)
 
 pkglib_LTLIBRARIES       = proctrack_lua.la
 proctrack_lua_la_SOURCES = proctrack_lua.c
diff --git a/src/plugins/proctrack/pgid/Makefile.am b/src/plugins/proctrack/pgid/Makefile.am
index 2624070de39..49d9a927778 100644
--- a/src/plugins/proctrack/pgid/Makefile.am
+++ b/src/plugins/proctrack/pgid/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = proctrack_pgid.la
 
diff --git a/src/plugins/proctrack/sgi_job/Makefile.am b/src/plugins/proctrack/sgi_job/Makefile.am
index 3fddd6068a6..5c04974b862 100644
--- a/src/plugins/proctrack/sgi_job/Makefile.am
+++ b/src/plugins/proctrack/sgi_job/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = - -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = proctrack_sgi_job.la
 
diff --git a/src/plugins/sched/backfill/Makefile.am b/src/plugins/sched/backfill/Makefile.am
index 88998e6a6a2..baa9d6f7237 100644
--- a/src/plugins/sched/backfill/Makefile.am
+++ b/src/plugins/sched/backfill/Makefile.am
@@ -6,7 +6,7 @@ AM_CXXFLAGS = -fexceptions
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = sched_backfill.la
 
diff --git a/src/plugins/sched/builtin/Makefile.am b/src/plugins/sched/builtin/Makefile.am
index faf4f0a6825..1f22326c81a 100644
--- a/src/plugins/sched/builtin/Makefile.am
+++ b/src/plugins/sched/builtin/Makefile.am
@@ -6,7 +6,7 @@ AM_CXXFLAGS = -fexceptions
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = sched_builtin.la
 
diff --git a/src/plugins/sched/hold/Makefile.am b/src/plugins/sched/hold/Makefile.am
index d03a995481d..fcdb0e23f3a 100644
--- a/src/plugins/sched/hold/Makefile.am
+++ b/src/plugins/sched/hold/Makefile.am
@@ -6,7 +6,7 @@ AM_CXXFLAGS = -fexceptions
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = sched_hold.la
 
diff --git a/src/plugins/sched/wiki/Makefile.am b/src/plugins/sched/wiki/Makefile.am
index 3864a3b790e..87653145e19 100644
--- a/src/plugins/sched/wiki/Makefile.am
+++ b/src/plugins/sched/wiki/Makefile.am
@@ -6,7 +6,7 @@ AM_CXXFLAGS = -fexceptions
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = sched_wiki.la
 
diff --git a/src/plugins/sched/wiki2/Makefile.am b/src/plugins/sched/wiki2/Makefile.am
index c5c708c9d54..86c81b5fafe 100644
--- a/src/plugins/sched/wiki2/Makefile.am
+++ b/src/plugins/sched/wiki2/Makefile.am
@@ -6,7 +6,7 @@ AM_CXXFLAGS = -fexceptions
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = sched_wiki2.la
 
diff --git a/src/plugins/select/bluegene/Makefile.am b/src/plugins/select/bluegene/Makefile.am
index 0a88eeb5b0c..42ca88b6c57 100644
--- a/src/plugins/select/bluegene/Makefile.am
+++ b/src/plugins/select/bluegene/Makefile.am
@@ -5,7 +5,7 @@ CLEANFILES = core.*
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic -lm
 
-INCLUDES = -I$(top_srcdir)  -I$(top_srcdir)/src/common $(BG_INCLUDES)
+AM_CPPFLAGS = -I$(top_srcdir)  -I$(top_srcdir)/src/common $(BG_INCLUDES)
 
 pkglib_LTLIBRARIES = select_bluegene.la
 
diff --git a/src/plugins/select/bluegene/ba/Makefile.am b/src/plugins/select/bluegene/ba/Makefile.am
index eefc6446eae..bf42e1e051b 100644
--- a/src/plugins/select/bluegene/ba/Makefile.am
+++ b/src/plugins/select/bluegene/ba/Makefile.am
@@ -3,7 +3,7 @@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
 
-INCLUDES = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 
 # making a .la
 
diff --git a/src/plugins/select/bluegene/ba_bgq/Makefile.am b/src/plugins/select/bluegene/ba_bgq/Makefile.am
index 8de43dce09f..43473ec235d 100644
--- a/src/plugins/select/bluegene/ba_bgq/Makefile.am
+++ b/src/plugins/select/bluegene/ba_bgq/Makefile.am
@@ -3,7 +3,7 @@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
 
-INCLUDES = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 
 # making a .la
 
diff --git a/src/plugins/select/bluegene/bl/Makefile.am b/src/plugins/select/bluegene/bl/Makefile.am
index 5ad4bccdaf9..b65c8b4616b 100644
--- a/src/plugins/select/bluegene/bl/Makefile.am
+++ b/src/plugins/select/bluegene/bl/Makefile.am
@@ -3,7 +3,7 @@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
 
-INCLUDES = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 
 # making a .la
 
diff --git a/src/plugins/select/bluegene/bl_bgq/Makefile.am b/src/plugins/select/bluegene/bl_bgq/Makefile.am
index 041336610a2..346bd147c86 100644
--- a/src/plugins/select/bluegene/bl_bgq/Makefile.am
+++ b/src/plugins/select/bluegene/bl_bgq/Makefile.am
@@ -3,7 +3,7 @@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
 
-INCLUDES = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 
 # making a .la
 
diff --git a/src/plugins/select/bluegene/sfree/Makefile.am b/src/plugins/select/bluegene/sfree/Makefile.am
index 6eaa11187c5..5bb2dc4572c 100644
--- a/src/plugins/select/bluegene/sfree/Makefile.am
+++ b/src/plugins/select/bluegene/sfree/Makefile.am
@@ -3,7 +3,7 @@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
 
-INCLUDES = -I$(top_srcdir)  -I$(top_srcdir)/src/common $(BG_INCLUDES)
+AM_CPPFLAGS = -I$(top_srcdir)  -I$(top_srcdir)/src/common $(BG_INCLUDES)
 
 sbin_PROGRAMS = sfree
 
diff --git a/src/plugins/select/cons_res/Makefile.am b/src/plugins/select/cons_res/Makefile.am
index 9f708cae68d..06a86eb545d 100644
--- a/src/plugins/select/cons_res/Makefile.am
+++ b/src/plugins/select/cons_res/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = select_cons_res.la
 
diff --git a/src/plugins/select/cray/Makefile.am b/src/plugins/select/cray/Makefile.am
index 1cc1205a8c0..db5a9d8cdd8 100644
--- a/src/plugins/select/cray/Makefile.am
+++ b/src/plugins/select/cray/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common -I.
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common -I.
 
 pkglib_LTLIBRARIES = select_cray.la
 
diff --git a/src/plugins/select/cray/libalps/Makefile.am b/src/plugins/select/cray/libalps/Makefile.am
index b6323989520..69d40f1f2c2 100644
--- a/src/plugins/select/cray/libalps/Makefile.am
+++ b/src/plugins/select/cray/libalps/Makefile.am
@@ -2,7 +2,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common -I. -I../
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common -I. -I../
 
 noinst_LTLIBRARIES = libalps.la
 
diff --git a/src/plugins/select/cray/libemulate/Makefile.am b/src/plugins/select/cray/libemulate/Makefile.am
index 3e769a6aa10..ddcd3cfd333 100644
--- a/src/plugins/select/cray/libemulate/Makefile.am
+++ b/src/plugins/select/cray/libemulate/Makefile.am
@@ -2,7 +2,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common -I. -I../
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common -I. -I../
 
 noinst_LTLIBRARIES = libalps.la
 
diff --git a/src/plugins/select/linear/Makefile.am b/src/plugins/select/linear/Makefile.am
index e5178e38701..644b0b1eefc 100644
--- a/src/plugins/select/linear/Makefile.am
+++ b/src/plugins/select/linear/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = select_linear.la
 
diff --git a/src/plugins/select/serial/Makefile.am b/src/plugins/select/serial/Makefile.am
index 5ebea9d033c..c43d6d3b105 100644
--- a/src/plugins/select/serial/Makefile.am
+++ b/src/plugins/select/serial/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = select_serial.la
 
diff --git a/src/plugins/switch/none/Makefile.am b/src/plugins/switch/none/Makefile.am
index b9423c7693f..9dc0e293f8d 100644
--- a/src/plugins/switch/none/Makefile.am
+++ b/src/plugins/switch/none/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = switch_none.la
 
diff --git a/src/plugins/switch/nrt/Makefile.am b/src/plugins/switch/nrt/Makefile.am
index 07622fd9e44..af9b810c8a6 100644
--- a/src/plugins/switch/nrt/Makefile.am
+++ b/src/plugins/switch/nrt/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common $(NRT_CPPFLAGS)
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(NRT_CPPFLAGS)
 
 
 SWITCH_NRT_LA_SOURCES =		\
diff --git a/src/plugins/switch/nrt/libpermapi/Makefile.am b/src/plugins/switch/nrt/libpermapi/Makefile.am
index 94ff6bf450c..353289d26b1 100644
--- a/src/plugins/switch/nrt/libpermapi/Makefile.am
+++ b/src/plugins/switch/nrt/libpermapi/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common \
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common \
 	   -I$(top_srcdir)/src/srun/libsrun $(NRT_CPPFLAGS)
 
 # making a .la
diff --git a/src/plugins/task/affinity/Makefile.am b/src/plugins/task/affinity/Makefile.am
index bc2ab1b937b..1a60237a56d 100644
--- a/src/plugins/task/affinity/Makefile.am
+++ b/src/plugins/task/affinity/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 if HAVE_SCHED_SETAFFINITY
 pkglib_LTLIBRARIES = task_affinity.la
diff --git a/src/plugins/task/cgroup/Makefile.am b/src/plugins/task/cgroup/Makefile.am
index 1813b9a4f3e..b9937815c9f 100644
--- a/src/plugins/task/cgroup/Makefile.am
+++ b/src/plugins/task/cgroup/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = task_cgroup.la
 
diff --git a/src/plugins/task/none/Makefile.am b/src/plugins/task/none/Makefile.am
index 1c43397fd85..5163bf6557b 100644
--- a/src/plugins/task/none/Makefile.am
+++ b/src/plugins/task/none/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = task_none.la
 
diff --git a/src/plugins/topology/3d_torus/Makefile.am b/src/plugins/topology/3d_torus/Makefile.am
index 7c200a27b3f..c820d405540 100644
--- a/src/plugins/topology/3d_torus/Makefile.am
+++ b/src/plugins/topology/3d_torus/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = topology_3d_torus.la
 
diff --git a/src/plugins/topology/node_rank/Makefile.am b/src/plugins/topology/node_rank/Makefile.am
index 022e66f4991..08f9b5829e9 100644
--- a/src/plugins/topology/node_rank/Makefile.am
+++ b/src/plugins/topology/node_rank/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = topology_node_rank.la
 
diff --git a/src/plugins/topology/none/Makefile.am b/src/plugins/topology/none/Makefile.am
index 7934a690aad..fdd40acd8f8 100644
--- a/src/plugins/topology/none/Makefile.am
+++ b/src/plugins/topology/none/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = topology_none.la
 
diff --git a/src/plugins/topology/tree/Makefile.am b/src/plugins/topology/tree/Makefile.am
index a08f7ded871..19d7ec31736 100644
--- a/src/plugins/topology/tree/Makefile.am
+++ b/src/plugins/topology/tree/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = topology_tree.la
 
diff --git a/src/sacct/Makefile.am b/src/sacct/Makefile.am
index 7acfcb86704..d22d76ce36f 100644
--- a/src/sacct/Makefile.am
+++ b/src/sacct/Makefile.am
@@ -3,7 +3,7 @@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
 
-INCLUDES = -I$(top_srcdir)
+AM_CPPFLAGS = -I$(top_srcdir)
 
 bin_PROGRAMS = sacct
 
diff --git a/src/sacctmgr/Makefile.am b/src/sacctmgr/Makefile.am
index 9a887d4e6fe..ca694b67454 100644
--- a/src/sacctmgr/Makefile.am
+++ b/src/sacctmgr/Makefile.am
@@ -3,7 +3,7 @@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
 
-INCLUDES = -I$(top_srcdir)
+AM_CPPFLAGS = -I$(top_srcdir)
 
 bin_PROGRAMS = sacctmgr
 
diff --git a/src/salloc/Makefile.am b/src/salloc/Makefile.am
index 885818538a1..3f795540da8 100644
--- a/src/salloc/Makefile.am
+++ b/src/salloc/Makefile.am
@@ -3,7 +3,7 @@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
 
-INCLUDES = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 
 bin_PROGRAMS = salloc
 
diff --git a/src/sattach/Makefile.am b/src/sattach/Makefile.am
index 4ca5a0b3f3c..59edc23dd09 100644
--- a/src/sattach/Makefile.am
+++ b/src/sattach/Makefile.am
@@ -2,7 +2,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-INCLUDES = -I$(top_srcdir)
+AM_CPPFLAGS = -I$(top_srcdir)
 
 bin_PROGRAMS = sattach
 
diff --git a/src/sbatch/Makefile.am b/src/sbatch/Makefile.am
index 929c22bb3c3..02bc1109e72 100644
--- a/src/sbatch/Makefile.am
+++ b/src/sbatch/Makefile.am
@@ -3,7 +3,7 @@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
 
-INCLUDES = -I$(top_srcdir)
+AM_CPPFLAGS = -I$(top_srcdir)
 
 bin_PROGRAMS = sbatch
 
diff --git a/src/sbcast/Makefile.am b/src/sbcast/Makefile.am
index 166f66f80e6..f52394f4891 100644
--- a/src/sbcast/Makefile.am
+++ b/src/sbcast/Makefile.am
@@ -3,7 +3,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-INCLUDES = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 bin_PROGRAMS = sbcast
 
 sbcast_LDADD = 	$(top_builddir)/src/api/libslurm.o $(DL_LIBS) -lm
diff --git a/src/scancel/Makefile.am b/src/scancel/Makefile.am
index 7bd9beef046..e4d6514a893 100644
--- a/src/scancel/Makefile.am
+++ b/src/scancel/Makefile.am
@@ -2,7 +2,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-INCLUDES = -I$(top_srcdir)
+AM_CPPFLAGS = -I$(top_srcdir)
 
 bin_PROGRAMS = scancel
 
diff --git a/src/scontrol/Makefile.am b/src/scontrol/Makefile.am
index 316506270ab..22e0132a6b1 100644
--- a/src/scontrol/Makefile.am
+++ b/src/scontrol/Makefile.am
@@ -2,7 +2,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-INCLUDES = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 
 bin_PROGRAMS = scontrol
 
diff --git a/src/sdiag/Makefile.am b/src/sdiag/Makefile.am
index 4b1a92c7962..f9c9726dd45 100644
--- a/src/sdiag/Makefile.am
+++ b/src/sdiag/Makefile.am
@@ -3,7 +3,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-INCLUDES = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 bin_PROGRAMS = sdiag
 
 sdiag_LDADD = $(top_builddir)/src/api/libslurm.o $(DL_LIBS)
diff --git a/src/sinfo/Makefile.am b/src/sinfo/Makefile.am
index aef1c160efb..63ea14ea25e 100644
--- a/src/sinfo/Makefile.am
+++ b/src/sinfo/Makefile.am
@@ -3,7 +3,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-INCLUDES = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 bin_PROGRAMS = sinfo
 
 sinfo_LDADD = $(top_builddir)/src/api/libslurm.o $(DL_LIBS)
diff --git a/src/slurmctld/Makefile.am b/src/slurmctld/Makefile.am
index 7d759dc6579..addd296c5f1 100644
--- a/src/slurmctld/Makefile.am
+++ b/src/slurmctld/Makefile.am
@@ -4,7 +4,7 @@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
 
-INCLUDES = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 
 # noinst_LTLIBRARIES = libslurmctld.la
 # libslurmctld_la_LDFLAGS  = $(LIB_LDFLAGS) -module --export-dynamic
diff --git a/src/slurmd/common/Makefile.am b/src/slurmd/common/Makefile.am
index dda570360c7..f94e694b7dc 100644
--- a/src/slurmd/common/Makefile.am
+++ b/src/slurmd/common/Makefile.am
@@ -3,7 +3,7 @@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
 
-INCLUDES = -I$(top_srcdir)
+AM_CPPFLAGS = -I$(top_srcdir)
 
 # making a .la
 
diff --git a/src/slurmd/slurmd/Makefile.am b/src/slurmd/slurmd/Makefile.am
index 55d629a126b..c7c5f332474 100644
--- a/src/slurmd/slurmd/Makefile.am
+++ b/src/slurmd/slurmd/Makefile.am
@@ -5,8 +5,8 @@ AUTOMAKE_OPTIONS = foreign
 
 sbin_PROGRAMS = slurmd
 
-AM_CPPFLAGS = -DLIBSLURM_SO=\"$(libdir)/libslurm.so\"
-INCLUDES = -I$(top_srcdir) $(HWLOC_CPPFLAGS)
+AM_CPPFLAGS = -DLIBSLURM_SO=\"$(libdir)/libslurm.so\" \
+	-I$(top_srcdir) $(HWLOC_CPPFLAGS)
 
 slurmd_LDADD = 					   \
 	$(top_builddir)/src/common/libdaemonize.la \
diff --git a/src/slurmd/slurmstepd/Makefile.am b/src/slurmd/slurmstepd/Makefile.am
index c6bb1d3a4bd..fa662cbb53b 100644
--- a/src/slurmd/slurmstepd/Makefile.am
+++ b/src/slurmd/slurmstepd/Makefile.am
@@ -5,7 +5,7 @@ AUTOMAKE_OPTIONS = foreign
 
 sbin_PROGRAMS = slurmstepd
 
-INCLUDES = -I$(top_srcdir)
+AM_CPPFLAGS = -I$(top_srcdir)
 
 slurmstepd_LDADD = 				   \
 	$(top_builddir)/src/common/libdaemonize.la \
diff --git a/src/slurmdbd/Makefile.am b/src/slurmdbd/Makefile.am
index caac3a1e10c..bfd3ea7bdba 100644
--- a/src/slurmdbd/Makefile.am
+++ b/src/slurmdbd/Makefile.am
@@ -4,7 +4,7 @@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
 
-INCLUDES = -I$(top_srcdir)
+AM_CPPFLAGS = -I$(top_srcdir)
 
 sbin_PROGRAMS = slurmdbd
 
diff --git a/src/smap/Makefile.am b/src/smap/Makefile.am
index 4b8ff3c6535..b89c64bb934 100644
--- a/src/smap/Makefile.am
+++ b/src/smap/Makefile.am
@@ -7,7 +7,7 @@
 AUTOMAKE_OPTIONS = foreign
 
 LIBS=$(NCURSES)
-INCLUDES = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 
 if BUILD_SMAP
 
diff --git a/src/sprio/Makefile.am b/src/sprio/Makefile.am
index c7d76bd2143..3c55c9df2ee 100644
--- a/src/sprio/Makefile.am
+++ b/src/sprio/Makefile.am
@@ -3,7 +3,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-INCLUDES = -I$(top_srcdir)
+AM_CPPFLAGS = -I$(top_srcdir)
 
 bin_PROGRAMS = sprio
 
diff --git a/src/squeue/Makefile.am b/src/squeue/Makefile.am
index 9ce4fbcf6de..9a0dfba1337 100644
--- a/src/squeue/Makefile.am
+++ b/src/squeue/Makefile.am
@@ -3,7 +3,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-INCLUDES = -I$(top_srcdir)
+AM_CPPFLAGS = -I$(top_srcdir)
 
 bin_PROGRAMS = squeue
 
diff --git a/src/sreport/Makefile.am b/src/sreport/Makefile.am
index d648f745e92..a7de403075d 100644
--- a/src/sreport/Makefile.am
+++ b/src/sreport/Makefile.am
@@ -3,7 +3,7 @@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
 
-INCLUDES = -I$(top_srcdir)
+AM_CPPFLAGS = -I$(top_srcdir)
 
 bin_PROGRAMS = sreport
 
diff --git a/src/srun/Makefile.am b/src/srun/Makefile.am
index 6cf3e306f7b..64ed081936a 100644
--- a/src/srun/Makefile.am
+++ b/src/srun/Makefile.am
@@ -5,7 +5,7 @@ SUBDIRS = libsrun
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/srun/libsrun
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/srun/libsrun
 
 bin_PROGRAMS = srun
 
diff --git a/src/srun/libsrun/Makefile.am b/src/srun/libsrun/Makefile.am
index ca7144c5c0f..4011cf4ebb0 100644
--- a/src/srun/libsrun/Makefile.am
+++ b/src/srun/libsrun/Makefile.am
@@ -3,7 +3,7 @@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/srun/libsrun
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/srun/libsrun
 
 noinst_LTLIBRARIES = libsrun.la
 
diff --git a/src/srun_cr/Makefile.am b/src/srun_cr/Makefile.am
index cd296570db2..f4e5fd71065 100644
--- a/src/srun_cr/Makefile.am
+++ b/src/srun_cr/Makefile.am
@@ -5,7 +5,7 @@ CLEANFILES = core.*
 
 if WITH_BLCR
 
-INCLUDES = -I$(top_srcdir) $(BLCR_CPPFLAGS)
+AM_CPPFLAGS = -I$(top_srcdir) $(BLCR_CPPFLAGS)
 
 bin_PROGRAMS = srun_cr
 
diff --git a/src/sshare/Makefile.am b/src/sshare/Makefile.am
index 59c3d566e76..15ab8489bdd 100644
--- a/src/sshare/Makefile.am
+++ b/src/sshare/Makefile.am
@@ -3,7 +3,7 @@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
 
-INCLUDES = -I$(top_srcdir)
+AM_CPPFLAGS = -I$(top_srcdir)
 
 bin_PROGRAMS = sshare
 
diff --git a/src/sstat/Makefile.am b/src/sstat/Makefile.am
index e84a6aeaef5..9ab534a08f0 100644
--- a/src/sstat/Makefile.am
+++ b/src/sstat/Makefile.am
@@ -2,7 +2,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-INCLUDES = -I$(top_srcdir)
+AM_CPPFLAGS = -I$(top_srcdir)
 
 bin_PROGRAMS = sstat
 
diff --git a/src/strigger/Makefile.am b/src/strigger/Makefile.am
index d8816ac5fc9..7871e0bd459 100644
--- a/src/strigger/Makefile.am
+++ b/src/strigger/Makefile.am
@@ -3,7 +3,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-INCLUDES = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 bin_PROGRAMS = strigger
 
 strigger_LDADD = $(top_builddir)/src/api/libslurm.o $(DL_LIBS)
diff --git a/src/sview/Makefile.am b/src/sview/Makefile.am
index 4a6b611d1ca..3b36046da60 100644
--- a/src/sview/Makefile.am
+++ b/src/sview/Makefile.am
@@ -3,7 +3,7 @@
 # Makefile for sview
 
 AUTOMAKE_OPTIONS = foreign
-INCLUDES = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 
 if BUILD_SVIEW
 
diff --git a/testsuite/slurm_unit/api/Makefile.am b/testsuite/slurm_unit/api/Makefile.am
index 3914183e0c5..a46654bb4b1 100644
--- a/testsuite/slurm_unit/api/Makefile.am
+++ b/testsuite/slurm_unit/api/Makefile.am
@@ -7,7 +7,7 @@ check_PROGRAMS = $(TESTS)
 TESTS = \
 	api-test 
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 LDADD   = $(top_builddir)/src/common/libcommon.la \
 	  $(top_builddir)/src/api/libslurm.la
diff --git a/testsuite/slurm_unit/api/manual/Makefile.am b/testsuite/slurm_unit/api/manual/Makefile.am
index 6933b6cd68a..5b7a878630b 100644
--- a/testsuite/slurm_unit/api/manual/Makefile.am
+++ b/testsuite/slurm_unit/api/manual/Makefile.am
@@ -1,6 +1,6 @@
 AUTOMAKE_OPTIONS = foreign
 
-INCLUDES =        -I$(top_srcdir) 
+AM_CPPFLAGS =        -I$(top_srcdir)
 LDADD    =        $(top_builddir)/src/api/libslurm.la
 check_PROGRAMS = \
 	cancel-tst \
diff --git a/testsuite/slurm_unit/common/Makefile.am b/testsuite/slurm_unit/common/Makefile.am
index 6316190d9a7..875e53b1bbb 100644
--- a/testsuite/slurm_unit/common/Makefile.am
+++ b/testsuite/slurm_unit/common/Makefile.am
@@ -1,6 +1,6 @@
 AUTOMAKE_OPTIONS = foreign
 
-INCLUDES = -I$(top_srcdir) $(HWLOC_CPPFLAGS)
+AM_CPPFLAGS = -I$(top_srcdir) $(HWLOC_CPPFLAGS)
 LDADD = $(top_builddir)/src/api/libslurm.o $(DL_LIBS) $(HWLOC_LIBS)
 
 check_PROGRAMS = \
-- 
GitLab