Merge pull request #125 from haberman/portdef

Fixed port_def/undef so that the amalgamation is self-contained.
pull/13171/head
Joshua Haberman 6 years ago committed by GitHub
commit 4271689953
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      tools/amalgamate.py

@ -18,14 +18,14 @@ class Amalgamator:
self.output_c.write("// Amalgamated source file\n")
self.output_c.write('#include "upb.h"\n')
self.output_c.write('#include "upb/port_def.inc"\n')
self.output_c.write(open("upb/port_def.inc").read())
self.output_h.write("// Amalgamated source file\n")
self.output_h.write('#include "upb/port_def.inc"\n')
self.output_h.write(open("upb/port_def.inc").read())
def finish(self):
self.output_c.write('#include "upb/port_undef.inc"\n')
self.output_h.write('#include "upb/port_undef.inc"\n')
self.output_c.write(open("upb/port_undef.inc").read())
self.output_h.write(open("upb/port_undef.inc").read())
def _process_file(self, infile_name, outfile):
for line in open(infile_name):

Loading…
Cancel
Save