Most of the changes needed to support Windows native clean; distclean is has a problem

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5367 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2012-11-17 18:54:53 +00:00
parent 43dda7996d
commit 26c9112ad2
31 changed files with 228 additions and 141 deletions
+19 -17
View File
@@ -438,10 +438,10 @@ context: check_context include\nuttx\config.h include\nuttx\version.h include\ma
# and symbolic links created by the context target.
clean_context:
$(Q) rm -f include\nuttx\config.h
$(Q) rm -f include\nuttx\version.h
$(Q) rm -f include\math.h
$(Q) rm -f include\stdarg.h
$(call DELFILE include\nuttx\config.h)
$(call DELFILE include\nuttx\version.h)
$(call DELFILE include\math.h)
$(call DELFILE include\stdarg.h)
$(Q) $(DIRUNLINK) include\arch\board
$(Q) $(DIRUNLINK) include\arch\chip
$(Q) $(DIRUNLINK) include\arch
@@ -688,8 +688,13 @@ ifeq ($(CONFIG_BUILD_2PASS),y)
endif
clean: subdir_clean
$(Q) rm -f $(BIN) nuttx.* mm_test *.map _SAVED_APPS_config *~
$(Q) rm -f nuttx-export*
$(call DELFILE $(BIN))
$(call DELFILE nuttx.*)
$(call DELFILE mm_test)
$(call DELFILE *.map)
$(call DELFILE _SAVED_APPS_config)
$(call DELFILE nuttx-export*)
$(call CLEAN)
subdir_distclean:
$(Q) for %%G in ($(CLEANDIRS)) do ( if exist %%G\Makefile $(MAKE) -C %%G TOPDIR="$(TOPDIR)" distclean )
@@ -698,7 +703,11 @@ distclean: clean subdir_distclean clean_context
ifeq ($(CONFIG_BUILD_2PASS),y)
$(Q) $(MAKE) -C $(CONFIG_PASS1_BUILDIR) TOPDIR="$(TOPDIR)" distclean
endif
$(Q) rm -f Make.defs setenv.sh setenv.bat .config .config.old
$(call DELFILE Make.defs)
$(call DELFILE setenv.sh)
$(call DELFILE setenv.bat)
$(call DELFILE .config)
$(call DELFILE .config.old)
# Application housekeeping targets. The APPDIR variable refers to the user
# application directory. A sample apps\ directory is included with NuttX,
@@ -723,16 +732,9 @@ endif
apps_distclean:
ifneq ($(APPDIR),)
$(Q) if [ -r "$(TOPDIR)\$(APPDIR)\.config" ]; then \
cp "$(TOPDIR)\$(APPDIR)\.config" _SAVED_APPS_config || \
{ echo "Copy of $(APPDIR)\.config failed" ; exit 1 ; } \
else \
rm -f _SAVED_APPS_config; \
fi
$(call DELFILE _SAVED_APPS_config
$(Q) if exist "$(TOPDIR)\$(APPDIR)\.config" ( cp "$(TOPDIR)\$(APPDIR)\.config" _SAVED_APPS_config )
$(Q) $(MAKE) -C "$(TOPDIR)\$(APPDIR)" TOPDIR="$(TOPDIR)" distclean
$(Q) if [ -r _SAVED_APPS_config ]; then \
mv _SAVED_APPS_config "$(TOPDIR)\$(APPDIR)\.config" || \
{ echo "Copy of _SAVED_APPS_config failed" ; exit 1 ; } \
fi
$(Q) if exist _SAVED_APPS_config ( mv _SAVED_APPS_config "$(TOPDIR)\$(APPDIR)\.config" )
endif