Skip to content

Commit aed2c55

Browse files
Loukiousgithub-actions[bot]
authored andcommitted
Makefile: Add conditional check for KSU hook configurations
1 parent 66e3060 commit aed2c55

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

drivers/kernelsu/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ $(info -- KernelSU-Next Manager signature hash: $(KSU_NEXT_MANAGER_HASH))
112112
## Logic flipped for HAVE_KSU_HOOK: 0 is success, 1 is failure
113113
HAVE_KSU_HOOK ?= 1
114114

115+
# Only check hooks when we have config (skip during clean/mrproper when .config is absent)
116+
ifneq ($(CONFIG_KSU_MANUAL_HOOK)$(CONFIG_KSU_KPROBES_HOOK),)
117+
115118
# Checks hooks state
116119
ifeq ($(CONFIG_KSU_KPROBES_HOOK), y)
117120
$(info -- KernelSU-Next: Hook mode: Kprobes)
@@ -131,6 +134,8 @@ ifneq ($(HAVE_KSU_HOOK),0)
131134
$(error -- KernelSU-Next: No hooks were defined, please integrate manual hooks in your kernel!)
132135
endif
133136

137+
endif # hook config check
138+
134139
# some backports
135140
ifneq ($(shell grep -Eq "^static int can_umount" $(srctree)/fs/namespace.c; echo $$?),0)
136141
$(info -- KSU_NEXT: adding function 'static int can_umount(const struct path *path, int flags);' to $(srctree)/fs/namespace.c)

0 commit comments

Comments
 (0)