mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
nvidia-oot: fix the logic of path of makefile
The current makefile path is identified by the lastword of MAKEFILE_LIST. This works fine till none of the makefile is included before using the MAKEFILE_LIST, else the value of the MAKEFILE_LIST get changed with new included makefile path as last word. Fix this by getting the path of current makefile at beginning before including any new makefile path. JIRA TMM-5842 Change-Id: I9d59e0b2f589dfa036d1f43850a05bc71f84aa48 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3262527 GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com> Tested-by: Ketan Patil <ketanp@nvidia.com> Reviewed-by: Ketan Patil <ketanp@nvidia.com>
This commit is contained in:
committed by
Jon Hunter
parent
6af855f1d0
commit
9eaa638dfe
8
Makefile
8
Makefile
@@ -1,13 +1,15 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (c) 2022-2024, NVIDIA CORPORATION. All rights reserved.
|
||||
|
||||
this_makefile_path := $(abspath $(shell dirname $(lastword $(MAKEFILE_LIST))))
|
||||
|
||||
ifeq ($(CONFIG_TEGRA_KLEAF_BUILD),y)
|
||||
include $(abspath $(shell dirname $(lastword $(MAKEFILE_LIST))))/Makefile.kleaf
|
||||
include $(this_makefile_path)/Makefile.kleaf
|
||||
endif
|
||||
|
||||
# Include kernel specific config
|
||||
ifneq ($(kernel_name),)
|
||||
kernel_config := $(abspath $(shell dirname $(lastword $(MAKEFILE_LIST))))/configs/Makefile.config.$(kernel_name)
|
||||
kernel_config := $(this_makefile_path)/configs/Makefile.config.$(kernel_name)
|
||||
ifneq ($(wildcard $(kernel_config)),)
|
||||
include $(kernel_config)
|
||||
endif
|
||||
@@ -15,7 +17,7 @@ endif
|
||||
|
||||
# Include system specific config
|
||||
ifneq ($(system_type),)
|
||||
system_config := $(abspath $(shell dirname $(lastword $(MAKEFILE_LIST))))/configs/Makefile.config.$(system_type)
|
||||
system_config := $(this_makefile_path)/configs/Makefile.config.$(system_type)
|
||||
ifneq ($(wildcard $(system_config)),)
|
||||
include $(system_config)
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user