Check for CONFIG_ in Makefile and Config.in
authorDavid Schleef <ds@schleef.org>
Thu, 21 Jun 2001 22:43:22 +0000 (22:43 +0000)
committerDavid Schleef <ds@schleef.org>
Thu, 21 Jun 2001 22:43:22 +0000 (22:43 +0000)
comedi/drivers/check_driver

index 4319808c2c0c51139c76beed76c7b4c8de78d200..f2f3ae026c40b125851952da86bc57208ace4ba7 100755 (executable)
@@ -43,6 +43,14 @@ if ! grep '[[:space:]]\+module:[[:space:]]*THIS_MODULE' ${driver} &>/dev/null;th
        echo "E: doesn't set driver->module to THIS_MODULE"
 fi
 
+# check the Makefile for the config option
+config=$(grep "CONFIG.*${basedriver}.o" Makefile|sed 's/.*\(CONFIG_.*\)\{1\}).*/\1/')
+if [ "$config" = "" ];then
+       echo "E: can't find config option!"
+else
+       echo config option $config
+fi
+
 # check to see if it uses name recognition
 if grep 'board_name:' ${driver} &>/dev/null;then
        echo uses recognize to determine type
@@ -258,9 +266,17 @@ if grep 'comedi_\(\(done\)\|\(error_done\)\|\(bufcheck\)\|\(eos\)\|\(eobuf\)\)[[
 fi
 
 # Drivers should have documentation in Documentation/comedi/drivers.txt
-if grep "^Driver: ${basedriver}.o$" ../../Documentation/comedi/drivers.txt;then
+if grep "^Driver: ${basedriver}.o$" ../../Documentation/comedi/drivers.txt \
+    &>/dev/null;then
        echo "entry in drivers.txt"
 else
        echo "E: not documented in drivers.txt"
 fi
 
+# Check that the config option is in Config.in
+if grep "dep_tristate.* ${config} \$CONFIG_COMEDI" ../Config.in &>/dev/null;then
+       echo "config option in Config.in"
+else
+       echo "E: config option not in Config.in (or broken)"
+fi
+