boards/Board.mk: Make the context target a double colon target and allow

other obards to extend it instead of relaying on a definition of a variable.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
This commit is contained in:
Abdelatif Guettouche 2020-09-14 15:50:40 +01:00 committed by Xiang Xiao
parent 6b7dd62bad
commit 7d1ac72b9b
2 changed files with 2 additions and 5 deletions

View File

@ -123,9 +123,7 @@ endif
depend: .depend depend: .depend
ifneq ($(BOARD_CONTEXT),y) context::
context:
endif
clean: clean:
$(call DELFILE, libboard$(LIBEXT)) $(call DELFILE, libboard$(LIBEXT))

View File

@ -60,7 +60,6 @@ endif
SCRIPTIN = $(SCRIPTDIR)$(DELIM)esp32.template SCRIPTIN = $(SCRIPTDIR)$(DELIM)esp32.template
SCRIPTOUT = $(SCRIPTDIR)$(DELIM)esp32_out.ld SCRIPTOUT = $(SCRIPTDIR)$(DELIM)esp32_out.ld
BOARD_CONTEXT = y
EXTRA_DISTCLEAN = $(call DELFILE, $(SCRIPTOUT)) EXTRA_DISTCLEAN = $(call DELFILE, $(SCRIPTOUT))
.PHONY = context .PHONY = context
@ -70,4 +69,4 @@ include $(TOPDIR)/boards/Board.mk
$(SCRIPTOUT): $(SCRIPTIN) $(CONFIGFILE) $(SCRIPTOUT): $(SCRIPTIN) $(CONFIGFILE)
$(Q) $(CC) -isystem $(TOPDIR)/include -C -P -x c -E $(SCRIPTIN) -o $@ $(Q) $(CC) -isystem $(TOPDIR)/include -C -P -x c -E $(SCRIPTIN) -o $@
context: $(SCRIPTOUT) context:: $(SCRIPTOUT)