]> sigrok.org Git - sigrok-util.git/blobdiff - source/new-driver
sysclk-lwla: Add custom protocol dissector for use with Wireshark.
[sigrok-util.git] / source / new-driver
index 0e2a9ce4a9a1886245a6b320a8ad3376eccca7a3..2f8d5a07bb1bf0e918c5b8c6cf56882880628de0 100755 (executable)
@@ -31,7 +31,7 @@ TMPL_AUTOCONF_AC_ARG_ENABLE = """\
 AC_ARG_ENABLE(${short}, AC_HELP_STRING([--enable-${short}],
        [enable ${name} support [default=yes]]),
        [HW_${upper}="$enableval"],
-       [HW_${upper}=yes])
+       [HW_${upper}=$HW_ENABLED_DEFAULT])
 AM_CONDITIONAL(HW_${upper}, test x$HW_${upper} = xyes)
 if test "x$HW_${upper}" = "xyes"; then
        AC_DEFINE(HAVE_HW_${upper}, 1, [${name} support])
@@ -77,8 +77,9 @@ def new_driver():
     tmp = tempfile.mkdtemp()
     try:
         os.chdir(tmp)
-        out, err = Popen("git clone " + LIBSR, shell=True, stderr=PIPE).communicate()
-        if err:
+        process = Popen("git clone " + LIBSR, shell=True, stderr=PIPE)
+        out, err = process.communicate()
+        if process.returncode:
             raise Exception(err.decode())
         gitdir = tmp + '/libsigrok/'
         do_configure_ac(gitdir)
@@ -144,7 +145,7 @@ def do_configure_ac(gitdir):
     # add summary line
     out = ''
     state = 'copy'
-    names['summary'] = "%s%s $HW_%s" % (names['name'],
+    names['summary'] = "%s%s $HW_%s" % (names['short'],
             '.' * (32 - len(names['name'])), names['upper'])
     for line in configure_ac.split('\n')[:-1]:
         if state == 'copy':