tools/Directories.mk, Makefile.*: Extend the clean_context target so that it will remove the autogenerated files created during the context phase of the initial build.
This commit is contained in:
parent
15f358d6a9
commit
d87295f328
5 changed files with 35 additions and 14 deletions
|
|
@ -138,6 +138,11 @@ mklibgraphics: $(BIN)
|
||||||
|
|
||||||
depend: .depend
|
depend: .depend
|
||||||
|
|
||||||
|
clean_context:
|
||||||
|
$(Q) $(MAKE) -C nxglib -f Makefile.devblit distclean TOPDIR=$(TOPDIR) EXTRADEFINES=$(EXTRADEFINES)
|
||||||
|
$(Q) $(MAKE) -C nxglib -f Makefile.pwfb distclean TOPDIR=$(TOPDIR) EXTRADEFINES=$(EXTRADEFINES)
|
||||||
|
$(Q) $(MAKE) -C nxglib -f Makefile.cursor distclean TOPDIR=$(TOPDIR) EXTRADEFINES=$(EXTRADEFINES)
|
||||||
|
|
||||||
context: gensources
|
context: gensources
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
@ -147,10 +152,7 @@ clean:
|
||||||
$(call DELFILE, $(BIN))
|
$(call DELFILE, $(BIN))
|
||||||
$(call CLEAN)
|
$(call CLEAN)
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean clean_context
|
||||||
$(Q) $(MAKE) -C nxglib -f Makefile.devblit distclean TOPDIR=$(TOPDIR) EXTRADEFINES=$(EXTRADEFINES)
|
|
||||||
$(Q) $(MAKE) -C nxglib -f Makefile.pwfb distclean TOPDIR=$(TOPDIR) EXTRADEFINES=$(EXTRADEFINES)
|
|
||||||
$(Q) $(MAKE) -C nxglib -f Makefile.cursor distclean TOPDIR=$(TOPDIR) EXTRADEFINES=$(EXTRADEFINES)
|
|
||||||
$(call DELFILE, Make.dep)
|
$(call DELFILE, Make.dep)
|
||||||
$(call DELFILE, .depend)
|
$(call DELFILE, .depend)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,8 +39,11 @@
|
||||||
# CONTEXTDIRS include directories that have special, one-time pre-build
|
# CONTEXTDIRS include directories that have special, one-time pre-build
|
||||||
# requirements. Normally this includes things like auto-generation of
|
# requirements. Normally this includes things like auto-generation of
|
||||||
# configuration specific files or creation of configurable symbolic links
|
# configuration specific files or creation of configurable symbolic links
|
||||||
# CLEANDIRS are the directories that will clean in. These are
|
# CLEANDIRS are the directories that the clean target will executed in.
|
||||||
# all directories that we know about.
|
# These are all directories that we know about.
|
||||||
|
# CCLEANDIRS are directories that the clean_context target will execute in.
|
||||||
|
# The clean_context target "undoes" the actions of the context target.
|
||||||
|
# Only directories known to require cleaning are included.
|
||||||
# KERNDEPDIRS are the directories in which we will build target dependencies.
|
# KERNDEPDIRS are the directories in which we will build target dependencies.
|
||||||
# If NuttX and applications are built separately (CONFIG_BUILD_PROTECTED or
|
# If NuttX and applications are built separately (CONFIG_BUILD_PROTECTED or
|
||||||
# CONFIG_BUILD_KERNEL), then this holds only the directories containing
|
# CONFIG_BUILD_KERNEL), then this holds only the directories containing
|
||||||
|
|
@ -50,6 +53,7 @@
|
||||||
# CONFIG_BUILD_KERNEL is selected, then applications are not build at all.
|
# CONFIG_BUILD_KERNEL is selected, then applications are not build at all.
|
||||||
|
|
||||||
CLEANDIRS :=
|
CLEANDIRS :=
|
||||||
|
CCLEANDIRS := boards $(APPDIR) graphics
|
||||||
KERNDEPDIRS :=
|
KERNDEPDIRS :=
|
||||||
USERDEPDIRS :=
|
USERDEPDIRS :=
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -109,8 +109,11 @@ APPDIR := ${shell if [ -r $(CONFIG_APPS_DIR)/Makefile ]; then echo "$(CONFIG_APP
|
||||||
# CONTEXTDIRS include directories that have special, one-time pre-build
|
# CONTEXTDIRS include directories that have special, one-time pre-build
|
||||||
# requirements. Normally this includes things like auto-generation of
|
# requirements. Normally this includes things like auto-generation of
|
||||||
# configuration specific files or creation of configurable symbolic links
|
# configuration specific files or creation of configurable symbolic links
|
||||||
# CLEANDIRS are the directories that will clean in. These are
|
# CLEANDIRS are the directories that the clean target will executed in.
|
||||||
# all directories that we know about.
|
# These are all directories that we know about.
|
||||||
|
# CCLEANDIRS are directories that the clean_context target will execute in.
|
||||||
|
# The clean_context target "undoes" the actions of the context target.
|
||||||
|
# Only directories known to require cleaning are included.
|
||||||
# KERNDEPDIRS are the directories in which we will build target dependencies.
|
# KERNDEPDIRS are the directories in which we will build target dependencies.
|
||||||
# If NuttX and applications are built separately (CONFIG_BUILD_PROTECTED or
|
# If NuttX and applications are built separately (CONFIG_BUILD_PROTECTED or
|
||||||
# CONFIG_BUILD_KERNEL), then this holds only the directories containing
|
# CONFIG_BUILD_KERNEL), then this holds only the directories containing
|
||||||
|
|
@ -393,8 +396,11 @@ context: check_context staging include/nuttx/config.h include/nuttx/version.h in
|
||||||
# and symbolic links created by the context target.
|
# and symbolic links created by the context target.
|
||||||
|
|
||||||
clean_context:
|
clean_context:
|
||||||
$(Q) $(MAKE) -C boards TOPDIR="$(TOPDIR)" clean_context
|
$(Q) for dir in $(CCLEANDIRS) ; do \
|
||||||
$(Q) $(MAKE) -C $(CONFIG_APPS_DIR) TOPDIR="$(TOPDIR)" clean_context
|
if [ -e $$dir/Makefile ]; then \
|
||||||
|
$(MAKE) -C $$dir TOPDIR="$(TOPDIR)" clean_context ; \
|
||||||
|
fi \
|
||||||
|
done
|
||||||
$(call DELFILE, include/math.h)
|
$(call DELFILE, include/math.h)
|
||||||
$(call DELFILE, include/stdarg.h)
|
$(call DELFILE, include/stdarg.h)
|
||||||
$(call DELFILE, include/setjmp.h)
|
$(call DELFILE, include/setjmp.h)
|
||||||
|
|
|
||||||
|
|
@ -91,8 +91,11 @@ APPDIR := ${shell if exist "$(CONFIG_APPS_DIR)\Makefile" echo $(CONFIG_APPS_DIR)
|
||||||
# CONTEXTDIRS include directories that have special, one-time pre-build
|
# CONTEXTDIRS include directories that have special, one-time pre-build
|
||||||
# requirements. Normally this includes things like auto-generation of
|
# requirements. Normally this includes things like auto-generation of
|
||||||
# configuration specific files or creation of configurable symbolic links
|
# configuration specific files or creation of configurable symbolic links
|
||||||
# CLEANDIRS are the directories that will clean in. These are
|
# CLEANDIRS are the directories that the clean target will executed in.
|
||||||
# all directories that we know about.
|
# These are all directories that we know about.
|
||||||
|
# CCLEANDIRS are directories that the clean_context target will execute in.
|
||||||
|
# The clean_context target "undoes" the actions of the context target.
|
||||||
|
# Only directories known to require cleaning are included.
|
||||||
# KERNDEPDIRS are the directories in which we will build target dependencies.
|
# KERNDEPDIRS are the directories in which we will build target dependencies.
|
||||||
# If NuttX and applications are built separately (CONFIG_BUILD_PROTECTED or
|
# If NuttX and applications are built separately (CONFIG_BUILD_PROTECTED or
|
||||||
# CONFIG_BUILD_KERNEL), then this holds only the directories containing
|
# CONFIG_BUILD_KERNEL), then this holds only the directories containing
|
||||||
|
|
@ -407,8 +410,7 @@ context: check_context staging include\nuttx\config.h include\nuttx\version.h in
|
||||||
# and symbolic links created by the context target.
|
# and symbolic links created by the context target.
|
||||||
|
|
||||||
clean_context:
|
clean_context:
|
||||||
$(Q) $(MAKE) -C boards TOPDIR="$(TOPDIR)" clean_context
|
$(Q) for %%G in ($(CCLEANDIRS)) do ( if exist %%G\Makefile $(MAKE) -C %%G TOPDIR="$(TOPDIR)" clean_context )
|
||||||
$(Q) $(MAKE) -C $(CONFIG_APPS_DIR) TOPDIR="$(TOPDIR)" clean_context
|
|
||||||
$(call DELFILE, include\nuttx\config.h)
|
$(call DELFILE, include\nuttx\config.h)
|
||||||
$(call DELFILE, include\nuttx\version.h)
|
$(call DELFILE, include\nuttx\version.h)
|
||||||
$(call DELFILE, include\math.h)
|
$(call DELFILE, include\math.h)
|
||||||
|
|
|
||||||
|
|
@ -285,6 +285,13 @@ int main(int argc, char **argv, char **envp)
|
||||||
* REVISIT: Generates a false alarm if the current line is also
|
* REVISIT: Generates a false alarm if the current line is also
|
||||||
* a comment. Generally it is acceptable for one comment to
|
* a comment. Generally it is acceptable for one comment to
|
||||||
* follow another with no space separation.
|
* follow another with no space separation.
|
||||||
|
*
|
||||||
|
* REVISIT: prevbrhcmt is tested to case the preceding line
|
||||||
|
* contained comments to the right of the code. In such cases,
|
||||||
|
* the comments are normally aligned and do not follow normal
|
||||||
|
* indentation rules. However, this code will generate a false
|
||||||
|
* alarm if the comments are aligned to the right BUT the
|
||||||
|
* preceding line has no comment.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (line[n] != '}' /* && line[n] != '#' */ && !prevbrhcmt)
|
if (line[n] != '}' /* && line[n] != '#' */ && !prevbrhcmt)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue