[PATCH] Stop build recurse into not-compiled directories

22 views
Skip to first unread message

Iulia Manda

unread,
Jan 6, 2015, 5:34:52 PM1/6/15
to jo...@joshtriplett.org, opw-k...@googlegroups.com
This patch stops the build from recursing into four directories (acpi, kprobes,
quota, vmw_vsock) where no file gets compiled in a tinyconfig build. This is
speeding up the compilation process.

Signed-off-by: Iulia Manda <iulia....@gmail.com>
---
arch/x86/kernel/Makefile | 4 ++--
fs/Makefile | 4 ++--
net/Makefile | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index 5d4502c..3f642ea 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -48,7 +48,7 @@ obj-$(CONFIG_INTEL_TXT) += tboot.o
obj-$(CONFIG_ISA_DMA_API) += i8237.o
obj-$(CONFIG_STACKTRACE) += stacktrace.o
obj-y += cpu/
-obj-y += acpi/
+obj-$(CONFIG_ACPI) += acpi/
obj-y += reboot.o
obj-$(CONFIG_X86_MSR) += msr.o
obj-$(CONFIG_X86_CPUID) += cpuid.o
@@ -70,7 +70,7 @@ obj-$(CONFIG_KEXEC) += machine_kexec_$(BITS).o
obj-$(CONFIG_KEXEC) += relocate_kernel_$(BITS).o crash.o
obj-$(CONFIG_KEXEC_FILE) += kexec-bzimage64.o
obj-$(CONFIG_CRASH_DUMP) += crash_dump_$(BITS).o
-obj-y += kprobes/
+obj-$(KPROBES) += kprobes/
obj-$(CONFIG_MODULES) += module.o
obj-$(CONFIG_DOUBLEFAULT) += doublefault.o
obj-$(CONFIG_KGDB) += kgdb.o
diff --git a/fs/Makefile b/fs/Makefile
index bedff48..e3fe952 100644
--- a/fs/Makefile
+++ b/fs/Makefile
@@ -48,7 +48,7 @@ obj-$(CONFIG_SYSCTL) += drop_caches.o

obj-$(CONFIG_FHANDLE) += fhandle.o

-obj-y += quota/
+obj-$(CONFIG_QUOTA) += quota/

obj-$(CONFIG_PROC_FS) += proc/
obj-$(CONFIG_KERNFS) += kernfs/
@@ -122,7 +122,7 @@ obj-$(CONFIG_OCFS2_FS) += ocfs2/
obj-$(CONFIG_BTRFS_FS) += btrfs/
obj-$(CONFIG_GFS2_FS) += gfs2/
obj-$(CONFIG_F2FS_FS) += f2fs/
-obj-y += exofs/ # Multiple modules
+obj-$(EXOFS_FS) += exofs/ # Multiple modules
obj-$(CONFIG_CEPH_FS) += ceph/
obj-$(CONFIG_PSTORE) += pstore/
obj-$(CONFIG_EFIVAR_FS) += efivarfs/
diff --git a/net/Makefile b/net/Makefile
index 38704bd..69eb208 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -68,7 +68,7 @@ obj-$(CONFIG_CEPH_LIB) += ceph/
obj-$(CONFIG_BATMAN_ADV) += batman-adv/
obj-$(CONFIG_NFC) += nfc/
obj-$(CONFIG_OPENVSWITCH) += openvswitch/
-obj-$(CONFIG_VSOCKETS) += vmw_vsock/
+obj-$(CONFIG_VSOCKETS) += vmw_vsock/
obj-$(CONFIG_NET_MPLS_GSO) += mpls/
obj-$(CONFIG_HSR) += hsr/
ifneq ($(CONFIG_NET_SWITCHDEV),)
--
1.7.10.4

Arnd Bergmann

unread,
Jan 7, 2015, 4:58:40 AM1/7/15
to opw-k...@googlegroups.com, Iulia Manda, jo...@joshtriplett.org
On Wednesday 07 January 2015 00:34:16 Iulia Manda wrote:
> @@ -70,7 +70,7 @@ obj-$(CONFIG_KEXEC) += machine_kexec_$(BITS).o
>
> obj-$(CONFIG_KEXEC) += relocate_kernel_$(BITS).o crash.o
> obj-$(CONFIG_KEXEC_FILE) += kexec-bzimage64.o
> obj-$(CONFIG_CRASH_DUMP) += crash_dump_$(BITS).o
>
> -obj-y += kprobes/
> +obj-$(KPROBES) += kprobes/
>
> obj-$(CONFIG_MODULES) += module.o
> obj-$(CONFIG_DOUBLEFAULT) += doublefault.o
> obj-$(CONFIG_KGDB) += kgdb.o

You are missing a 'CONFIG_' here, so kprobes will no longer compile
afterwards.

> @@ -122,7 +122,7 @@ obj-$(CONFIG_OCFS2_FS) += ocfs2/
> obj-$(CONFIG_BTRFS_FS) += btrfs/
> obj-$(CONFIG_GFS2_FS) += gfs2/
> obj-$(CONFIG_F2FS_FS) += f2fs/
> -obj-y += exofs/ # Multiple modules
> +obj-$(EXOFS_FS) += exofs/ # Multiple modules

This comment is meant to warn you that there are files in fs/exofs
that do not depend on CONFIG_EXOFS, so this change is wrong independent
of the missing CONFIG_ prefix. libore.ko is built based on CONFIG_ORE.

Arnd

Iulia Manda

unread,
Jan 7, 2015, 9:33:16 AM1/7/15
to Arnd Bergmann, opw-k...@googlegroups.com, Josh Triplett
On 7 January 2015 at 11:58, Arnd Bergmann <ar...@arndb.de> wrote:
> On Wednesday 07 January 2015 00:34:16 Iulia Manda wrote:
>> @@ -70,7 +70,7 @@ obj-$(CONFIG_KEXEC) += machine_kexec_$(BITS).o
>>
>> obj-$(CONFIG_KEXEC) += relocate_kernel_$(BITS).o crash.o
>> obj-$(CONFIG_KEXEC_FILE) += kexec-bzimage64.o
>> obj-$(CONFIG_CRASH_DUMP) += crash_dump_$(BITS).o
>>
>> -obj-y += kprobes/
>> +obj-$(KPROBES) += kprobes/
>>
>> obj-$(CONFIG_MODULES) += module.o
>> obj-$(CONFIG_DOUBLEFAULT) += doublefault.o
>> obj-$(CONFIG_KGDB) += kgdb.o
>
> You are missing a 'CONFIG_' here, so kprobes will no longer compile
> afterwards.
>

Yes, my bad. Solved in a v2.

>> @@ -122,7 +122,7 @@ obj-$(CONFIG_OCFS2_FS) += ocfs2/
>> obj-$(CONFIG_BTRFS_FS) += btrfs/
>> obj-$(CONFIG_GFS2_FS) += gfs2/
>> obj-$(CONFIG_F2FS_FS) += f2fs/
>> -obj-y += exofs/ # Multiple modules
>> +obj-$(EXOFS_FS) += exofs/ # Multiple modules
>
> This comment is meant to warn you that there are files in fs/exofs
> that do not depend on CONFIG_EXOFS, so this change is wrong independent
> of the missing CONFIG_ prefix. libore.ko is built based on CONFIG_ORE.
>

At first, I chose to make this change as ORE symbol depends on EXOFS.
Then I saw it can also be enabled if PNFS_OBJLAYOUT is defined and
EXOFS is not. Changed in v2.

> Arnd
Reply all
Reply to author
Forward
0 new messages