Add ability to not build all modules
authorKarol Lewandowski <k.lewandowsk@samsung.com>
Thu, 25 Nov 2021 11:35:51 +0000 (12:35 +0100)
committerKarol Lewandowski <k.lewandowsk@samsung.com>
Thu, 25 Nov 2021 11:39:22 +0000 (12:39 +0100)
This is going to be used by clients of -source package.

Change-Id: Ieb7be8aa0a169951356b554947a9ab978346346e

kernel/Makefile
packaging/linux-tizen-modules-source.spec
packaging/linux-tizen-modules.spec

index 16b724f..51f5bb4 100644 (file)
@@ -5,8 +5,14 @@ LD = ${CROSS_COMPILE}ld
 CFLAGS_logger.o   += -Wno-error=missing-attributes
 CFLAGS_proc-tsm.o += -Wno-error=missing-attributes
 
-obj-m += logger.o
-obj-m += proc-tsm.o
+# Build is disabled by default so that when new module is added to this repository (and -source package),
+# it won't get automatically build in packages using it (that would break these automatically as file list
+# would no longer match).
+BUILD_logger ?= n
+BUILD_proc_tsm ?= n
+
+obj-$(BUILD_logger) += logger.o
+obj-$(BUILD_proc_tsm) += proc-tsm.o
 
 all:
        make -C $(KERNELDIR) M=$(PWD) modules
index 48a285d..aa45713 100644 (file)
@@ -1,5 +1,5 @@
 Name:           linux-tizen-modules-source
-Version:        7.0.0
+Version:        7.0.1
 Release:        0
 License:        GPL-2.0+
 Source0:        %{name}-%{version}.tar.xz
index 962eec8..13a41cc 100644 (file)
@@ -7,7 +7,7 @@
 %endif
 
 Name:           linux-tizen-modules
-Version:        7.0.0
+Version:        7.0.1
 Release:        0
 License:        GPL-2.0+
 Source0:        %{name}-%{version}.tar.xz
@@ -58,6 +58,9 @@ Provides:       stability-monitor-kernel-module
 cp %{SOURCE1} ./%{name}.manifest
 
 %build
+export BUILD_logger=m
+export BUILD_proc_tsm=m
+
 make -C kernel clean KERNELDIR=/boot/kernel/devel/kernel-devel-%{buildarch}-rpi3
 make -C kernel KERNELDIR=/boot/kernel/devel/kernel-devel-%{buildarch}-rpi3/
 make -C kernel modules_install KERNELDIR=/boot/kernel/devel/kernel-devel-%{buildarch}-rpi3 INSTALL_MOD_STRIP=1