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 @@
             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 @@
         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 @@
 
       - 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 @@
         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 @@
         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 @@
 
         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 @@
         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()
 
