From 401687c04bb3dc629a6e0e9ffb4d92c19acc872d Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 31 May 2018 14:48:00 -0600 Subject: [PATCH] apps/Makefile and platform/Makefile: At clean_context targets that are now invoked from the main nuttx/Makefile. --- Makefile | 7 +++++-- platform/Makefile | 8 +++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 79782b817..3adfa7ca4 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ # apps/Makefile # # Copyright (C) 2011 Uros Platise. All rights reserved. -# Copyright (C) 2011-2014 Gregory Nutt. All rights reserved. +# Copyright (C) 2011-2014, 2018 Gregory Nutt. All rights reserved. # Authors: Uros Platise # Gregory Nutt # @@ -76,7 +76,7 @@ BIN = libapps$(LIBEXT) # Build targets all: $(BIN) -.PHONY: import install dirlinks context context_serialize context_rest .depdirs preconfig depend clean distclean +.PHONY: import install dirlinks context context_serialize clean_context context_rest .depdirs preconfig depend clean distclean .PRECIOUS: libapps$(LIBEXT) define MAKE_template @@ -135,6 +135,9 @@ preconfig: Kconfig depend: .depend +clean_context: + $(Q) $(MAKE) -C platform clean_context TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" + clean: $(foreach SDIR, $(CLEANDIRS), $(SDIR)_clean) $(call DELFILE, $(BIN)) $(call DELFILE, Kconfig) diff --git a/platform/Makefile b/platform/Makefile index 23dde311d..6810ae62e 100644 --- a/platform/Makefile +++ b/platform/Makefile @@ -87,7 +87,7 @@ endif # Build targets all: .built -.PHONY: context .depend depend clean distclean preconfig +.PHONY: context .depend depend clean_context clean distclean preconfig .PRECIOUS: ../libapps$(LIBEXT) ifneq ($(ASRCS),) @@ -135,14 +135,16 @@ depend: .depend # Clean targets +clean_context: + $(Q) $(DIRUNLINK) $(PLATFORMDIR) + clean: $(call DELFILE, .built) $(Q) $(MAKE) -C bin TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" clean -distclean: clean +distclean: clean clean_context $(call DELFILE, Make.dep) $(call DELFILE, .depend) - $(Q) $(DIRUNLINK) $(PLATFORMDIR) preconfig: