From 03288e8eb6eb131b67f79054aa48fed067a807fb Mon Sep 17 00:00:00 2001 From: Christopher Dunn Date: Wed, 22 Jun 2011 00:43:31 +0000 Subject: [PATCH] (bug#3314841) Fixed JSON_IS_AMALGAMATION. Using os.path for OSX filename compatibility. --- amalgamate.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/amalgamate.py b/amalgamate.py index 6e3b11a..eab724f 100644 --- a/amalgamate.py +++ b/amalgamate.py @@ -65,7 +65,7 @@ def amalgamate_source( source_top_dir=None, 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 @@ def amalgamate_source( source_top_dir=None, 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 @@ def amalgamate_source( source_top_dir=None, 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 )