From afda7763683b2b6accbdf4b721b6a5b118d386ac Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 15 Nov 2012 19:22:47 +0000 Subject: [PATCH] Fix various build-related typos git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5358 42af7a65-404d-4744-a932-0658087f49c3 --- apps/Makefile | 1 - apps/examples/Makefile | 4 ++-- apps/examples/cxxtest/Makefile | 2 +- apps/examples/elf/Makefile | 2 +- apps/examples/helloxx/Makefile | 2 +- apps/examples/nettest/Makefile | 2 +- apps/examples/nxflat/Makefile | 2 +- apps/examples/romfs/Makefile | 2 +- apps/examples/udp/Makefile | 2 +- apps/graphics/Makefile | 4 ++-- apps/interpreters/Makefile | 4 ++-- apps/netutils/Makefile | 4 ++-- apps/system/Makefile | 12 +++++++++--- nuttx/tools/Config.mk | 10 ++++++---- 14 files changed, 30 insertions(+), 23 deletions(-) diff --git a/apps/Makefile b/apps/Makefile index 826694dad4..77f2012ef8 100644 --- a/apps/Makefile +++ b/apps/Makefile @@ -35,7 +35,6 @@ ############################################################################ -include $(TOPDIR)/Make.defs --include $(TOPDIR)/.config APPDIR = ${shell pwd} diff --git a/apps/examples/Makefile b/apps/examples/Makefile index 269d2b4643..2bff9934e6 100644 --- a/apps/examples/Makefile +++ b/apps/examples/Makefile @@ -104,13 +104,13 @@ all: nothing define SDIR_template $(1)_$(2): - $(MAKE) -C $(1) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" + $(MAKE) -C $(1) $(2) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" endef $(foreach SDIR, $(CNTXTDIRS), $(eval $(call SDIR_template,$(SDIR),context))) $(foreach SDIR, $(SUBDIRS), $(eval $(call SDIR_template,$(SDIR),depend))) $(foreach SDIR, $(SUBDIRS), $(eval $(call SDIR_template,$(SDIR),clean))) -$(foreach SDIR, $(SUBDIRS), $(eval $(call SDIR_template,$(SDIR),disclean))) +$(foreach SDIR, $(SUBDIRS), $(eval $(call SDIR_template,$(SDIR),distclean))) nothing: diff --git a/apps/examples/cxxtest/Makefile b/apps/examples/cxxtest/Makefile index e6bdd34fc3..b0f0befbf0 100644 --- a/apps/examples/cxxtest/Makefile +++ b/apps/examples/cxxtest/Makefile @@ -73,7 +73,7 @@ STACKSIZE = 4096 VPATH = all: .built -.PHONY: clean depend disclean chkcxx +.PHONY: clean depend distclean chkcxx chkcxx: ifneq ($(CONFIG_HAVE_CXX),y) diff --git a/apps/examples/elf/Makefile b/apps/examples/elf/Makefile index 24472139fb..8831a9336e 100644 --- a/apps/examples/elf/Makefile +++ b/apps/examples/elf/Makefile @@ -65,7 +65,7 @@ ROOTDEPPATH = --dep-path . --dep-path tests VPATH = tests all: .built -.PHONY: really_build clean_tests clean depend disclean +.PHONY: really_build clean_tests clean depend distclean $(AOBJS): %$(OBJEXT): %.S $(call ASSEMBLE, $<, $@) diff --git a/apps/examples/helloxx/Makefile b/apps/examples/helloxx/Makefile index fd126d345f..295d0116e7 100644 --- a/apps/examples/helloxx/Makefile +++ b/apps/examples/helloxx/Makefile @@ -73,7 +73,7 @@ STACKSIZE = 2048 VPATH = all: .built -.PHONY: clean depend disclean chkcxx +.PHONY: clean depend distclean chkcxx chkcxx: ifneq ($(CONFIG_HAVE_CXX),y) diff --git a/apps/examples/nettest/Makefile b/apps/examples/nettest/Makefile index 75e4cf0bea..c1c50bbb8f 100644 --- a/apps/examples/nettest/Makefile +++ b/apps/examples/nettest/Makefile @@ -96,7 +96,7 @@ STACKSIZE = 2048 VPATH = all: .built $(HOST_BIN) -.PHONY: clean depend disclean +.PHONY: clean depend distclean $(TARG_AOBJS): %$(OBJEXT): %.S $(call ASSEMBLE, $<, $@) diff --git a/apps/examples/nxflat/Makefile b/apps/examples/nxflat/Makefile index 07c163347d..4fc315592c 100644 --- a/apps/examples/nxflat/Makefile +++ b/apps/examples/nxflat/Makefile @@ -65,7 +65,7 @@ ROOTDEPPATH = --dep-path . VPATH = all: .built -.PHONY: headers clean depend disclean +.PHONY: headers clean depend distclean $(AOBJS): %$(OBJEXT): %.S $(call ASSEMBLE, $<, $@) diff --git a/apps/examples/romfs/Makefile b/apps/examples/romfs/Makefile index b247db6f62..3701412762 100644 --- a/apps/examples/romfs/Makefile +++ b/apps/examples/romfs/Makefile @@ -65,7 +65,7 @@ ROOTDEPPATH = --dep-path . VPATH = all: .built -.PHONY: checkgenromfs clean depend disclean +.PHONY: checkgenromfs clean depend distclean $(AOBJS): %$(OBJEXT): %.S $(call ASSEMBLE, $<, $@) diff --git a/apps/examples/udp/Makefile b/apps/examples/udp/Makefile index 6bfdce9cc1..d6c89cac44 100644 --- a/apps/examples/udp/Makefile +++ b/apps/examples/udp/Makefile @@ -87,7 +87,7 @@ ROOTDEPPATH = --dep-path . VPATH = all: .built -.PHONY: clean depend disclean +.PHONY: clean depend distclean $(TARG_AOBJS): %$(OBJEXT): %.S $(call ASSEMBLE, $<, $@) diff --git a/apps/graphics/Makefile b/apps/graphics/Makefile index bebb31b5a6..474118450b 100644 --- a/apps/graphics/Makefile +++ b/apps/graphics/Makefile @@ -48,13 +48,13 @@ all: nothing define SDIR_template $(1)_$(2): - $(MAKE) -C $(1) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" + $(MAKE) -C $(1) $(2) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" endef $(foreach SDIR, $(CNTXTDIRS), $(eval $(call SDIR_template,$(SDIR),context))) $(foreach SDIR, $(SUBDIRS), $(eval $(call SDIR_template,$(SDIR),depend))) $(foreach SDIR, $(SUBDIRS), $(eval $(call SDIR_template,$(SDIR),clean))) -$(foreach SDIR, $(SUBDIRS), $(eval $(call SDIR_template,$(SDIR),disclean))) +$(foreach SDIR, $(SUBDIRS), $(eval $(call SDIR_template,$(SDIR),distclean))) nothing: diff --git a/apps/interpreters/Makefile b/apps/interpreters/Makefile index 1eeab585e0..3569a0044a 100644 --- a/apps/interpreters/Makefile +++ b/apps/interpreters/Makefile @@ -52,12 +52,12 @@ all: nothing define SDIR_template $(1)_$(2): - $(MAKE) -C $(1) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" + $(MAKE) -C $(1) $(2) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" endef $(foreach SDIR, $(INSTALLED_DIRS), $(eval $(call SDIR_template,$(SDIR),depend))) $(foreach SDIR, $(INSTALLED_DIRS), $(eval $(call SDIR_template,$(SDIR),clean))) -$(foreach SDIR, $(INSTALLED_DIRS), $(eval $(call SDIR_template,$(SDIR),disclean))) +$(foreach SDIR, $(INSTALLED_DIRS), $(eval $(call SDIR_template,$(SDIR),distclean))) nothing: diff --git a/apps/netutils/Makefile b/apps/netutils/Makefile index 303b804b6c..b557c73cc8 100644 --- a/apps/netutils/Makefile +++ b/apps/netutils/Makefile @@ -49,12 +49,12 @@ all: nothing define SDIR_template $(1)_$(2): - $(MAKE) -C $(1) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" + $(MAKE) -C $(1) $(2) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" endef $(foreach SDIR, $(SUBDIRS), $(eval $(call SDIR_template,$(SDIR),depend))) $(foreach SDIR, $(SUBDIRS), $(eval $(call SDIR_template,$(SDIR),clean))) -$(foreach SDIR, $(SUBDIRS), $(eval $(call SDIR_template,$(SDIR),disclean))) +$(foreach SDIR, $(SUBDIRS), $(eval $(call SDIR_template,$(SDIR),distclean))) nothing: diff --git a/apps/system/Makefile b/apps/system/Makefile index 572598e398..c59059d811 100644 --- a/apps/system/Makefile +++ b/apps/system/Makefile @@ -41,9 +41,15 @@ SUBDIRS = free i2c install readline poweroff ramtron sdcard sysinfo # Create the list of installed runtime modules (INSTALLED_DIRS) +ifeq ($(CONFIG_WINDOWS_NATIVE),y) define ADD_DIRECTORY -INSTALLED_DIRS += ${shell if [ -r $1/Makefile ]; then echo "$1"; fi} + INSTALLED_DIRS += $(if $(wildcard .\$1\Makefile),$1,) endef +else +define ADD_DIRECTORY + INSTALLED_DIRS += $(if $(wildcard ./$1/Makefile),$1,) +endef +endif $(foreach DIR, $(SUBDIRS), $(eval $(call ADD_DIRECTORY,$(DIR)))) @@ -52,12 +58,12 @@ all: nothing define SDIR_template $(1)_$(2): - $(MAKE) -C $(1) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" + $(MAKE) -C $(1) $(2) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" endef $(foreach SDIR, $(INSTALLED_DIRS), $(eval $(call SDIR_template,$(SDIR),depend))) $(foreach SDIR, $(INSTALLED_DIRS), $(eval $(call SDIR_template,$(SDIR),clean))) -$(foreach SDIR, $(INSTALLED_DIRS), $(eval $(call SDIR_template,$(SDIR),disclean))) +$(foreach SDIR, $(INSTALLED_DIRS), $(eval $(call SDIR_template,$(SDIR),distclean))) nothing: diff --git a/nuttx/tools/Config.mk b/nuttx/tools/Config.mk index b7f8d9bbe0..f05933f1ab 100644 --- a/nuttx/tools/Config.mk +++ b/nuttx/tools/Config.mk @@ -154,10 +154,12 @@ define ARCHIVE endef endif -define CLEAN ifeq ($(CONFIG_WINDOWS_NATIVE),y) +define CLEAN $(Q) rm -f *.o *.a -else - $(Q) rm -f *.o *.a *~ .*.swp -endif endef +else +define CLEAN + $(Q) rm -f *.o *.a *~ .*.swp +endef +endif