Adding script for build-test against various versions of kernel source
authorGuo-Fu Tseng <cooldavid@cooldavid.org>
Tue, 28 Jun 2011 07:17:49 +0000 (15:17 +0800)
committerGuo-Fu Tseng <cooldavid@cooldavid.org>
Tue, 28 Jun 2011 11:20:51 +0000 (19:20 +0800)
Makefile

index ab6097f..e292fb3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -41,6 +41,15 @@ install: modules
 patch:
        @/usr/bin/diff -uar -X dontdiff ../../trunc ./ > bc.patch || echo > /dev/null
 
+buildtest:
+       SRCDIRS=`find ~/linux-src -mindepth 1 -maxdepth 1 -type d -name 'linux-*' | sort -r -n`; \
+       for d in $${SRCDIRS}; do \
+               $(MAKE) -C . KSRC=$${d} modules; \
+               if [ $$? != 0 ]; then \
+                       exit $$?; \
+               fi; \
+       done
+
 clean:
        @rm -rf $(MODNAME).ko $(TEMPFILES)