--- a/kernel/Makefile +++ b/kernel/Makefile @@ -63,11 +63,19 @@ # check to see if code is unpatched unpatch_code=$(shell test -e $(cur_patched) && echo do_unpatch_code ) +KVERSION = $(shell cat $(KSRC)/Makefile | awk -F= '/^VERSION =/ {print $$2}' | \ + sed 's/^[ \t]*//;s/[ \t]*$$//') + +KPATCHLEVEL = $(shell cat $(KSRC)/Makefile | awk -F= '/^PATCHLEVEL =/ {print $$2}' | \ + sed 's/^[ \t]*//;s/[ \t]*$$//') + KSUBLEVEL = $(shell cat $(KSRC)/Makefile | awk -F= '/^SUBLEVEL =/ {print $$2}' | \ sed 's/^[ \t]*//;s/[ \t]*$$//') +linux_2_6_38: $(unpatch_code) -KERNEL_TARGET=linux_2_6_$(KSUBLEVEL) + +KERNEL_TARGET=linux_$(KVERSION)_$(KPATCHLEVEL)_$(KSUBLEVEL) kernel_check: $(KERNEL_TARGET) linux_2_6_14: has_14to23_patch @@ -113,6 +121,8 @@ linux_2_6_34: has_33to34_patch linux_2_6_35: $(unpatch_code) + +$(foreach num, 16 17 18 19 20 21 22 23 24, linux_3_0_$(num)): $(unpatch_code) do_unpatch_code: echo "Un-patching source code for use with linux-2.6.14 and up ..." Only in b: kernel/Makefile.orig