0002-makefile-use-conditional-assignment-for-KBUILD_OUTPUT.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. From: Changqing Li <changqing.li@windriver.com>
  2. Date: Wed, 23 Nov 2022 08:23:46 +0800
  3. Subject: [Linuxptp-devel] [PATCH] makefile: use conditional assignment for KBUILD_OUTPUT
  4. Refer [1],from make 4.4, all variables that are marked as export will
  5. also be passed to the shell started by the shell function. use "=" will
  6. make KBUILD_OUTPUT always empty for shell function, use "?=" to make
  7. "export KBUILD_OUTPUT" in enrironment can work.
  8. [snip of 4.4 NEWS]
  9. * WARNING: Backward-incompatibility!
  10. Previously makefile variables marked as export were not exported to commands
  11. started by the $(shell ...) function. Now, all exported variables are
  12. exported to $(shell ...).
  13. [snip]
  14. [1] https://git.savannah.gnu.org/cgit/make.git/tree/NEWS?h=4.4&id=ed493f6c9116cc217b99c2cfa6a95f15803235a2#n74
  15. Signed-off-by: Changqing Li <changqing.li@windriver.com>
  16. [Retrieved from mailing list. The patch was not yet accepted and applied:
  17. https://www.mail-archive.com/linuxptp-devel@lists.sourceforge.net/msg06151.html]
  18. Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
  19. ---
  20. makefile | 2 +-
  21. 1 file changed, 1 insertion(+), 1 deletion(-)
  22. diff --git a/makefile b/makefile
  23. index 9aed383..ba3fb38 100644
  24. --- a/makefile
  25. +++ b/makefile
  26. @@ -15,7 +15,7 @@
  27. # with this program; if not, write to the Free Software Foundation, Inc.,
  28. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  29. -KBUILD_OUTPUT =
  30. +KBUILD_OUTPUT ?=
  31. DEBUG =
  32. CC = $(CROSS_COMPILE)gcc
  33. --
  34. 2.25.1