aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-connectivity/linuxptp/linuxptp/0001-makefile-use-conditional-assignment-for-KBUILD_OUTPU.patch
blob: 83bdae858f246d4db3370c89cc2fc540cdf65b4a (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
41
42
From dfd38cb29c0768692f886d3ab9158bd2b3132582 Mon Sep 17 00:00:00 2001
From: Changqing Li <changqing.li@windriver.com>
Date: Tue, 22 Nov 2022 15:20:48 +0800
Subject: [PATCH] makefile: use conditional assignment for KBUILD_OUTPUT

Refer [1],from make 4.4, all variables that are marked as export will
also be passed to the shell started by the shell function. use "=" will
make KBUILD_OUTPUT always empty for shell function, use "?=" to make
"export KBUILD_OUTPUT" in enrironment can work.

[snip of 4.4 NEWS]
* WARNING: Backward-incompatibility!
   Previously makefile variables marked as export were not exported to commands
   started by the $(shell ...) function.  Now, all exported variables are
   exported to $(shell ...).
[snip]

[1] https://git.savannah.gnu.org/cgit/make.git/tree/NEWS?h=4.4&id=ed493f6c9116cc217b99c2cfa6a95f15803235a2#n74

Upstream-Status: Backport [d3dd51ba611802d7cbb28631cb943cb882fa4aac]

Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/makefile b/makefile
index 529d8a0..3db60fa 100644
--- a/makefile
+++ b/makefile
@@ -15,7 +15,7 @@
 # with this program; if not, write to the Free Software Foundation, Inc.,
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-KBUILD_OUTPUT =
+KBUILD_OUTPUT ?=
 
 DEBUG	=
 CC	?= $(CROSS_COMPILE)gcc
-- 
2.25.1