summaryrefslogtreecommitdiff
path: root/nuttx/Makefile.win
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-11-17 18:54:53 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-11-17 18:54:53 +0000
commita444a16f4746959a1332cb21749fbdf9a31df091 (patch)
treed220ebef3bfba64591298b4c51a0c0dd6e10ae0b /nuttx/Makefile.win
parentb023c1b10ea54b6fc54f0ec747c766187c58190f (diff)
downloadpx4-nuttx-a444a16f4746959a1332cb21749fbdf9a31df091.tar.gz
px4-nuttx-a444a16f4746959a1332cb21749fbdf9a31df091.tar.bz2
px4-nuttx-a444a16f4746959a1332cb21749fbdf9a31df091.zip
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
Diffstat (limited to 'nuttx/Makefile.win')
-rw-r--r--nuttx/Makefile.win36
1 files changed, 19 insertions, 17 deletions
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