On Mon, 2022-04-04 at 01:19 +0200, Hauke Mehrtens wrote: > > This does not work for me. > We have to do this inside the kernel make call, when the kernel build > system calls backports again, we should have the needed information in > that call only. > > The build works like this: > 1. The normal make call to backports, KERNELRELEASE is not set and > Makefile forwards the call to Makefile.real. > 2. This calls "Makefile.build modules" in the next step. > 3. This calls the kernel build system with > "@$(MAKE) -C $(KLIB_BUILD) M=$(BACKPORT_DIR) modules" > 4. This calls again Makefile, but now with KERNELRELEASE set. > 5. This calls Makefile.kernel and uses the kernel build system to build > the backports code. > > I tried adding a new rule to Makefile.kernel and then call it in > Makefile.build using the kernel build system, but it looks like it only > supports make targets supported by the kernel build system. > > How do we make the kernel build system call our make target first? > Maybe we don't need one? subdir-ccflags-y += -DBACKPORT_KERNEL_SUBLEVEL=$(SUBLEVEL) would pass it to each and every command line ... not nice, but maybe works? johannes -- To unsubscribe from this list: send the line "unsubscribe backports" in