Make: build nitc instead of nitg
authorJean Privat <jean@pryen.org>
Thu, 11 Dec 2014 02:34:58 +0000 (21:34 -0500)
committerJean Privat <jean@pryen.org>
Thu, 11 Dec 2014 10:27:27 +0000 (05:27 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>

.gitignore
src/Makefile
src/ncall.sh [new file with mode: 0755]
src/ngall.sh [deleted file]

index 62da951..5cd49a0 100644 (file)
@@ -27,7 +27,7 @@ src/*.dot
 src/*.dat
 src/*.gnu
 src/*.bin
-src/nitg_0
+src/nitc_0
 
 c_src/*.o
 c_src/*.cksum
index 2f3d7a1..8c9742c 100644 (file)
 
 NITCOPT=
 OLDNITCOPT=
-OBJS=nitg nitpick nit nitdoc nitls nitunit nitpretty nitmetrics nitx nitlight nitdbg_client nitserial
+OBJS=nitc nitpick nit nitdoc nitls nitunit nitpretty nitmetrics nitx nitlight nitdbg_client nitserial
 SRCS=$(patsubst %,%.nit,$(OBJS))
 BINS=$(patsubst %,../bin/%,$(OBJS))
 
 all: $(BINS)
 
-nitg_0: ../c_src/nitg parser/parser.nit
+nitc_0: ../c_src/nitg parser/parser.nit
        @echo '***************************************************************'
-       @echo '* Compile nitg_0 from NIT source files                        *'
+       @echo '* Compile nitc_0 from NIT source files                        *'
        @echo '***************************************************************'
        ./git-gen-version.sh
-       ../c_src/nitg ${OLDNITCOPT} -o nitg_0 -v nitg.nit
+       ../c_src/nitg ${OLDNITCOPT} -o nitc_0 -v nitc.nit
 
-$(BINS): nitg_0 parser/parser.nit
+$(BINS): nitc_0 parser/parser.nit
        @echo '***************************************************************'
        @echo '* Compile binaries from NIT source files                      *'
        @echo '***************************************************************'
        ./git-gen-version.sh
-       ./nitg_0 ${NITCOPT} -v --dir ../bin $(SRCS)
+       ./nitc_0 ${NITCOPT} -v --dir ../bin $(SRCS)
 
-$(OBJS): nitg_0 parser/parser.nit
+$(OBJS): nitc_0 parser/parser.nit
        ./git-gen-version.sh
-       ./nitg_0 ${NITCOPT} -v $@.nit
+       ./nitc_0 ${NITCOPT} -v $@.nit
 
 ../c_src/nitg: ../c_src/*.c ../c_src/*.h ../c_src/Makefile
        @echo '***************************************************************'
-       @echo '* Compile nitg from C source files                            *'
+       @echo '* Compile nitc from C source files                            *'
        @echo '***************************************************************'
        cd ../c_src; make
 
@@ -53,5 +53,5 @@ parser/parser.nit:
        cd parser; make
 
 clean:
-       rm -rf -- .nit_compile* version.nit nitg_0 2> /dev/null || true
+       rm -rf -- .nit_compile* version.nit nitc_0 2> /dev/null || true
        cd parser; make clean
diff --git a/src/ncall.sh b/src/ncall.sh
new file mode 100755 (executable)
index 0000000..db7d26d
--- /dev/null
@@ -0,0 +1,33 @@
+#!/bin/bash
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# nitc all
+# fully build, time and check nitc
+
+rm nitc nitc_? hello_world 2>/dev/null
+set -x
+set -e
+make -C ../c_src
+sh git-gen-version.sh
+time ../c_src/nitg nitc.nit -v -o nitc_0
+time ./nitc_0 nitc.nit -v "$@" -o nitc_2
+cp nitc_2 nitc
+time ./nitc_2 nitc.nit -v "$@" -o nitc_3
+time ./nitc_3 nitc.nit -v "$@" -o nitc_4
+./nitc_4 ../examples/hello_world.nit "$@" -o hello_world
+./hello_world
+
+# save the last one; may be useful...
+cp ./nitc_4 nitc.good
diff --git a/src/ngall.sh b/src/ngall.sh
deleted file mode 100755 (executable)
index e6dd406..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/bash
-rm nitg nitg_? hello_world 2>/dev/null
-set -x
-set -e
-make -C ../c_src
-sh git-gen-version.sh
-time ../c_src/nitg nitg.nit -v -o nitg_0
-time ./nitg_0 nitg.nit -v "$@" -o nitg_2
-cp nitg_2 nitg
-time ./nitg_2 nitg.nit -v "$@" -o nitg_3
-time ./nitg_3 nitg.nit -v "$@" -o nitg_4
-./nitg_4 ../examples/hello_world.nit "$@" -o hello_world
-./hello_world
-
-# save the last one; may be useful...
-cp ./nitg_4 nitg.good
-