c_src: gives c_src its own clibdir
[nit.git] / src / nc
diff --git a/src/nc b/src/nc
index 8060070..c6845f6 100755 (executable)
--- a/src/nc
+++ b/src/nc
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-NITC="../bin/nitc"
+NITC="../c_src/nitc"
 NITCOPTS= #"-I parser -I metamodel -I syntax -I compiling -I tmp"
+CSRC=$( (cd ../c_src; pwd) )
 
 name=`basename $0`
 case $name in
-       nc) opts="";;
-       nc0) opts="-p 0"; NITC="../c_src/nitc";;
-       nc1) opts="-p 1"; NITC="./nitc_0";;
+       nc) opts="--clibdir ../c_src/clib";;
        nc2) opts="-p 2"; NITC="./nitc";;
        nc3) opts="-p 3"; NITC="./nitc_2";;
        nc4) opts="-p 4"; NITC="./nitc_3";;
@@ -32,5 +31,12 @@ esac
 ./git-gen-version.sh "$name"
 
 echo ${NITC} ${NITCOPTS} ${opts} "$@"
-${NITC} ${NITCOPTS} ${opts} "$@"
-
+k=$(mktemp nc.stderr.XXXXX)
+rm "$k"
+trap "rm -f $k; exit 1" INT TERM
+mkfifo "$k"
+./showerr.sh <"$k" &
+${NITC} ${NITCOPTS} ${opts} "$@" 2>"$k"
+err=$?
+rm "$k"
+exit $err