You've already forked KernelSU-Next
mirror of
https://github.com/KernelSU-Next/KernelSU-Next.git
synced 2025-08-27 23:46:34 +00:00
kernel: allow use without git submodule
This commit is contained in:
@@ -13,16 +13,11 @@ obj-y += kernel_compat.o
|
||||
|
||||
obj-y += selinux/
|
||||
|
||||
ifeq ($(shell test -d $(srctree)/$(src)/../.git; echo $$?),0)
|
||||
# We must use the absolute path to git, otherwise the build will fail if git is not in the PATH
|
||||
KSU_GIT_VERSION := $(shell cd $(srctree)/$(src);/usr/bin/git rev-list --count HEAD)
|
||||
ifeq ($(KSU_GIT_VERSION),)
|
||||
$(error Get git version failed, please make sure git is installed in /usr/bin/git)
|
||||
endif
|
||||
ifeq ($(shell test $(KSU_GIT_VERSION) -gt 10000; echo $$?),0)
|
||||
$(error The way you configure KernelSU is wrong, please use submodule and make sure it is a single git repo)
|
||||
endif
|
||||
|
||||
ccflags-y += -DKSU_GIT_VERSION=$(KSU_GIT_VERSION)
|
||||
endif
|
||||
|
||||
ifndef EXPECTED_SIZE
|
||||
EXPECTED_SIZE := 0x033b
|
||||
|
||||
Reference in New Issue
Block a user