Add a first comment line for files generated by nitc.
[nit.git] / src / compiling / compiling.nit
index 5f7aeca..f72eaea 100644 (file)
@@ -58,6 +58,7 @@ redef class MMSrcModule
                var fn = "{tc.base_dir}/{name}.{tc.ext_prefix}_build.sh"
                var f = new OFStream.open(fn)
                f.write("#!/bin/sh\n")
+               f.write("# This shell script is generated by NIT to compile the program {name}.\n")
                f.write("CLIBDIR=\"{tc.clibdir}\"\n")
                f.write("{tc.bindir}/gccx -d {tc.base_dir} -I $CLIBDIR {includes.join(" ")}")
                if tc.output_file != null then 
@@ -86,6 +87,7 @@ redef class MMSrcModule
                compile_tables_to_c(v)
                compile_main_part(v)
                var f = new OFStream.open("{tc.base_dir}/{name}.{tc.ext_prefix}_tables.c")
+               f.write("/* This C file is generated by NIT to compile program {name}. */\n")
                for m in mhe.greaters_and_self do
                        f.write("#include \"{m.name}.{tc.ext_prefix}_sep.h\"\n")
                end
@@ -106,6 +108,7 @@ redef class MMSrcModule
                declare_class_tables_to_c(v)
                compile_mod_to_c(v)
                var f = new OFStream.open("{tc.base_dir}/{name}.{tc.ext_prefix}_sep.h")
+               f.write("/* This C header file is generated by NIT to compile modules and programs that requires {name}. */\n")
                f.write("#ifndef {name}_{tc.ext_prefix}_sep\n")
                f.write("#define {name}_{tc.ext_prefix}_sep\n")
                for m in mhe.direct_greaters do f.write("#include \"{m.name}.{tc.ext_prefix}_sep.h\"\n")
@@ -113,6 +116,7 @@ redef class MMSrcModule
                f.write("\n#endif\n")
                f.close
                var f = new OFStream.open("{tc.base_dir}/{name}.{tc.ext_prefix}_sep.c")
+               f.write("/* This C file is generated by NIT to compile module {name}. */\n")
                f.write("#include \"{name}.{tc.ext_prefix}_sep.h\"\n")
                f.write(v.ctx.instrs.join("\n"))
                f.write("\n")