Skip to content

Commit 03288e8

Browse files
committed
(bug#3314841) Fixed JSON_IS_AMALGAMATION. Using os.path for OSX filename compatibility.
1 parent c9f91dd commit 03288e8

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

amalgamate.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def amalgamate_source( source_top_dir=None,
6565
header.add_text( '# define JSON_AMALGATED_H_INCLUDED' )
6666
header.add_text( '/// If defined, indicates that the source file is amalgated' )
6767
header.add_text( '/// to prevent private header inclusion.' )
68-
header.add_text( '#define JSON_IS_AMALGATED' )
68+
header.add_text( '#define JSON_IS_AMALGAMATION' )
6969
header.add_file( 'include/json/config.h' )
7070
header.add_file( 'include/json/forwards.h' )
7171
header.add_file( 'include/json/features.h' )
@@ -90,7 +90,7 @@ def amalgamate_source( source_top_dir=None,
9090
header.add_text( '# define JSON_FORWARD_AMALGATED_H_INCLUDED' )
9191
header.add_text( '/// If defined, indicates that the source file is amalgated' )
9292
header.add_text( '/// to prevent private header inclusion.' )
93-
header.add_text( '#define JSON_IS_AMALGATED' )
93+
header.add_text( '#define JSON_IS_AMALGAMATION' )
9494
header.add_file( 'include/json/config.h' )
9595
header.add_file( 'include/json/forwards.h' )
9696
header.add_text( '#endif //ifndef JSON_FORWARD_AMALGATED_H_INCLUDED' )
@@ -108,12 +108,13 @@ def amalgamate_source( source_top_dir=None,
108108
source.add_text( '' )
109109
source.add_text( '#include <%s>' % header_include_path )
110110
source.add_text( '' )
111-
source.add_file( 'src/lib_json\json_tool.h' )
112-
source.add_file( 'src/lib_json\json_reader.cpp' )
113-
source.add_file( 'src/lib_json\json_batchallocator.h' )
114-
source.add_file( 'src/lib_json\json_valueiterator.inl' )
115-
source.add_file( 'src/lib_json\json_value.cpp' )
116-
source.add_file( 'src/lib_json\json_writer.cpp' )
111+
lib_json = 'src/lib_json'
112+
source.add_file( os.path.join(lib_json, 'json_tool.h') )
113+
source.add_file( os.path.join(lib_json, 'json_reader.cpp') )
114+
source.add_file( os.path.join(lib_json, 'json_batchallocator.h') )
115+
source.add_file( os.path.join(lib_json, 'json_valueiterator.inl') )
116+
source.add_file( os.path.join(lib_json, 'json_value.cpp') )
117+
source.add_file( os.path.join(lib_json, 'json_writer.cpp') )
117118

118119
print 'Writing amalgated source to %r' % target_source_path
119120
source.write_to( target_source_path )

0 commit comments

Comments
 (0)