]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
xtensa: only build platform or variant if they contain a Makefile
authorChris Zankel <chris@zankel.net>
Thu, 2 Apr 2009 23:58:53 +0000 (16:58 -0700)
committerChris Zankel <chris@zankel.net>
Fri, 3 Apr 2009 07:06:45 +0000 (00:06 -0700)
We only add the platform or variant directory to core-y if it
contains a Makefile. Consequently, we can remove the Makefiles
for the dc232b and fsf processor variants.

Signed-off-by: Chris Zankel <chris@zankel.net>
arch/xtensa/Makefile
arch/xtensa/variants/dc232b/Makefile [deleted file]
arch/xtensa/variants/fsf/Makefile [deleted file]

index d0a8ba4b12cfd941dd02710747d8d48c62287ff3..4caffac3ca2e7d3805bb6d1b8fd11b53bdc544d0 100644 (file)
@@ -64,23 +64,23 @@ ifneq ($(VARIANT),)
   endif
 endif
 
-#
+# Only build variant and/or platform if it includes a Makefile
+
+buildvar := $(shell test -a $(srctree)/arch/xtensa/variants/$(VARIANT)/Makefile && echo arch/xtensa/variants/$(VARIANT)/)
+buildplf := $(shell test -a $(srctree)/arch/xtensa/platforms/$(PLATFORM)/Makefile && echo arch/xtensa/platforms/$(PLATFORM)/)
+
+# Find libgcc.a
 
 LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
 
 head-y         := arch/xtensa/kernel/head.o
 core-y         += arch/xtensa/kernel/ arch/xtensa/mm/
-ifneq ($(VARIANT),)
-core-y         += arch/xtensa/variants/$(VARIANT)/
-endif
-ifneq ($(PLATFORM),)
-core-y         += arch/xtensa/platforms/$(PLATFORM)/
-endif
+core-y         += $(buildvar) $(buildplf)
+
 libs-y         += arch/xtensa/lib/ $(LIBGCC)
 
 boot           := arch/xtensa/boot
 
-
 all: zImage
 
 bzImage : zImage
diff --git a/arch/xtensa/variants/dc232b/Makefile b/arch/xtensa/variants/dc232b/Makefile
deleted file mode 100644 (file)
index 3c8f268..0000000
+++ /dev/null
@@ -1 +0,0 @@
-# dc232b Makefile
diff --git a/arch/xtensa/variants/fsf/Makefile b/arch/xtensa/variants/fsf/Makefile
deleted file mode 100644 (file)
index 3fadcfd..0000000
+++ /dev/null
@@ -1 +0,0 @@
-# fsf Makefile