[OPW,kernel] Stop build recurse into not-compiled directories
diff mbox

Message ID 20150106223416.GA28229@winterfell
State New, archived
Headers show

Commit Message

Iulia Manda Jan. 6, 2015, 10:34 p.m. UTC
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.manda21@gmail.com>
---
 arch/x86/kernel/Makefile |    4 ++--
 fs/Makefile              |    4 ++--
 net/Makefile             |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

Comments

Arnd Bergmann Jan. 7, 2015, 9:58 a.m. UTC | #1
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 Jan. 7, 2015, 2:33 p.m. UTC | #2
On 7 January 2015 at 11:58, Arnd Bergmann <arnd@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

Patch
diff mbox

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),)