1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 04:52:59 +01:00

Merge pull request #13846 from benpicco/Makefile-THISDIR

Makefile.include: add $(MAKEFILEDIR) helper and use it
This commit is contained in:
Francisco 2020-04-21 11:00:52 +02:00 committed by GitHub
commit 3d8f71768c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 10 additions and 7 deletions

View File

@ -8,8 +8,11 @@ ifeq (,$(filter $(MATCH_MAKE_VERSION),$(MAKE_VERSION)))
$(MATCH_MAKE_VERSION) or later.)
endif
# will evaluate to the absolute path of the Makefile it's evaluated in
MAKEFILEDIR = $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
# 'Makefile.include' directory, must be evaluated before other 'include'
_riotbase := $(dir $(lastword $(MAKEFILE_LIST)))
_riotbase := $(MAKEFILEDIR)
# include RIOT_MAKEFILES_GLOBAL_PRE configuration files
# allows setting user specific system wide configuration parsed before the body

View File

@ -1,7 +1,7 @@
ifeq (,$(KINETIS_SERIES))
# Parse parameters from CPU_MODEL using the kinetis-info.mk script in the same
# directory as this Makefile.
include $(dir $(abspath $(lastword $(MAKEFILE_LIST))))/kinetis-info.mk
include $(MAKEFILEDIR)/kinetis-info.mk
endif
# "The Vector table must be naturally aligned to a power of two whose alignment

View File

@ -1,3 +1,3 @@
# Use an immediate variable to evaluate `MAKEFILE_LIST` now
USEMODULE_INCLUDES_module_exclude := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
# Use an immediate variable to evaluate `MAKEFILEDIR` now
USEMODULE_INCLUDES_module_exclude := $(MAKEFILEDIR)
USEMODULE_INCLUDES += $(USEMODULE_INCLUDES_module_exclude)

View File

@ -1,3 +1,3 @@
# Use an immediate variable to evaluate `MAKEFILE_LIST` now
USEMODULE_INCLUDES_module := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
USEMODULE_INCLUDES_module := $(MAKEFILEDIR)
USEMODULE_INCLUDES += $(USEMODULE_INCLUDES_module)

View File

@ -1,3 +1,3 @@
# Use an immediate variable to evaluate `MAKEFILE_LIST` now
USEMODULE_INCLUDES_external_module := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))/include
USEMODULE_INCLUDES_external_module := $(MAKEFILEDIR)/include
USEMODULE_INCLUDES += $(USEMODULE_INCLUDES_external_module)

View File

@ -1,5 +1,5 @@
# Use an immediate variable to evaluate `MAKEFILE_LIST` now
USEMODULE_INCLUDES_models := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
USEMODULE_INCLUDES_models := $(MAKEFILEDIR)
USEMODULE_INCLUDES += $(USEMODULE_INCLUDES_models)
CXXEXFLAGS += -Wno-unused-parameter