diff options
Diffstat (limited to 'libc/kernel/tools')
| -rw-r--r-- | libc/kernel/tools/cpp.py | 4 | ||||
| -rwxr-xr-x | libc/kernel/tools/update_all.py | 5 | ||||
| -rw-r--r-- | libc/kernel/tools/utils.py | 47 |
3 files changed, 3 insertions, 53 deletions
diff --git a/libc/kernel/tools/cpp.py b/libc/kernel/tools/cpp.py index 8e15a67..b8aa775 100644 --- a/libc/kernel/tools/cpp.py +++ b/libc/kernel/tools/cpp.py @@ -1676,7 +1676,7 @@ class Block: return left_count if self.directive: - out.write(str(self) + "\n") + out.write(str(self).rstrip() + "\n") left_count -= 1 if left_count == 0: out.write(warning) @@ -1756,7 +1756,7 @@ class BlockList: for b in self.blocks: result += str(b) if b.isDirective(): - result += '\n' + result = result.rstrip() + '\n' return result def optimizeIf01(self): diff --git a/libc/kernel/tools/update_all.py b/libc/kernel/tools/update_all.py index badef92..3f1d1e6 100755 --- a/libc/kernel/tools/update_all.py +++ b/libc/kernel/tools/update_all.py @@ -16,11 +16,6 @@ def usage(): - the clean headers will be placed in '../arch-<arch>/asm', '../common/linux', '../common/asm-generic', etc.. - - - if ANDROID_PRODUCT_OUT is defined in your environment, you're - using the Android build system, and the program will issue - p4 add / edit / delete commands to update the depot for you. - (you'll need to p4 submit manually though) """ % { "progname" : os.path.basename(sys.argv[0]) } sys.exit(0) diff --git a/libc/kernel/tools/utils.py b/libc/kernel/tools/utils.py index f4cf540..e2820d1 100644 --- a/libc/kernel/tools/utils.py +++ b/libc/kernel/tools/utils.py @@ -184,17 +184,6 @@ class SysCallsTxtParser: fp.close() -class Output: - def __init__(self,out=sys.stdout): - self.out = out - - def write(self,msg): - self.out.write(msg) - - def writeln(self,msg): - self.out.write(msg) - self.out.write("\n") - class StringOutput: def __init__(self): self.line = "" @@ -203,10 +192,6 @@ class StringOutput: self.line += msg D2("write '%s'" % msg) - def writeln(self,msg): - self.line += msg + '\n' - D2("write '%s\\n'"% msg) - def get(self): return self.line @@ -356,11 +341,9 @@ class BatchFileUpdater: return (adds, deletes, edits) - def _writeFile(self,dst,data=None): + def _writeFile(self,dst): if not os.path.exists(os.path.dirname(dst)): create_file_path(dst) - if data == None: - data = self.new_data[dst] f = open(dst, "w") f.write(self.new_data[dst]) f.close() @@ -377,34 +360,6 @@ class BatchFileUpdater: for dst in sorted(deletes): os.remove(dst) - def updateP4Files(self): - adds, deletes, edits = self.getChanges() - - if len(adds): - files = string.join(sorted(adds)," ") - D( "%d new files will be p4 add-ed" % len(adds) ) - for dst in adds: - self._writeFile(dst) - D2("P4 ADDS: %s" % files) - o = commands.getoutput( "p4 add " + files ) - D2( o ) - - if len(edits): - files = string.join(sorted(edits)," ") - D( "%d files will be p4 edit-ed" % len(edits) ) - D2("P4 EDITS: %s" % files) - o = commands.getoutput( "p4 edit " + files ) - D2( o ) - for dst in edits: - self._writeFile(dst) - - if len(deletes): - files = string.join(sorted(deletes)," ") - D( "%d files will be p4 delete-d" % len(deletes) ) - D2("P4 DELETES: %s" % files) - o = commands.getoutput( "p4 delete " + files ) - D2( o ) - def updateGitFiles(self): adds, deletes, edits = self.getChanges() |
