Makefile ifeq condition help

I'm trying to make something like this work...
I can't understand why it doesn't...

# ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,5.2)),1)
  CT_KVER="-5.2"
else
  CT_KVER="-4.19"
endif

The ifeq usage should be fine. I wonder if KERNEL_PATCHVER is defined when eval this code. Have you tried debug it with $(warn xxx)?

Doesn't look it's defined when the code is evaluated. How to fix this?

Depending on the context you might have luck with forcing later evaluation by escaping the dollar signs.