Skip to content

Commit f193318

Browse files
committed
xtensa: only build platform or variant if they contain a Makefile
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>
1 parent 06a7476 commit f193318

3 files changed

Lines changed: 8 additions & 10 deletions

File tree

‎arch/xtensa/Makefile‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,23 +64,23 @@ ifneq ($(VARIANT),)
6464
endif
6565
endif
6666

67-
#
67+
# Only build variant and/or platform if it includes a Makefile
68+
69+
buildvar := $(shell test -a $(srctree)/arch/xtensa/variants/$(VARIANT)/Makefile && echo arch/xtensa/variants/$(VARIANT)/)
70+
buildplf := $(shell test -a $(srctree)/arch/xtensa/platforms/$(PLATFORM)/Makefile && echo arch/xtensa/platforms/$(PLATFORM)/)
71+
72+
# Find libgcc.a
6873

6974
LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
7075

7176
head-y := arch/xtensa/kernel/head.o
7277
core-y += arch/xtensa/kernel/ arch/xtensa/mm/
73-
ifneq ($(VARIANT),)
74-
core-y += arch/xtensa/variants/$(VARIANT)/
75-
endif
76-
ifneq ($(PLATFORM),)
77-
core-y += arch/xtensa/platforms/$(PLATFORM)/
78-
endif
78+
core-y += $(buildvar) $(buildplf)
79+
7980
libs-y += arch/xtensa/lib/ $(LIBGCC)
8081

8182
boot := arch/xtensa/boot
8283

83-
8484
all: zImage
8585

8686
bzImage : zImage

‎arch/xtensa/variants/dc232b/Makefile‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎arch/xtensa/variants/fsf/Makefile‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)