X-Git-Url: http://nitlanguage.org diff --git a/src/compiling/compiling.nit b/src/compiling/compiling.nit index 8dcadba..b71b827 100644 --- a/src/compiling/compiling.nit +++ b/src/compiling/compiling.nit @@ -75,10 +75,10 @@ redef class Program v.add_decl("#include ") compile_tables_to_c(v) compile_main_part(v) - var filename = "{cprogram.compdir}/{main_module.name}._tables.c" + var filename = "{cprogram.compdir}/{main_module.cname}._tables.c" cprogram.files.add(filename) var f = new OFStream.open(filename) - f.write("/* This C file is generated by NIT to compile program {main_module.name}. */\n") + f.write("/* This C file is generated by NIT to compile program {main_module.cname}. */\n") for m in main_module.mhe.greaters_and_self do f.write("#include \"{cprogram.module_header_name(m)}\"\n") end @@ -93,7 +93,7 @@ redef class MMModule private fun compile_separate_module(cprogram: CProgram) do var tc = cprogram.program.tc - tc.info("Generating C code for module: {name}",2) + tc.info("Generating C code for module: {full_name}",2) var v = new CompilerVisitor(self, cprogram) v.add_decl("#include ") @@ -111,18 +111,18 @@ redef class MMModule var hfilename = cprogram.module_header_name(self) var f = new OFStream.open("{cprogram.compdir}/{hfilename}") - f.write("/* This C header file is generated by NIT to compile modules and programs that requires {name}. */\n") - f.write("#ifndef {name}{cprogram.get_file_ending}\n") - f.write("#define {name}{cprogram.get_file_ending}\n") + f.write("/* This C header file is generated by NIT to compile modules and programs that requires {full_name}. */\n") + f.write("#ifndef {cname}{cprogram.get_file_ending}\n") + f.write("#define {cname}{cprogram.get_file_ending}\n") for m in mhe.direct_greaters do f.write("#include \"{cprogram.module_header_name(m)}\"\n") v.header_writer.write_to_stream(f) f.write("#endif\n") f.close - var cfilename = "{cprogram.compdir}/{name}.{cprogram.get_file_ending}.c" + var cfilename = "{cprogram.compdir}/{cname}.{cprogram.get_file_ending}.c" cprogram.files.add(cfilename) f = new OFStream.open("{cfilename}") - f.write("/* This C file is generated by NIT to compile module {name}. */\n") + f.write("/* This C file is generated by NIT to compile module {cname}. */\n") f.write("#include \"{hfilename}\"\n") v.top_writer.write_to_stream(f) f.close