99import os .path
1010import sys
1111
12- class AmalagatedFile :
12+ class AmalgamationFile :
1313 def __init__ ( self , top_dir ):
1414 self .top_dir = top_dir
1515 self .blocks = []
@@ -47,17 +47,17 @@ def write_to( self, output_path ):
4747 f .write ( self .get_value () )
4848 f .close ()
4949
50- def amalgate_source ( source_top_dir = None ,
51- target_source_path = None ,
52- header_include_path = None ):
50+ def amalgamate_source ( source_top_dir = None ,
51+ target_source_path = None ,
52+ header_include_path = None ):
5353 """Produces amalgated source.
5454 Parameters:
5555 source_top_dir: top-directory
5656 target_source_path: output .cpp path
5757 header_include_path: generated header path relative to target_source_path.
5858 """
5959 print 'Amalgating header...'
60- header = AmalagatedFile ( source_top_dir )
60+ header = AmalgamationFile ( source_top_dir )
6161 header .add_text ( '/// Json-cpp amalgated header (http://jsoncpp.sourceforge.net/).' )
6262 header .add_text ( '/// It is intented to be used with #include <%s>' % header_include_path )
6363 header .add_file ( 'LICENSE' , wrap_in_comment = True )
@@ -81,7 +81,7 @@ def amalgate_source( source_top_dir=None,
8181 base , ext = os .path .splitext ( header_include_path )
8282 forward_header_include_path = base + '-forwards' + ext
8383 print 'Amalgating forward header...'
84- header = AmalagatedFile ( source_top_dir )
84+ header = AmalgamationFile ( source_top_dir )
8585 header .add_text ( '/// Json-cpp amalgated forward header (http://jsoncpp.sourceforge.net/).' )
8686 header .add_text ( '/// It is intented to be used with #include <%s>' % forward_header_include_path )
8787 header .add_text ( '/// This header provides forward declaration for all JsonCpp types.' )
@@ -101,7 +101,7 @@ def amalgate_source( source_top_dir=None,
101101 header .write_to ( target_forward_header_path )
102102
103103 print 'Amalgating source...'
104- source = AmalagatedFile ( source_top_dir )
104+ source = AmalgamationFile ( source_top_dir )
105105 source .add_text ( '/// Json-cpp amalgated source (http://jsoncpp.sourceforge.net/).' )
106106 source .add_text ( '/// It is intented to be used with #include <%s>' % header_include_path )
107107 source .add_file ( 'LICENSE' , wrap_in_comment = True )
@@ -134,9 +134,9 @@ def main():
134134 parser .enable_interspersed_args ()
135135 options , args = parser .parse_args ()
136136
137- msg = amalgate_source ( source_top_dir = options .top_dir ,
138- target_source_path = options .target_source_path ,
139- header_include_path = options .header_include_path )
137+ msg = amalgamate_source ( source_top_dir = options .top_dir ,
138+ target_source_path = options .target_source_path ,
139+ header_include_path = options .header_include_path )
140140 if msg :
141141 sys .stderr .write ( msg + '\n ' )
142142 sys .exit ( 1 )
0 commit comments