From d4dca58d933cf2c713ee8ccead6fce329e199320 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 17 Nov 2012 18:54:53 +0000 Subject: Most of the changes needed to support Windows native clean; distclean is has a problem git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5367 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/Makefile.win | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) (limited to 'nuttx/Makefile.win') diff --git a/nuttx/Makefile.win b/nuttx/Makefile.win index f43f14f0d..f98c5e6d8 100644 --- a/nuttx/Makefile.win +++ b/nuttx/Makefile.win @@ -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 -- cgit v1.2.3