(bug#3314841) Fixed JSON_IS_AMALGAMATION. Using os.path for OSX filename compatibility.
diff --git a/amalgamate.py b/amalgamate.py
index 6e3b11a..eab724f 100644
--- a/amalgamate.py
+++ b/amalgamate.py
@@ -65,7 +65,7 @@
header.add_text( '# define JSON_AMALGATED_H_INCLUDED' )
header.add_text( '/// If defined, indicates that the source file is amalgated' )
header.add_text( '/// to prevent private header inclusion.' )
- header.add_text( '#define JSON_IS_AMALGATED' )
+ header.add_text( '#define JSON_IS_AMALGAMATION' )
header.add_file( 'include/json/config.h' )
header.add_file( 'include/json/forwards.h' )
header.add_file( 'include/json/features.h' )
@@ -90,7 +90,7 @@
header.add_text( '# define JSON_FORWARD_AMALGATED_H_INCLUDED' )
header.add_text( '/// If defined, indicates that the source file is amalgated' )
header.add_text( '/// to prevent private header inclusion.' )
- header.add_text( '#define JSON_IS_AMALGATED' )
+ header.add_text( '#define JSON_IS_AMALGAMATION' )
header.add_file( 'include/json/config.h' )
header.add_file( 'include/json/forwards.h' )
header.add_text( '#endif //ifndef JSON_FORWARD_AMALGATED_H_INCLUDED' )
@@ -108,12 +108,13 @@
source.add_text( '' )
source.add_text( '#include <%s>' % header_include_path )
source.add_text( '' )
- source.add_file( 'src/lib_json\json_tool.h' )
- source.add_file( 'src/lib_json\json_reader.cpp' )
- source.add_file( 'src/lib_json\json_batchallocator.h' )
- source.add_file( 'src/lib_json\json_valueiterator.inl' )
- source.add_file( 'src/lib_json\json_value.cpp' )
- source.add_file( 'src/lib_json\json_writer.cpp' )
+ lib_json = 'src/lib_json'
+ source.add_file( os.path.join(lib_json, 'json_tool.h') )
+ source.add_file( os.path.join(lib_json, 'json_reader.cpp') )
+ source.add_file( os.path.join(lib_json, 'json_batchallocator.h') )
+ source.add_file( os.path.join(lib_json, 'json_valueiterator.inl') )
+ source.add_file( os.path.join(lib_json, 'json_value.cpp') )
+ source.add_file( os.path.join(lib_json, 'json_writer.cpp') )
print 'Writing amalgated source to %r' % target_source_path
source.write_to( target_source_path )