]> sigrok.org Git - sigrok-util.git/blobdiff - source/new-driver
new-driver: Cosmetics.
[sigrok-util.git] / source / new-driver
index 64a20c927bab56ba253f21af42fed023cc7e9872..e14b82056b24325987eacc72fb2dbec44e67360c 100755 (executable)
@@ -29,13 +29,13 @@ 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 +="""
 for tmpl_file in TMPL_FILES:
-    TMPL_HWMAKE_DRIVERLIB += " \\\nsrc/hardware/{short}/" + tmpl_file
-TMPL_HWMAKE_DRIVERLIB += "\nendif"
+    TMPL_HWMAKE_DRIVERLIB += " \\\n\tsrc/hardware/{short}/" + tmpl_file
+TMPL_HWMAKE_DRIVERLIB += "\nendif\n"
 
 
 def tmpl(template, names):
@@ -59,7 +59,7 @@ def new_driver(srcurl, tmpldir, names):
         do_autoconf(gitdir, names)
         do_automake(gitdir, names)
         do_driverskel(gitdir, tmpldir, names)
-        make_patch(gitdir)
+        make_patch(gitdir, names)
     except Exception as e:
         raise
         print(e)