@@ -84,7 +84,7 @@ def emit_compilation_db_entry(target, source, env):
8484 entry = env .__COMPILATIONDB_Entry (
8585 target = dbtarget ,
8686 source = [],
87- __COMPILATIONDB_UTARGET = target ,
87+ __COMPILATIONDB_UOUTPUT = target ,
8888 __COMPILATIONDB_USOURCE = source ,
8989 __COMPILATIONDB_UACTION = user_action ,
9090 __COMPILATIONDB_ENV = env ,
@@ -116,7 +116,7 @@ def compilation_db_entry_action(target, source, env, **kw):
116116 """
117117
118118 command = env ["__COMPILATIONDB_UACTION" ].strfunction (
119- target = env ["__COMPILATIONDB_UTARGET " ],
119+ target = env ["__COMPILATIONDB_UOUTPUT " ],
120120 source = env ["__COMPILATIONDB_USOURCE" ],
121121 env = env ["__COMPILATIONDB_ENV" ],
122122 )
@@ -125,7 +125,7 @@ def compilation_db_entry_action(target, source, env, **kw):
125125 "directory" : env .Dir ("#" ).abspath ,
126126 "command" : command ,
127127 "file" : env ["__COMPILATIONDB_USOURCE" ][0 ],
128- "target " : env ['__COMPILATIONDB_UTARGET ' ][0 ]
128+ "output " : env ['__COMPILATIONDB_UOUTPUT ' ][0 ]
129129 }
130130
131131 target [0 ].write (entry )
@@ -139,25 +139,25 @@ def write_compilation_db(target, source, env):
139139 for s in __COMPILATION_DB_ENTRIES :
140140 entry = s .read ()
141141 source_file = entry ['file' ]
142- target_file = entry ['target ' ]
142+ output_file = entry ['output ' ]
143143
144144 if use_abspath :
145145 source_file = source_file .abspath
146- target_file = target_file .abspath
146+ output_file = output_file .abspath
147147 else :
148148 source_file = source_file .path
149- target_file = target_file .path
149+ output_file = output_file .path
150150
151151 path_entry = {'directory' : entry ['directory' ],
152152 'command' : entry ['command' ],
153153 'file' : source_file ,
154- 'target ' : target_file }
154+ 'output ' : output_file }
155155
156156 entries .append (path_entry )
157157
158- with open (target [0 ].path , "w" ) as target_file :
158+ with open (target [0 ].path , "w" ) as output_file :
159159 json .dump (
160- entries , target_file , sort_keys = True , indent = 4 , separators = ("," , ": " )
160+ entries , output_file , sort_keys = True , indent = 4 , separators = ("," , ": " )
161161 )
162162
163163
0 commit comments