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
@ -138,6 +138,11 @@ mklibgraphics: $(BIN)
|
||||
|
||||
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
|
||||
|
||||
clean:
|
||||
@ -147,10 +152,7 @@ clean:
|
||||
$(call DELFILE, $(BIN))
|
||||
$(call CLEAN)
|
||||
|
||||
distclean: clean
|
||||
$(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)
|
||||
distclean: clean clean_context
|
||||
$(call DELFILE, Make.dep)
|
||||
$(call DELFILE, .depend)
|
||||
|
||||
|
@ -39,8 +39,11 @@
|
||||
# CONTEXTDIRS include directories that have special, one-time pre-build
|
||||
# requirements. Normally this includes things like auto-generation of
|
||||
# configuration specific files or creation of configurable symbolic links
|
||||
# CLEANDIRS are the directories that will clean in. These are
|
||||
# all directories that we know about.
|
||||
# CLEANDIRS are the directories that the clean target will executed in.
|
||||
# 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.
|
||||
# If NuttX and applications are built separately (CONFIG_BUILD_PROTECTED or
|
||||
# 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.
|
||||
|
||||
CLEANDIRS :=
|
||||
CCLEANDIRS := boards $(APPDIR) graphics
|
||||
KERNDEPDIRS :=
|
||||
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
|
||||
# requirements. Normally this includes things like auto-generation of
|
||||
# configuration specific files or creation of configurable symbolic links
|
||||
# CLEANDIRS are the directories that will clean in. These are
|
||||
# all directories that we know about.
|
||||
# CLEANDIRS are the directories that the clean target will executed in.
|
||||
# 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.
|
||||
# If NuttX and applications are built separately (CONFIG_BUILD_PROTECTED or
|
||||
# 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.
|
||||
|
||||
clean_context:
|
||||
$(Q) $(MAKE) -C boards TOPDIR="$(TOPDIR)" clean_context
|
||||
$(Q) $(MAKE) -C $(CONFIG_APPS_DIR) TOPDIR="$(TOPDIR)" clean_context
|
||||
$(Q) for dir in $(CCLEANDIRS) ; do \
|
||||
if [ -e $$dir/Makefile ]; then \
|
||||
$(MAKE) -C $$dir TOPDIR="$(TOPDIR)" clean_context ; \
|
||||
fi \
|
||||
done
|
||||
$(call DELFILE, include/math.h)
|
||||
$(call DELFILE, include/stdarg.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
|
||||
# requirements. Normally this includes things like auto-generation of
|
||||
# configuration specific files or creation of configurable symbolic links
|
||||
# CLEANDIRS are the directories that will clean in. These are
|
||||
# all directories that we know about.
|
||||
# CLEANDIRS are the directories that the clean target will executed in.
|
||||
# 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.
|
||||
# If NuttX and applications are built separately (CONFIG_BUILD_PROTECTED or
|
||||
# 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.
|
||||
|
||||
clean_context:
|
||||
$(Q) $(MAKE) -C boards TOPDIR="$(TOPDIR)" clean_context
|
||||
$(Q) $(MAKE) -C $(CONFIG_APPS_DIR) TOPDIR="$(TOPDIR)" clean_context
|
||||
$(Q) for %%G in ($(CCLEANDIRS)) do ( if exist %%G\Makefile $(MAKE) -C %%G TOPDIR="$(TOPDIR)" clean_context )
|
||||
$(call DELFILE, include\nuttx\config.h)
|
||||
$(call DELFILE, include\nuttx\version.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
|
||||
* a comment. Generally it is acceptable for one comment to
|
||||
* 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)
|
||||
|
Loading…
Reference in New Issue
Block a user