lib: HTML clear children before each render to avoid duplicates
[nit.git] / src / compiling / compiling_base.nit
index a53a4e2..4fdcec0 100644 (file)
@@ -19,7 +19,7 @@ package compiling_base
 
 import mmloader
 private import utils
-import primitive_info
+private import primitive_info
 import program
 import compiling_writer
 
@@ -93,6 +93,10 @@ class CProgram
                        verbose = "-vv"
                end
 
+               # include compdir to find frontier files (._nitni.h) from native
+               # implementations as .nit.h must have an import of <{name}._nitni.h>
+               include_dirs.add( "-I {compdir}" )
+
                f.write("#!/bin/sh\n")
                f.write("# This shell script is generated by NIT to compile the program {program.main_module.full_name}.\n")
                f.write("CLIBDIR=\"{tc.clibdir.as(not null)}\"\n")
@@ -106,7 +110,7 @@ class CProgram
                end
                if tc.boost then f.write(" -O")
                if not tc.cc_link then f.write(" -x \"-c\"")
-               for l in tc.cc_libs do f.write(" -x \"-l {l}\"")
+               for l in tc.cc_libs do f.write(" -l {l}")
                for lp in tc.cc_lib_paths do f.write(" -x \"-L {lp}\"")
                for ip in tc.cc_include_paths do f.write(" -x \"-I {ip}\"")
                f.write(" \"$@\" \\\n  {files.join("\\\n  ")}\n")