]> git.donarmstrong.com Git - lilypond.git/blobdiff - stepmake/bin/package-diff.py
release: 1.1.0
[lilypond.git] / stepmake / bin / package-diff.py
index 2e361e453dea0731ad41f97931a85f39af340333..e8e28f1bab676efebc02e66d0659792913fa7fd7 100644 (file)
@@ -35,7 +35,7 @@ def help ():
        sys.stdout.write (
                'Generate a patch to go to current version\n'
                '  -f, --from=FROM      old is FROM\n'
-               '  -h, --help           print this help\n'
+               '  -h, --help           print this help\n'
                '  -p, --package=DIR    specify package\n'
                '  -r, --release        diff against latest release\n'  
                '  -t, --to=TO          to version TO\n'  
@@ -58,7 +58,10 @@ def remove_automatic (dirnames):
        for d in dirs:
                files = files + multiple_find (['*'], [d])
        for f in files:
-               os.remove (f)
+               try:
+                       os.remove (f)
+               except:
+                       sys.stderr.write ("can't remove: `" + f + "'\n'")
 
 def dirname (v):
        # urg, again?
@@ -79,8 +82,8 @@ def remove_configure (dir):
 
        # should do 'make distclean ?'
        os.system ('rm -rf debian/out')
-       os.system ('rm -f Makefile config.cache config.h config.hh config.log config.make config.status')
-       os.system ('rm -f stepmake/Makefile stepmake/config.hh stepmake/config.log stepmake/config.make')
+       os.system ('rm -f GNUmakefile config.cache config.h config.hh config.log config.make config.status configure')
+       os.system ('rm -f stepmake/GNUmakefile stepmake/config.hh stepmake/config.log stepmake/config.status stepmake/config.make')
 
        # ugh: symlinks
        os.system ('rm -f stepmake/stepmake/stepmake')
@@ -140,9 +143,10 @@ def makediff (fromdir, todir, patch_name):
        if i == -1:
                f.write (to_str + '\n')
        else:
-               i = i + len (version_tuple_to_str (flags.to_version)) + 1
+               i = i + len (version_tuple_to_str (flags.to_version))
                state_vec = state_vec[:i]
                f.write (state_vec)
+               f.write ('\n')
        f.write ('++state\n')
        f.close ()