[API-NEXT,v1,8/19] configure: stop setting AM_* variables

Message ID 1505156408-13887-9-git-send-email-odpbot@yandex.ru
State New
Headers show
Series
  • Untitled series #3957
Related show

Commit Message

Github ODP bot Sept. 11, 2017, 6:59 p.m.
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


AM_* variables by design should be set by Makefile.am, not by
configure.ac. Use CFLAGS/CXXFLAGS instead.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

---
/** Email created from pull request 173 (muvarov:api-next)
 ** https://github.com/Linaro/odp/pull/173
 ** Patch: https://github.com/Linaro/odp/pull/173.patch
 ** Base sha: 7fa8e2c97ed18f8dd6e95cbc78b7e668ccb98869
 ** Merge commit sha: 057be0905a62a157cc96a91743ea70e66e8554ca
 **/
 configure.ac                       | 12 +++---------
 example/Makefile.inc               |  4 ++--
 helper/Makefile.am                 |  4 ++--
 helper/test/Makefile.am            |  4 ++--
 platform/Makefile.inc              |  4 ++--
 platform/linux-generic/Makefile.am |  2 +-
 test/Makefile.inc                  |  4 ++--
 test/linux-generic/Makefile.inc    |  4 ++--
 8 files changed, 16 insertions(+), 22 deletions(-)

Patch

diff --git a/configure.ac b/configure.ac
index f6f69942..d4c07a2c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -329,6 +329,7 @@  ODP_CHECK_CFLAG([-Wformat-truncation=0])
 ODP_CHECK_CFLAG([-Wformat-overflow=0])
 
 ODP_CFLAGS="$ODP_CFLAGS -std=c99"
+ODP_CXXFLAGS="$ODP_CXXFLAGS -std=c++11"
 
 # Extra flags for example to suppress certain warning types
 ODP_CFLAGS="$ODP_CFLAGS $ODP_CFLAGS_EXTRA"
@@ -347,8 +348,8 @@  esac
 ##########################################################################
 # Default include setup
 ##########################################################################
