blob: fb5190652196d21428b9783c39d4957a53b12c95 [file] [log] [blame]
Andrew Geissler517393d2023-01-13 08:55:19 -06001From dfd38cb29c0768692f886d3ab9158bd2b3132582 Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Tue, 22 Nov 2022 15:20:48 +0800
4Subject: [PATCH] makefile: use conditional assignment for KBUILD_OUTPUT
5
6Refer [1],from make 4.4, all variables that are marked as export will
7also be passed to the shell started by the shell function. use "=" will
8make KBUILD_OUTPUT always empty for shell function, use "?=" to make
9"export KBUILD_OUTPUT" in enrironment can work.
10
11[snip of 4.4 NEWS]
12* WARNING: Backward-incompatibility!
13 Previously makefile variables marked as export were not exported to commands
14 started by the $(shell ...) function. Now, all exported variables are
15 exported to $(shell ...).
16[snip]
17
18[1] https://git.savannah.gnu.org/cgit/make.git/tree/NEWS?h=4.4&id=ed493f6c9116cc217b99c2cfa6a95f15803235a2#n74
19
20Upstream-Status: Submitted [linuxptp-devel@lists.sourceforge.net]
21
22Signed-off-by: Changqing Li <changqing.li@windriver.com>
23---
24 makefile | 2 +-
25 1 file changed, 1 insertion(+), 1 deletion(-)
26
27diff --git a/makefile b/makefile
28index 529d8a0..3db60fa 100644
29--- a/makefile
30+++ b/makefile
31@@ -15,7 +15,7 @@
32 # with this program; if not, write to the Free Software Foundation, Inc.,
33 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
34
35-KBUILD_OUTPUT =
36+KBUILD_OUTPUT ?=
37
38 DEBUG =
39 CC ?= $(CROSS_COMPILE)gcc
40--
412.25.1
42