]> sigrok.org Git - sigrok-util.git/blobdiff - source/new-driver
sigrok-cross-android: Bump zlib to 1.2.11.
[sigrok-util.git] / source / new-driver
index 1f8f91da336ad7346734121be87b0f8943aee908..7f14201cc502623da2afb573c12b496ba2a7436e 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
 ##
 ## This file is part of the sigrok-util project.
 ##
@@ -29,12 +29,12 @@ import datetime
 
 TMPL_AUTOCONF_DRIVER = "SR_DRIVER([{name}], [{short}])\n"
 
-TMPL_FILES = ('api.c', 'protocol.c', 'protocol.h')
+TMPL_FILES = ('protocol.h', 'protocol.c', 'api.c')
 
 TMPL_HWMAKE_DRIVERLIB = """if HW_{upper}
-libsigrok_la_SOURCES +="""
+src_libdrivers_la_SOURCES +="""
 for tmpl_file in TMPL_FILES:
-    TMPL_HWMAKE_DRIVERLIB += " \\\nsrc/hardware/{short}/" + tmpl_file
+    TMPL_HWMAKE_DRIVERLIB += " \\\n\tsrc/hardware/{short}/" + tmpl_file
 TMPL_HWMAKE_DRIVERLIB += "\nendif\n"
 
 
@@ -108,7 +108,7 @@ def do_automake(gitdir, names):
                 if drv_short > names['upper']:
                     out += tmpl(TMPL_HWMAKE_DRIVERLIB, names)
                     state = 'done'
-            elif not re.match(r'\s*libsigrok_la_SOURCES\b|\s*src/hardware/|endif\b', line):
+            elif not re.match(r'\s*src_libdrivers_la_SOURCES\b|\s*src/hardware/|endif\b', line):
                 print("[%s]" % line.strip())
                 # we passed the last entry
                 out += tmpl(TMPL_HWMAKE_DRIVERLIB, names)