From 0cc7f17ddf82364f345b823320c319120fa31f34 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Thu, 21 Jun 2001 22:43:22 +0000 Subject: [PATCH] Check for CONFIG_ in Makefile and Config.in --- comedi/drivers/check_driver | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/comedi/drivers/check_driver b/comedi/drivers/check_driver index 4319808c..f2f3ae02 100755 --- a/comedi/drivers/check_driver +++ b/comedi/drivers/check_driver @@ -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 + -- 2.26.2