[Makefile] Use MAKEFILE_LIST before any includes

`Scripts/Makefile.rules` used MAKEFILE_LIST to obtain the current
makefile path, but it did so after including some other file, so it got
the included file path instead.

Signed-off-by: borysp <borysp@invisiblethingslab.com>
This commit is contained in:
borysp
2021-02-09 00:26:42 +01:00
parent 79742f9029
commit bb6206822a

View File

@@ -32,6 +32,10 @@ echo-cmd = $(if $($(quiet)cmd_$(1)), echo ' $(call escsq,$($(quiet)cmd_$(1)))';
cmd = @$(echo-cmd) $(cmd_$(1))
# pal map
PAL_SYMBOL_FILE := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))/../Pal/src/pal-symbols
PAL_SYMBOLS = $(shell sed -e 's|$$|;|g' $(PAL_SYMBOL_FILE))
quiet_cmd_generated_offsets_s = [ $@ ]
cmd_generated_offsets_s = $(CC) $(CFLAGS) -MD -MP -MF $@.d $(defs) -S $< -o $@
@@ -155,10 +159,6 @@ quiet_cmd_manifest = [ $@ ]
cmd_manifest = \
$(if $(2),sed $(3) -e 's:\$$(ENTRYPOINT):$(2):g' $< > $@,cp -f $< $@)
# pal map
PAL_SYMBOL_FILE := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))/../Pal/src/pal-symbols
PAL_SYMBOLS = $(shell sed -e 's|$$|;|g' $(PAL_SYMBOL_FILE))
quiet_cmd_pal_map = [ $@ ]
cmd_pal_map = \
(echo "/* DO NOT MODIFY. THIS FILE WAS AUTO-GENERATED. */"; \