[LTP] [PATCH 1/3] open_posix_testsuite/generate-makefiles.sh: Avoid inconsistencies with make version

Richard Purdie richard.purdie@linuxfoundation.org
Tue Mar 9 16:56:21 CET 2021


With make 4.1, INSTALL_TARGETS+=<tab> will add a space to the variable whereas
with make 4.3, it will not. This leads to differing run.sh files in installed
in packages which is undesireable. If tests is empty we don't have to add
the line to the makefiles at all which seems like the easiest way to
avoid the differences in make behaviour.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 .../open_posix_testsuite/scripts/generate-makefiles.sh      | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/testcases/open_posix_testsuite/scripts/generate-makefiles.sh b/testcases/open_posix_testsuite/scripts/generate-makefiles.sh
index 200a631db..4b3aaa4a0 100755
--- a/testcases/open_posix_testsuite/scripts/generate-makefiles.sh
+++ b/testcases/open_posix_testsuite/scripts/generate-makefiles.sh
@@ -148,8 +148,12 @@ EOF
 
 	fi
 
-	cat >> "$makefile.2" <<EOF
+	if [ ! -z "${tests}" ]; then
+		cat >> "$makefile.2" <<EOF
 INSTALL_TARGETS+=	${tests}
+EOF
+	fi
+	cat >> "$makefile.2" <<EOF
 MAKE_TARGETS+=		${targets}
 
 EOF
-- 
2.27.0



More information about the ltp mailing list