diff options
author | Joshua Haberman <jhaberman@gmail.com> | 2018-09-09 16:31:11 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-09 16:31:11 -0700 |
commit | 427168995343ceed2f505460d305e4b71d41a0a4 (patch) | |
tree | 8815b044a7b144a34678361989b512ccff64764a | |
parent | b2a388212a208095300f1ff2f767af82dd9e59b2 (diff) | |
parent | ae4c03b93c60b1d4c12f3f5efb71d7bf3cb019ea (diff) |
Merge pull request #125 from haberman/portdef
Fixed port_def/undef so that the amalgamation is self-contained.
-rwxr-xr-x | tools/amalgamate.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/amalgamate.py b/tools/amalgamate.py index d3807c6..4739a94 100755 --- a/tools/amalgamate.py +++ b/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): |