aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@winlab.rutgers.edu>2008-04-09 17:02:02 -0400
committerLuis R. Rodriguez <mcgrof@winlab.rutgers.edu>2008-04-09 17:02:02 -0400
commit90889dec3a241c43cc2fbfdff90ee4e0360a72af (patch)
tree36479db9be0d32693f159744721cf10152123b7a
parentaa9ab03c2af319746e7fbd9c3c26f0b678b822c5 (diff)
downloadcompat-wireless-2.6-old-90889dec3a241c43cc2fbfdff90ee4e0360a72af.tar.gz
Use "make kernelversion" to find the version. Scan make output for
strings starting with "2.6" to skip make messages (no attempt is made to support non-2.6 kernels). Extract the third group of digits. Use it in the test. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
-rw-r--r--config.mk3
1 files changed, 2 insertions, 1 deletions
diff --git a/config.mk b/config.mk
index d223362..b927aac 100644
--- a/config.mk
+++ b/config.mk
@@ -118,7 +118,8 @@ CONFIG_USB_ATMEL=m
# Stuff here things which depend on kernel versions for USB
ifeq ($(shell test -e $(KLIB_BUILD)/Makefile && echo yes),yes)
-ifeq ($(shell test $(shell sed 's/^SUBLEVEL = //;t;d' < $(KLIB_BUILD)/Makefile) -gt 21 && echo yes),yes)
+KERNEL_SUBLEVEL = $(shell $(MAKE) -C $(KLIB_BUILD) kernelversion | sed -n 's/^2\.6\.\([0-9]\+\).*/\1/p')
+ifeq ($(shell test $(KERNEL_SUBLEVEL) -gt 21 && echo yes),yes)
# Sorry, rndis_wlan uses cancel_work_sync which is new and can't be done in compat...