-AM_CFLAGS="$AM_CFLAGS $ODP_CFLAGS"
-AM_CXXFLAGS="-std=c++11"
+CFLAGS="$CFLAGS $ODP_CFLAGS"
+CXXFLAGS="$CXXFLAGS $ODP_CXXFLAGS"
 
 AC_CONFIG_FILES([Makefile
 		 pkgconfig/libodp-linux.pc
@@ -359,11 +360,8 @@  AC_CONFIG_FILES([Makefile
 # distribute the changed variables among the Makefiles
 
 AC_SUBST([LIBS])
-AC_SUBST([AM_CPPFLAGS])
 AC_SUBST([CPPFLAGS])
-AC_SUBST([AM_CFLAGS])
 AC_SUBST([CFLAGS])
-AC_SUBST([AM_LDFLAGS])
 AC_SUBST([LDFLAGS])
 AC_SUBST([EXEEXT])
 
@@ -390,12 +388,8 @@  AC_MSG_RESULT([
 	cc:			${CC}
 	cc version:             ${CC_VERSION}
 	cppflags:		${CPPFLAGS}
-	am_cppflags:		${AM_CPPFLAGS}
-	am_cxxflags:		${AM_CXXFLAGS}
 	cflags:			${CFLAGS}
-	am_cflags:		${AM_CFLAGS}
 	ldflags:		${LDFLAGS}
-	am_ldflags:		${AM_LDFLAGS}
 	libs:			${LIBS}
 	defs:			${DEFS}
 	static libraries:	${enable_static}
diff --git a/example/Makefile.inc b/example/Makefile.inc
index 7cc21154..cba385b7 100644
--- a/example/Makefile.inc
+++ b/example/Makefile.inc
@@ -1,6 +1,6 @@ 
 LIB   = $(top_builddir)/lib
 LDADD = $(LIB)/libodp-linux.la $(LIB)/libodphelper.la $(DPDK_PMDS)
-AM_CFLAGS += \
+AM_CFLAGS = \
 	-I$(srcdir) \
 	-I$(top_srcdir)/example \
 	-I$(top_srcdir)/platform/@with_platform@/include \
@@ -11,4 +11,4 @@  AM_CFLAGS += \
 	-I$(top_srcdir)/platform/@with_platform@/arch/@ARCH_DIR@ \
 	-I$(top_builddir)/include
 
-AM_LDFLAGS += -L$(LIB)
+AM_LDFLAGS = -L$(LIB)
diff --git a/helper/Makefile.am b/helper/Makefile.am
index fa503f1a..bf75b467 100644
--- a/helper/Makefile.am
+++ b/helper/Makefile.am
@@ -2,7 +2,7 @@  pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = $(top_builddir)/pkgconfig/libodphelper.pc
 
 LIB   = $(top_builddir)/lib
-AM_CPPFLAGS += -I$(srcdir)/include
+AM_CPPFLAGS = -I$(srcdir)/include
 AM_CPPFLAGS += -I$(top_srcdir)/platform/@with_platform@/include
 AM_CPPFLAGS += -I$(top_srcdir)/include
 AM_CPPFLAGS += -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@
@@ -10,7 +10,7 @@  AM_CPPFLAGS += -I$(top_builddir)/platform/@with_platform@/include
 AM_CPPFLAGS += -I$(top_srcdir)/platform/@with_platform@/arch/@ARCH_DIR@
 AM_CPPFLAGS += -I$(top_builddir)/include
 
-AM_LDFLAGS += -version-number '$(ODPHELPER_LIBSO_VERSION)'
+AM_LDFLAGS = -version-number '$(ODPHELPER_LIBSO_VERSION)'
 
 helperincludedir = $(includedir)/odp/helper/
 helperinclude_HEADERS = \
diff --git a/helper/test/Makefile.am b/helper/test/Makefile.am
index fdc15f96..e30a1e71 100644
--- a/helper/test/Makefile.am
+++ b/helper/test/Makefile.am
@@ -17,8 +17,8 @@  INCFLAGS = \
 
 ODP_PLATFORM=${with_platform}
 
-AM_CPPFLAGS += $(INCFLAGS)
-AM_LDFLAGS += -static
+AM_CPPFLAGS = $(INCFLAGS)
+AM_LDFLAGS = -static
 
 EXECUTABLES = chksum$(EXEEXT) \
               cuckootable$(EXEEXT) \
diff --git a/platform/Makefile.inc b/platform/Makefile.inc
index a88e8384..f6722560 100644
--- a/platform/Makefile.inc
+++ b/platform/Makefile.inc
@@ -8,9 +8,9 @@  pkgconfig_DATA = $(top_builddir)/pkgconfig/libodp-linux.pc
 VPATH = $(srcdir) $(builddir)
 lib_LTLIBRARIES = $(LIB)/libodp-linux.la
 
-AM_LDFLAGS += -version-number '$(ODP_LIBSO_VERSION)'
+AM_LDFLAGS = -version-number '$(ODP_LIBSO_VERSION)'
 
-AM_CFLAGS += "-DGIT_HASH=$(VERSION)"
+AM_CFLAGS = "-DGIT_HASH=$(VERSION)"
 AM_CFLAGS += $(VISIBILITY_CFLAGS)
 
 AM_CFLAGS += @PTHREAD_CFLAGS@
diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am
index e644505e..f5f65384 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -3,7 +3,7 @@ 
 
 include $(top_srcdir)/platform/Makefile.inc
 
-AM_CPPFLAGS +=  -I$(srcdir)/include
+AM_CPPFLAGS =  -I$(srcdir)/include
 AM_CPPFLAGS +=  -I$(top_srcdir)/include
 AM_CPPFLAGS +=  -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@
 AM_CPPFLAGS +=  -I$(top_builddir)/include
diff --git a/test/Makefile.inc b/test/Makefile.inc
index f5bb7674..8bd21432 100644
--- a/test/Makefile.inc
+++ b/test/Makefile.inc
@@ -16,9 +16,9 @@  INCFLAGS = \
 	-I$(top_builddir)/include
 
 AM_CPPFLAGS = $(INCFLAGS)
-AM_CFLAGS += $(CUNIT_CFLAGS)
+AM_CFLAGS = $(CUNIT_CFLAGS)
 
-AM_LDFLAGS += -L$(LIB)
+AM_LDFLAGS = -L$(LIB)
 
 @VALGRIND_CHECK_RULES@
 valgrind_tools = memcheck
diff --git a/test/linux-generic/Makefile.inc b/test/linux-generic/Makefile.inc
index ff99fbc9..cfb61441 100644
--- a/test/linux-generic/Makefile.inc
+++ b/test/linux-generic/Makefile.inc
@@ -2,9 +2,9 @@ 
 # build specific ODP applications, (i.e those whose do more than validation
 # test wrapping)
 
-AM_LDFLAGS += -static
+AM_LDFLAGS = -static
 
-AM_CFLAGS += $(CUNIT_CFLAGS)
+AM_CFLAGS = $(CUNIT_CFLAGS)
 
 LIBCUNIT_COMMON = $(top_builddir)/test/common_plat/common/libcunit_common.la
 LIB   = $(top_builddir)/lib