From 19442df2cd9a5bc8ec4deded7046ea7aca1d50a2 Mon Sep 17 00:00:00 2001 From: Kota Tsuyuzaki Date: Mon, 20 Feb 2017 14:12:43 -0800 Subject: [PATCH] Fix warning on automake tool This patch fixes automake tools warnings as follows (and a my fault in previous patch [1]): - Change INCLUDES variable to APP_CPP_FLAGS and APP_C_FLAGS according to the warning message - Remove non-POSIX variable to suppress that warnings Note that the latter change may be affected to the testing so please be careful on your review what's going on your testing environment. In the past change [2], they ware designed to use the shared object binaries in the build path. However, Daniel had pointed out the good thing at [1] if we runs the test/liberasruecode_test (it's shell with linker) in the dir, we can touch the expected binaries. My fault in the previous patch is that I didn't replace ./test/.libs/liberasurecode_test to ./test/liberasurecode_test even we use --trace-children=yes option for the valgrind. Now, all tests run via ./test/ syntax and IMO no matters exist even if we remove the non-POSIX variable for test settings. 1: https://review.openstack.org/#/c/434162 2: 93446db9414f311bd9fc7dc047eb4dbbeb3e6feb Change-Id: I0e79bed7755a1f286b746a70fcf56fdc972bfd5d --- Makefile.am | 14 ++------------ src/Makefile.am | 15 +++++++++------ 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/Makefile.am b/Makefile.am index f52e046..ce1b676 100644 --- a/Makefile.am +++ b/Makefile.am @@ -46,11 +46,6 @@ install-exec-hook: $(LN_S) liberasurecode/config_liberasurecode.h) test: check - $(eval SONAMES := $(shell find $(abs_top_builddir) -name '*.so')) - $(eval SODIRS := $(dir $(SONAMES))) - $(eval LD_LIBRARY_PATH := LD_LIBRARY_PATH="$(LD_LIBRARY_PATH):$(subst / ,/:,$(SODIRS))") - $(eval DYLD_LIBRARY_PATH := DYLD_LIBRARY_PATH="$(DYLD_LIBRARY_PATH):$(subst / ,/:,$(SODIRS))") - $(eval DYLD_FALLBACK_LIBRARY_PATH := DYLD_FALLBACK_LIBRARY_PATH=$(DYLD_FALLBACK_LIBRARY_PATH):"$(subst / ,/:,$(SODIRS))") @$(LD_LIBRARY_PATH) $(DYLD_LIBRARY_PATH) $(DYLD_FALLBACK_LIBRARY_PATH) \ ./test/liberasurecode_test @$(LD_LIBRARY_PATH) $(DYLD_LIBRARY_PATH) $(DYLD_FALLBACK_LIBRARY_PATH) \ @@ -65,19 +60,14 @@ VALGRIND_EXEC_COMMAND = $(LIBTOOL_COMMAND) valgrind --tool=memcheck \ --malloc-fill=A5 --free-fill=DE --fullpath-after=. --trace-children=yes valgrind-test: check - $(eval SONAMES := $(shell find $(abs_top_builddir) -name '*.so')) - $(eval SODIRS := $(dir $(SONAMES))) - $(eval LD_LIBRARY_PATH := LD_LIBRARY_PATH="$(LD_LIBRARY_PATH):$(subst / ,/:,$(SODIRS))") - $(eval DYLD_LIBRARY_PATH := DYLD_LIBRARY_PATH="$(DYLD_LIBRARY_PATH):$(subst / ,/:,$(SODIRS))") - $(eval DYLD_FALLBACK_LIBRARY_PATH := DYLD_FALLBACK_LIBRARY_PATH=$(DYLD_FALLBACK_LIBRARY_PATH):"$(subst / ,/:,$(SODIRS))") @$(LD_LIBRARY_PATH) $(DYLD_LIBRARY_PATH) $(DYLD_FALLBACK_LIBRARY_PATH) $(VALGRIND_EXEC_COMMAND) \ ./test/alg_sig_test @$(LD_LIBRARY_PATH) $(DYLD_LIBRARY_PATH) $(DYLD_FALLBACK_LIBRARY_PATH) $(VALGRIND_EXEC_COMMAND) \ - ./test/.libs/liberasurecode_test + ./test/liberasurecode_test @$(LD_LIBRARY_PATH) $(DYLD_LIBRARY_PATH) $(DYLD_FALLBACK_LIBRARY_PATH) $(VALGRIND_EXEC_COMMAND) \ ./test/test_xor_hd_code @$(LD_LIBRARY_PATH) $(DYLD_LIBRARY_PATH) $(DYLD_FALLBACK_LIBRARY_PATH) $(VALGRIND_EXEC_COMMAND) \ - ./test/.libs/libec_slap + ./test/libec_slap CLEANFILES = cscope.in.out cscope.out cscope.po.out diff --git a/src/Makefile.am b/src/Makefile.am index eb2f89f..b043de8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2,12 +2,15 @@ SUBDIRS = builtin/xor_codes builtin/null_code builtin/rs_vand lib_LTLIBRARIES = liberasurecode.la -INCLUDES = \ - -I$(top_srcdir)/include/erasurecode \ - -I$(top_srcdir)/include/xor_codes \ - -I$(top_srcdir)/include/rs_vand \ - -I$(top_srcdir)/include/isa_l \ - -I$(top_srcdir)/include/shss +INCLUDE = \ + -I$(abs_top_srcdir)/include/erasurecode \ + -I$(abs_top_srcdir)/include/xor_codes \ + -I$(abs_top_srcdir)/include/rs_vand \ + -I$(abs_top_srcdir)/include/isa_l \ + -I$(abs_top_srcdir)/include/shss + +AM_CPPFLAGS = $(CPPFLAGS) $(INCLUDE) +AM_CFLAGS = $(AM_CPPFLAGS) # liberasurecode params liberasurecode_la_SOURCES = \