mkcsrc: clear OLDNITCOPT in src/Makefile
[nit.git] / src / mkcsrc
index b3b6069..7ba4466 100755 (executable)
@@ -4,8 +4,8 @@ out=c_src
 rm -r "$out/" 2> /dev/null
 set -e
 set -x
-src/nitg src/nitg.nit -v "$@" --compile-dir "$out" -o "$out/nitg" --no-cc
-cp "$out/nitg.mk" "$out/Makefile"
+src/nitg src/nith.nit --semi-global -v "$@" --compile-dir "$out" -o "$out/nitg" --no-cc
+cp "$out/nith.mk" "$out/Makefile"
 sed -i -e "s#../$out/##g" "$out/Makefile"
 
 # Copy all direct dependencies
@@ -20,4 +20,7 @@ done
 # Update references in file
 perl -i -npe 's#"\.\./.*?([^/]*.h)"#"\1"#' "$out"/*.[ch]
 perl -i -npe 's#\S*/([^/]*.[ch])#\1#' "$out/Makefile"
-perl -i -npe 's#../clib#.#' "$out/Makefile"
+perl -i -npe 's#\.\./clib#.#' "$out/Makefile"
+
+# Remove old compilation flags
+sed -i -e 's/OLDNITCOPT=.*/OLDNITCOPT=/' src/Makefile