aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/ltp/ltp/0001-open_posix_testsuite-generate-makefiles.sh-Avoid-inc.patch
blob: c2a70dcb679fd0ba2d710272cafbac4aedd66a84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
From 2d1d6350af1db28ec520e26d0069a0518950b0a1 Mon Sep 17 00:00:00 2001
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Tue, 9 Mar 2021 15:21:11 +0000
Subject: [PATCH 1/3] open_posix_testsuite/generate-makefiles.sh: Avoid
 inconsistencies with make version

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>
Upstream-Status: Submitted [http://lists.linux.it/pipermail/ltp/2021-March/021386.html]

---
 .../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