boards: Allow boards to extend clean and distclean by a double colon

target instead of calling a variable.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
This commit is contained in:
Abdelatif Guettouche 2020-11-28 16:31:32 +00:00 committed by Xiang Xiao
parent 88f1cdb915
commit 81968ce562
2 changed files with 7 additions and 7 deletions

View File

@ -125,16 +125,14 @@ depend: .depend
context::
clean:
clean::
$(call DELFILE, libboard$(LIBEXT))
$(call DELFILE, $(ETCSRC))
$(call DELDIR, $(ETCDIR))
$(call CLEAN)
$(EXTRA_CLEAN)
distclean: clean
distclean:: clean
$(call DELFILE, Make.dep)
$(call DELFILE, .depend)
$(EXTRA_DISTCLEAN)
-include Make.dep

View File

@ -79,9 +79,7 @@ endif
SCRIPTIN = $(SCRIPTDIR)$(DELIM)esp32.template.ld
SCRIPTOUT = $(SCRIPTDIR)$(DELIM)esp32_out.ld
EXTRA_DISTCLEAN = $(call DELFILE, $(SCRIPTOUT))
.PHONY = context
.PHONY = context distclean
include $(TOPDIR)/boards/Board.mk
@ -89,3 +87,7 @@ $(SCRIPTOUT): $(SCRIPTIN) $(CONFIGFILE)
$(Q) $(CC) -isystem $(TOPDIR)/include -C -P -x c -E $(SCRIPTIN) -o $@
context:: $(SCRIPTOUT)
distclean::
$(call DELFILE, $(SCRIPTOUT))